From 0aa54a8b790fa1e63dc65bb6e765018aa029317e Mon Sep 17 00:00:00 2001 From: Kostas Tzoumpas Date: Wed, 4 Oct 2023 21:45:19 +0300 Subject: [PATCH] improve --- src/pages/CreateWallet/CreateWallet.tsx | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/pages/CreateWallet/CreateWallet.tsx b/src/pages/CreateWallet/CreateWallet.tsx index 1ea7e97..d596266 100644 --- a/src/pages/CreateWallet/CreateWallet.tsx +++ b/src/pages/CreateWallet/CreateWallet.tsx @@ -61,12 +61,11 @@ const CreateWallet = () => { const generateWalletInfo = () => { const mnemonic = Mnemonic.generate(); const words = mnemonic.getWords(); - console.log("⚠️ ~ file: CreateWallet.tsx:63 ~ generateWalletInfo ~ words::::", words) const mnemonicString = mnemonic.toString(); const mnemonicKey = mnemonic.deriveKey(); const mnemonicPublicKey = mnemonicKey.generatePublicKey(); const address = mnemonicPublicKey.toAddress().bech32(); - const addressShard = getShardOfAddress(address); + const addressShard = getShardOfAddress(mnemonicPublicKey); const password = "password"; const addressIndex = 0; const secretKey = mnemonic.deriveKey(addressIndex); @@ -155,6 +154,26 @@ const CreateWallet = () => { ))} + {jsonFileContent == "" && + + + Click to re-generate the information: + + + + } + + or + {jsonFileContent == "" && Click to obtain the JSON file of the new wallet: