debug: enable NostrConnectSigner logging to diagnose decrypt hang

- Add detailed logging for signer subscription opening
- Enable debug logs for NostrConnectSigner via localStorage
- This will show if requests are being sent and responses received
- Helps diagnose why decrypt requests hang indefinitely
This commit is contained in:
Gigi
2025-10-16 22:40:00 +02:00
parent 1032a46456
commit a79d7f9eaf
2 changed files with 10 additions and 0 deletions

View File

@@ -195,6 +195,11 @@ function App() {
NostrConnectSigner.pool = pool
pool.group(RELAYS)
// Enable debug logging for NostrConnectSigner
if (typeof localStorage !== 'undefined') {
localStorage.setItem('debug', '*NostrConnectSigner*')
}
// Load persisted accounts from localStorage
try {
const accountsJson = localStorage.getItem('accounts')

View File

@@ -67,11 +67,16 @@ export async function reconnectBunkerSigner(
// Open signer subscription if not already listening
if (!account.signer.listening) {
console.log('[bunker] Opening signer subscription for NIP-46 responses...')
await account.signer.open()
console.log('[bunker] ✅ Signer subscription active, listening for bunker responses')
} else {
console.log('[bunker] Signer already listening')
}
// Mark as connected (bunker remembers permissions from initial connection)
account.signer.isConnected = true
console.log('[bunker] Signer marked as connected, ready for signing/decryption')
// Expose nip04/nip44 at account level for compatibility
// This allows bookmark decryption to work without accessing account.signer