diff options
| author | Adam Soltys <[email protected]> | 2024-11-06 10:13:38 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-06 10:13:38 -0800 |
| commit | 5e520ad22d82100b07debecf932b99350348fd2c (patch) | |
| tree | b015de1bd0a8bcf46da89947c4270e48c0ac1043 /src | |
| parent | fe2ba005d513a62389f5d30e6ab437d051d6dd49 (diff) | |
| download | coinos-ui-5e520ad22d82100b07debecf932b99350348fd2c.tar.gz coinos-ui-5e520ad22d82100b07debecf932b99350348fd2c.zip | |
don't decode
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/nostr.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/nostr.ts b/src/lib/nostr.ts index 025679c0..306aa643 100644 --- a/src/lib/nostr.ts +++ b/src/lib/nostr.ts @@ -41,7 +41,6 @@ export const generate = async (user: any) => { const salt = crypto.getRandomValues(new Uint8Array(16)); const mnemonic = generateSeedWords(); const sk = privateKeyFromSeedWords(mnemonic); - console.log("SK", sk); const bytes = new Uint8Array( await crypto.subtle.encrypt( @@ -51,9 +50,7 @@ export const generate = async (user: any) => { ), ); - const ska = hex.decode(sk); - console.log("SKA", ska); - user.pubkey = getPublicKey(ska); + user.pubkey = getPublicKey(sk); user.cipher = encode("en", toWords(bytes), 180); user.salt = Buffer.from(salt).toString("hex"); }; |
