fix: add wagmi v3 dedup override to prevent dual-context runtime error#733
Open
vinzenzLIFI wants to merge 2 commits into
Open
fix: add wagmi v3 dedup override to prevent dual-context runtime error#733vinzenzLIFI wants to merge 2 commits into
vinzenzLIFI wants to merge 2 commits into
Conversation
Two copies of wagmi@3 (3.6.11 and 3.6.12) were being bundled together in examples that use @lifi/widget-provider-ethereum. The WagmiProvider from one copy and useConfig from the other do not share the same React context, causing a WagmiProviderNotFoundError at runtime. Add a pnpm workspace override to collapse all wagmi@3.x to >=3.6.12 so a single copy is resolved across the workspace. Co-authored-by: Cursor <cursoragent@cursor.com>
efb600d to
ff57b1e
Compare
effie-ms
reviewed
May 18, 2026
| - 'packages/*' | ||
| - 'examples/*' | ||
| overrides: | ||
| wagmi: '>=3.6.12' |
Contributor
There was a problem hiding this comment.
I think I would vote for ^3.6.12 here, because usually we update major versions of wagmi manually (lots of breaking changes).
But I don't think we would update it blindly in any case even with >=, so for this particular use case it is just a note, optional.
effie-ms
approved these changes
May 18, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Linear task is linked to this PR?
N/A — regression fix discovered during E2E test setup.
Why was it implemented this way?
After the
chore: bump packages (#728)PR, two copies of wagmi@3 ended up being installed across the workspace:wagmi@3.6.11— resolved for@lifi/widget-provider-ethereum'swagmi: ^3.xpeer depwagmi@3.6.12— resolved for example apps that explicitly pinwagmi: ^3.6.12When these examples are built by Vite, both copies end up in the bundle. The
WagmiProviderfrom wagmi@3.6.11 anduseConfigfrom wagmi@3.6.12 use different React context objects, souseConfigcannot find the provider and throwsWagmiProviderNotFoundErrorat runtime. This caused the widget error boundary to fire immediately on page load.The fix adds a single line to
pnpm-workspace.yaml:This collapses all wagmi@3 resolutions to a single 3.6.12 copy across the workspace. No workspace package directly depends on wagmi@2.x, so this does not affect other packages.
Visual showcase (Screenshots or Videos)
N/A — the visible symptom before the fix was an immediate "Something went wrong!" error boundary on affected examples (nft-checkout, vite-iframe, vite-iframe-wagmi).
Checklist before requesting a review
Made with Cursor