fix: add bunker relays to pool BEFORE recreating signer

- Bunker relays must be in pool when signer sets up publishMethod/subscriptionMethod
- Previously added after signer recreation, leaving pool incomplete
- This should fix decrypt operations that rely on publishMethod being set up correctly
- Same fix pattern as we used for signing
This commit is contained in:
Gigi
2025-10-16 23:59:14 +02:00
parent 38a014ef84
commit 7d33c3c024

View File

@@ -287,11 +287,6 @@ function App() {
// Replace the signer on the account
nostrConnectAccount.signer = recreatedSigner
console.log('[bunker] ✅ Signer recreated with pool context')
console.log("[bunker] Signer methods check:", {
hasSubscriptionMethod: !!(recreatedSigner as any).subscriptionMethod,
hasPublishMethod: !!(recreatedSigner as any).publishMethod,
hasMakeRequest: typeof (recreatedSigner as any).makeRequest === "function"
})
// Add bunker's relays to the pool so signing requests can be sent/received
const bunkerRelays = nostrConnectAccount.signer.relays || []