diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/keyWrapping.ts | 4 | ||||
| -rw-r--r-- | src/lib/nip07.ts | 2 | ||||
| -rw-r--r-- | src/lib/nip17.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/keyWrapping.ts b/src/lib/keyWrapping.ts index 971b929c..31cb1e5c 100644 --- a/src/lib/keyWrapping.ts +++ b/src/lib/keyWrapping.ts @@ -1,5 +1,5 @@ import { prfEncrypt, prfDecrypt } from "$lib/crypto"; -import { rememberPrfKey, defaultRememberForMs, getCachedPrfKey } from "$lib/passwordCache"; +import { rememberPrfKey, defaultRememberForMs } from "$lib/passwordCache"; import { post } from "$lib/utils"; export function generateCanonicalKey(): ArrayBuffer { @@ -36,7 +36,7 @@ export async function resolveCanonicalKey( // Migration: old PRF key becomes canonical key const canonicalKey = oldPrfKey; const wrapped = await wrapCanonicalKey(wrappingKey, canonicalKey); - const updated = { ...(encryptedKeys || {}), [methodId]: wrapped }; + const updated = { ...encryptedKeys, [methodId]: wrapped }; await saveEncryptedKeys(updated); rememberPrfKey(canonicalKey, defaultRememberForMs); return { canonicalKey, encryptedKeys: updated }; diff --git a/src/lib/nip07.ts b/src/lib/nip07.ts index 691e3bcd..dc774186 100644 --- a/src/lib/nip07.ts +++ b/src/lib/nip07.ts @@ -65,7 +65,7 @@ export const ensureSigner = async (userPubkey: string): Promise<Uint8Array | nul if (extPubkey === userPubkey) { return null; // Use NIP-07 } - } catch (e) { + } catch { // Extension didn't work, fall through to signer modal } } diff --git a/src/lib/nip17.ts b/src/lib/nip17.ts index c6021339..d4718e48 100644 --- a/src/lib/nip17.ts +++ b/src/lib/nip17.ts @@ -1,4 +1,4 @@ -import { bytesToHex, hexToBytes } from "@noble/hashes/utils.js"; +import { bytesToHex } from "@noble/hashes/utils.js"; import { finalizeEvent, getEventHash, generateSecretKey, getPublicKey } from "nostr-tools/pure"; import { SimplePool } from "nostr-tools/pool"; |
