You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WalletConnect provider in @txnlab/use-wallet incorrectly includes all Algorand networks supported by the library (mainnet, testnet, betanet, fnet, etc.) in the requiredNamespaces in new session proposals via the Sign Client's connect method.
Expected Behavior
The WalletConnect session proposal should only include the CAIP-2 chain ID for the currently active network in requiredNamespaces.
Current Behavior
The session proposal includes chain IDs for all supported networks in requiredNamespaces, causing issues with wallets that don't support all of the included networks.
Reproduction
Configure @txnlab/use-wallet to connect to mainnet (network: NetworkId.MAINNET)
Attempt to connect with Edge Wallet using the WalletConnect provider
The app will throw an error since the wallet does not support testnet, betanet, etc
Environment
@txnlab/use-wallet version: 3.7.1
@walletconnect/sign-client version: 2.16.1
Suggested Solution
Implement a new activeChainId getter in the WalletConnect class that returns the CAIP-2 chain ID for the currently active network. Use this getter when creating the session proposal to ensure only the active network's chain ID is included in requiredNamespaces.
The text was updated successfully, but these errors were encountered:
Bug Description
The WalletConnect provider in
@txnlab/use-wallet
incorrectly includes all Algorand networks supported by the library (mainnet, testnet, betanet, fnet, etc.) in therequiredNamespaces
in new session proposals via the Sign Client'sconnect
method.Expected Behavior
The WalletConnect session proposal should only include the CAIP-2 chain ID for the currently active network in
requiredNamespaces
.Current Behavior
The session proposal includes chain IDs for all supported networks in
requiredNamespaces
, causing issues with wallets that don't support all of the included networks.Reproduction
@txnlab/use-wallet
to connect to mainnet (network: NetworkId.MAINNET
)Environment
@txnlab/use-wallet
version: 3.7.1@walletconnect/sign-client
version: 2.16.1Suggested Solution
Implement a new
activeChainId
getter in the WalletConnect class that returns the CAIP-2 chain ID for the currently active network. Use this getter when creating the session proposal to ensure only the active network's chain ID is included inrequiredNamespaces
.The text was updated successfully, but these errors were encountered: