aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-15 15:55:06 -0700
committerAdam Soltys <[email protected]>2026-08-15 15:55:06 -0700
commit68aa01161907886b9b73f700671ca50fa5089371 (patch)
tree660bd7cdc26883df21f90349a1005bedbfc3a167
parent52fd47a6e1051f82008638822dbbec17f58b2dae (diff)
downloadcoinosv3-68aa01161907886b9b73f700671ca50fa5089371.tar.gz
coinosv3-68aa01161907886b9b73f700671ca50fa5089371.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_014tE4U5nEjGTQy8PwYqamfv
-rw-r--r--src/app.js9
1 files changed, 7 insertions, 2 deletions
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 };
});