This PR enhances the WalletConnect class by implementing an activeChainId getter to dynamically determine the correct CAIP-2 chain ID based on the active network. The connect and signTransactions methods have been updated to use this getter, ensuring that only the chain ID for the currently active network is included in session proposals and transaction signing requests.
Details
Added activeChainId getter to WalletConnect class
Removed this.chains property from WalletConnect class
Updated connect method to use activeChainId in requiredNamespaces
Updated signTransactions method to use activeChainId
Removed chains parameter from WalletConnectModal initialization
Added tests for activeChainId getter and its usage in connect and signTransactions methods
Description
This PR enhances the
WalletConnect
class by implementing anactiveChainId
getter to dynamically determine the correct CAIP-2 chain ID based on the active network. Theconnect
andsignTransactions
methods have been updated to use this getter, ensuring that only the chain ID for the currently active network is included in session proposals and transaction signing requests.Details
activeChainId
getter toWalletConnect
classthis.chains
property fromWalletConnect
classconnect
method to useactiveChainId
inrequiredNamespaces
signTransactions
method to useactiveChainId
chains
parameter fromWalletConnectModal
initializationactiveChainId
getter and its usage inconnect
andsignTransactions
methodsactiveChainId
Closes #281