From 7bd11e695ef847209f549f05f4614e6fcf7cf9b5 Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 16 Oct 2025 22:44:56 +0200 Subject: [PATCH] fix: use proper NostrConnectSigner setup per applesauce examples - Was setting NostrConnectSigner.pool (wrong approach) - Should set subscriptionMethod and publishMethod directly - Follows the pattern from applesauce/packages/examples/src/examples/signers/bunker.tsx - This is the correct way to wire up the signer with the relay pool --- src/App.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b0965ce0..5a33a871 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -192,13 +192,12 @@ function App() { // Create relay pool and set it up BEFORE loading accounts // NostrConnectAccount.fromJSON needs this to restore the signer const pool = new RelayPool() - NostrConnectSigner.pool = pool - pool.group(RELAYS) - // Enable debug logging for NostrConnectSigner - if (typeof localStorage !== 'undefined') { - localStorage.setItem('debug', '*NostrConnectSigner*') - } + // Setup NostrConnectSigner to use the pool's methods (per applesauce examples) + NostrConnectSigner.subscriptionMethod = pool.subscription.bind(pool) + NostrConnectSigner.publishMethod = pool.publish.bind(pool) + + pool.group(RELAYS) // Load persisted accounts from localStorage try {