mirror of
https://github.com/dergigi/boris.git
synced 2026-01-01 14:04:19 +01:00
fix: properly connect NostrConnectSigner on reconnection
- Call signer.connect() instead of forcing isConnected - Add [bunker] logs for connect lifecycle - Should unblock nip44/nip04 decrypt calls that were timing out
This commit is contained in:
@@ -43,9 +43,16 @@ export async function reconnectBunkerSigner(
|
||||
if (!account.signer.listening) {
|
||||
await account.signer.open()
|
||||
}
|
||||
|
||||
// Mark as connected (bunker remembers permissions from initial connection)
|
||||
account.signer.isConnected = true
|
||||
|
||||
// Ensure the signer is connected to the remote signer
|
||||
// Important: do NOT set isConnected manually; establish connection properly
|
||||
try {
|
||||
console.log('[bunker] Connecting to bunker remote...')
|
||||
await account.signer.connect()
|
||||
console.log('[bunker] ✅ Connected to bunker remote')
|
||||
} catch (err) {
|
||||
console.error('[bunker] ❌ Failed to connect to bunker remote:', err)
|
||||
}
|
||||
|
||||
// Expose nip04/nip44 at account level (like ExtensionAccount does)
|
||||
if (!('nip04' in account)) {
|
||||
|
||||
Reference in New Issue
Block a user