Skip to content

fix(checkout-widgets): Fix WalletConnect NETWORK_ERROR on chain switch#2877

Merged
ermyas merged 1 commit into
mainfrom
fix/checkout-wc-network-changed-error
May 26, 2026
Merged

fix(checkout-widgets): Fix WalletConnect NETWORK_ERROR on chain switch#2877
ermyas merged 1 commit into
mainfrom
fix/checkout-wc-network-changed-error

Conversation

@ermyas
Copy link
Copy Markdown
Contributor

@ermyas ermyas commented May 26, 2026

Summary

Fix WEB3_PROVIDER_ERROR: network changed when connecting via WalletConnect to wallets that require a chain switch (e.g. Fireblocks vaults).

Detail and impact of the change

The WC connect callback in WalletList.tsx constructed WrappedBrowserProvider(ethereumProvider) without the 'any' network arg. Ethers pins the provider to the initial chain and throws NETWORK_ERROR on the next getNetwork() call once switchEthereumChain flips the underlying chain. Adding 'any' lets the provider track the live chain- the documented idiom for changeable networks (ethers v6 BrowserProvider docs).

Anything else worth calling out?

The pattern is already applied elsewhere in widgets-lib (convertToNetworkChangeableProvider, bridge's WalletAndNetworkSelector)

@ermyas ermyas requested a review from a team as a code owner May 26, 2026 02:25
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 26, 2026

View your CI Pipeline Execution ↗ for commit d5f7dec

Command Status Duration Result
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-26 04:52:15 UTC

@ermyas ermyas added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit 8a49fc2 May 26, 2026
14 of 16 checks passed
@ermyas ermyas deleted the fix/checkout-wc-network-changed-error branch May 26, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants