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
This commit is contained in:
Gigi
2025-10-16 22:34:18 +02:00
parent bf849c9faa
commit 91a827324d

View File

@@ -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
})
}
}