interface
interface copied to clipboard
Changing Chain does not work with all namespaces.
Bug Description When using the namespace system addressed in this pr: https://github.com/Uniswap/interface/pull/6802 and trying to change chains.
There is an error caused by this line:
const isConnectedToDesiredChain = provider.session.namespaces.eip155.accounts.some((account) => account.startsWith(`eip155:${desiredChainId}:`));
Cannot read properties of undefined (reading 'accounts')
Steps to Reproduce
- Connect over WalletConnect
- Change chain in the top left corner.
Expected Behavior The UI should update to the selected chain and allow for transactions.
Additional Context This was tested with Bifrost Wallet version (0.5.1).
@antondalgren I'm not seeing this code snippet you've shared--can you double check?