aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 };
});