diff options
| author | Adam Soltys <[email protected]> | 2024-09-25 14:02:00 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-25 14:02:00 -0700 |
| commit | 9a2b381066e0bc617d807fc93357eaac9813fca8 (patch) | |
| tree | fc4ab54c985758fe7132bc21a2ba92b730210ac2 | |
| parent | 7c03500caa3c594a1aa284e9d533761f47ecc6bc (diff) | |
| download | coinos-ui-9a2b381066e0bc617d807fc93357eaac9813fca8.tar.gz coinos-ui-9a2b381066e0bc617d807fc93357eaac9813fca8.zip | |
clear mnemonic before redirect
| -rw-r--r-- | src/routes/(app)/account/pass/+page.svelte | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/(app)/account/pass/+page.svelte b/src/routes/(app)/account/pass/+page.svelte index 01a069e7..c063d647 100644 --- a/src/routes/(app)/account/pass/+page.svelte +++ b/src/routes/(app)/account/pass/+page.svelte @@ -41,14 +41,17 @@ mnemonicToEntropy($mnemonic, wordlist), password ); + let master = HDKey.fromMasterSeed( await mnemonicToSeed($mnemonic, password), versions ); + let child = master.derive("m/84'/0'/0'"); let pubkey = child.publicExtendedKey; let fingerprint = child.fingerprint.toString(16).padStart(8, "0"); await post("/account", { fingerprint, pubkey, name, seed, type }); + $mnemonic = ""; goto(`/${user.username}`); } catch (e) { console.log(e); @@ -56,7 +59,6 @@ } submitting = false; - $mnemonic = ""; }; </script> |
