Skip to content

BitcoinWalletConnectConnector does not handle bip122_addressesChanged session events #5561

@jungcome7

Description

@jungcome7

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

  1. Connect a Bitcoin wallet via WalletConnect (BIP122 namespace)
  2. In the wallet, switch to a different account/key
  3. The wallet correctly calls signClient.update() with updated namespaces and emits bip122_addressesChanged event
  4. The dApp's useAppKitAccount address 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_addressesChanged event immediately after connection approval of a BIP122 chain. Additionally, wallets should emit a bip122_addressesChanged event 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

Environment

  • @reown/appkit: 1.8.18
  • @reown/appkit-adapter-bitcoin: 1.8.18
  • @walletconnect/universal-provider: 2.23.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions