diff --git a/src/App.tsx b/src/App.tsx index 29cbe07d..27abf4b5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -301,6 +301,19 @@ function App() { // Replace the signer on the account nostrConnectAccount.signer = recreatedSigner console.log('[bunker] ✅ Signer recreated with pool context') + + // Debug: log publish/subscription calls made by signer (decrypt/sign requests) + const originalPublish = (recreatedSigner as any).publishMethod + ;(recreatedSigner as any).publishMethod = (relays: string[], event: any) => { + try { console.log('[bunker] publish via signer:', { relays, kind: event?.kind, tags: event?.tags?.length }) } catch {} + return originalPublish(relays, event) + } + const originalSubscribe = (recreatedSigner as any).subscriptionMethod + ;(recreatedSigner as any).subscriptionMethod = (relays: string[], filters: any[]) => { + try { console.log('[bunker] subscribe via signer:', { relays, filters }) } catch {} + return originalSubscribe(relays, filters) + } + // Just ensure the signer is listening for responses - don't call connect() again // The fromBunkerURI already connected with permissions during login diff --git a/src/services/bookmarkService.ts b/src/services/bookmarkService.ts index 76f7c974..eb5a6738 100644 --- a/src/services/bookmarkService.ts +++ b/src/services/bookmarkService.ts @@ -107,7 +107,14 @@ export const fetchBookmarks = async ( console.log('[bunker] 🔑 Signer has nip04:', hasNip04Decrypt(signerCandidate)) console.log('[bunker] 🔑 Signer has nip44:', hasNip44Decrypt(signerCandidate)) } - const { publicItemsAll, privateItemsAll, newestCreatedAt, latestContent, allTags } = await collectBookmarksFromEvents( + + // Debug relay connectivity for bunker relays + try { + const urls = Array.from(relayPool.relays.values()).map(r => ({ url: r.url, connected: (r as any).connected })) + console.log('[bunker] Relay connections:', urls) + } catch {} + +const { publicItemsAll, privateItemsAll, newestCreatedAt, latestContent, allTags } = await collectBookmarksFromEvents( bookmarkListEvents, activeAccount, signerCandidate