From 230e5380ca793074ee428d2c7cd94314c11d8362 Mon Sep 17 00:00:00 2001 From: Gigi Date: Fri, 17 Oct 2025 01:05:13 +0200 Subject: [PATCH] chore(bunker): expand debug logs for NIP-46 publish/subscribe (tags, content length) --- src/App.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 6b169f51..b39477db 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -312,12 +312,23 @@ function App() { // IMPORTANT: bind originals to preserve `this` context used internally by the signer const originalPublish = (recreatedSigner as any).publishMethod.bind(recreatedSigner) ;(recreatedSigner as any).publishMethod = (relays: string[], event: any) => { - try { console.log('[bunker] publish via signer:', { relays, kind: event?.kind, tags: event?.tags?.length }) } catch {} + try { + const summary = { + relays, + kind: event?.kind, + // include tags array for debugging (NIP-46 expects method tag) + tags: event?.tags, + contentLength: typeof event?.content === 'string' ? event.content.length : undefined + } + console.log('[bunker] publish via signer:', summary) + } catch {} return originalPublish(relays, event) } const originalSubscribe = (recreatedSigner as any).subscriptionMethod.bind(recreatedSigner) ;(recreatedSigner as any).subscriptionMethod = (relays: string[], filters: any[]) => { - try { console.log('[bunker] subscribe via signer:', { relays, filters }) } catch {} + try { + console.log('[bunker] subscribe via signer:', { relays, filters }) + } catch {} return originalSubscribe(relays, filters) }