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
This commit is contained in:
Gigi
2025-10-16 22:44:56 +02:00
parent a76b703d36
commit 7bd11e695e

View File

@@ -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 {