From 91a827324d75112d61dd746423063394397b155f Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 16 Oct 2025 22:34:18 +0200 Subject: [PATCH] fix: expose nip04/nip44 on NostrConnectAccount for bookmark decryption - NostrConnectSigner has nip04/nip44 but not exposed at account level - ExtensionAccount exposes these via getters, NostrConnectAccount didn't - Add properties dynamically during reconnection for compatibility - Enables private bookmark decryption with bunker accounts --- src/services/nostrConnect.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/services/nostrConnect.ts b/src/services/nostrConnect.ts index bbf5c6ab..e450afbe 100644 --- a/src/services/nostrConnect.ts +++ b/src/services/nostrConnect.ts @@ -46,5 +46,22 @@ export async function reconnectBunkerSigner( // Mark as connected (bunker remembers permissions from initial connection) account.signer.isConnected = true + + // Expose nip04/nip44 at account level for compatibility + // This allows bookmark decryption to work without accessing account.signer + if (!('nip04' in account)) { + Object.defineProperty(account, 'nip04', { + get() { return this.signer.nip04 }, + enumerable: true, + configurable: true + }) + } + if (!('nip44' in account)) { + Object.defineProperty(account, 'nip44', { + get() { return this.signer.nip44 }, + enumerable: true, + configurable: true + }) + } }