fix: Configure WalletConnect to use Grimoire's relay pool

Fixes missing subscription method error by wiring WalletConnect to use
Grimoire's singleton RelayPool for Nostr communication.

WalletConnect requires relay subscription and publish methods to
communicate with NWC wallet services. By setting the static pool property,
all WalletConnect instances automatically use Grimoire's existing relay
infrastructure for managing connections.

This enables:
- Wallet service discovery (waitForService)
- NIP-47 request/response communication (kinds 23194/23195)
- Balance queries, invoice generation, payment operations
- Proper relay connection management via the existing pool
This commit is contained in:
Claude
2026-01-14 19:39:02 +00:00
parent 378696371b
commit 2b0eac726d

View File

@@ -1,5 +1,9 @@
import { WalletConnect } from "applesauce-wallet-connect";
import { BehaviorSubject } from "rxjs";
import pool from "./relay-pool";
// Configure WalletConnect to use Grimoire's relay pool
WalletConnect.pool = pool;
export type WalletConnectionInfo = {
id: string; // Unique identifier