mirror of
https://github.com/dergigi/boris.git
synced 2026-01-23 00:34:23 +01:00
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:
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user