From 68aa01161907886b9b73f700671ca50fa5089371 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 15 Aug 2026 15:55:06 -0700 Subject: The face the lock remembers is the face you wear: a nostr login outranks the seed key in the watch directory too Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv --- src/app.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/app.js b/src/app.js index cd51c63..c9b690a 100644 --- a/src/app.js +++ b/src/app.js @@ -1135,8 +1135,13 @@ function saveDirectory() { // reopening still shows WHO this wallet is (avatar, npub, profile) even // though nothing can be signed until the keys are back. const dir = accounts.filter((a) => a.xpub && !a.provisional).map((a) => { - if (a.id === activeId && !wallet.watchOnly && wallet.nostrPubkey) { - try { a.nostrPk = wallet.nostrPubkey() || a.nostrPk; } catch {} + if (a.id === activeId && !wallet.watchOnly) { + // remember the identity the header actually SHOWS — a nostr login + // outranks the seed-derived key, locked or not + try { + a.nostrPk = (featureHook('nostrLoginIdentity') || {}).pubkey + || (wallet.nostrPubkey && wallet.nostrPubkey()) || a.nostrPk; + } catch {} } return { id: a.id, label: a.label, xpub: a.xpub, autoLock: a.autoLock || 0, network: a.network, nostrPk: a.nostrPk }; }); -- cgit v1.2.3