aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-06 15:07:08 -0800
committerAdam Soltys <[email protected]>2026-03-06 15:07:08 -0800
commitd14c03e3f2e3806e17852a440d2a39f377570758 (patch)
tree38138c52e23a642d0b2c9853e59afb638a87d1e5 /src/lib
parent0020101f8f1d83fb323c77d0620af821be9d4e66 (diff)
downloadcoinos-ui-d14c03e3f2e3806e17852a440d2a39f377570758.tar.gz
coinos-ui-d14c03e3f2e3806e17852a440d2a39f377570758.zip
lint
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/keyWrapping.ts4
-rw-r--r--src/lib/nip07.ts2
-rw-r--r--src/lib/nip17.ts2
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";