-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
The BitcoinWalletConnectConnector does not listen for bip122_addressesChanged WalletConnect session events. When a wallet emits this event (e.g., after the user switches accounts), the dApp using AppKit does not reflect the address change in useAppKitAccount.
Steps to Reproduce
- Connect a Bitcoin wallet via WalletConnect (BIP122 namespace)
- In the wallet, switch to a different account/key
- The wallet correctly calls
signClient.update()with updated namespaces and emitsbip122_addressesChangedevent - The dApp's
useAppKitAccountaddress does not update
Expected Behavior
AppKit should listen for bip122_addressesChanged session events (and/or session_update) and update the connected account address accordingly, similar to how OKX/Unisat/SatsConnect connectors handle accountChanged events via this.emit('accountsChanged', [address]).
Current Behavior
Looking at BitcoinWalletConnectConnector.js, there is no session_event listener. Other connectors (OKXConnector, UnisatConnector, SatsConnectConnector) all bind to their respective wallet's account change events internally, but the WalletConnect connector does not handle the WC session event equivalent.
Reference
The BIP122 RPC spec states:
Wallets should emit a
bip122_addressesChangedevent immediately after connection approval of a BIP122 chain. Additionally, wallets should emit abip122_addressesChangedevent whenever a UTXO is spent or created for a connected account's addresses.
The wallet side is correctly emitting this event, but AppKit does not consume it.
Similar Issues
- [bug] Solana
WalletConnectProvidernot emittingaccountsChangedevents #3183 (Solana WalletConnectProvider not emittingaccountsChanged) - "accountsChanged" event does not fire #405 (
accountsChangedevent does not fire)
Environment
@reown/appkit: 1.8.18@reown/appkit-adapter-bitcoin: 1.8.18@walletconnect/universal-provider: 2.23.2