mirror of
https://github.com/dergigi/boris.git
synced 2026-01-02 06:24:20 +01:00
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:
11
src/App.tsx
11
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 {
|
||||
|
||||
Reference in New Issue
Block a user