-
-
Notifications
You must be signed in to change notification settings - Fork 204
bug: WalletConnect instance missing setStorage method #366
Comments
Do you have the project ID set on Vercel? |
Thanks for the answer @glitch-txs... I do, it's set. I changed the string to Thanks |
Do you have a minimal reproducible example repo to test it? |
Hi @glitch-txs , the error can be seen here: https://taiko-mono-bridge-ui-v2.vercel.app/. Take a look at the dev console. I uploaded the source maps. The wagmi configuration is created here: https://github.com/taikoxyz/taiko-mono/blob/main/packages/bridge-ui-v2/src/libs/wagmi/client.ts#L64 Thanks |
So it turned out that there was a problem with some packages and versions. I removed also "dependencies": {
"@web3modal/ethereum": "^2.6.2",
"@web3modal/html": "^2.6.2",
"viem": "^1.2.9",
"wagmi": "^1.3.5"
} This has fixed the problem 😊. Closing this ticket |
Is there an existing issue for this?
Current Behavior
I'm having a very strange issue that I cannot figure out and it's driving me crazy, so I'm hoping someone could shed some light on this. I'm using
Web3Modal
, which usesw3mConnectors
as connectors. This, under the hood, creates an array withInjectedConnector
andWalletConnectConnector
(since I'm using version 2) as seen here: https://github.com/WalletConnect/web3modal/blob/V2/chains/ethereum/src/utils.ts#L35.What's the problem? when I run this in my local all good (typical, right?). When I deploy this in Vercel, I get an exception because
WalletConnectConnector
instance is missingsetStorage
method, failing here: https://github.com/wagmi-dev/wagmi/blob/main/packages/core/src/config.ts#L124.The only thing I can think of is that I'm pulling the wrong version of some package. See screenshot of the
walletConnect
instance in my local (first item of the list):Now see screenshot of
walletConnect
in Vercel:Last one seems to have a slightly different interface, and if you go down the prototype, you don't see the method
setStorage
:Whereas in my local you see it:
Both my local and Vercel are building the project using Node 18.x. Following is the list of dependencies:
Please let me know if I can provide with some more information. What I'm hoping here is that someone might have an idea what the problem could be because I ran out of them.
Expected Behavior
WalletConnectConnector
instance extends Base connector, https://github.com/wagmi-dev/references/blob/e6fcfa938a95424a70f275409a6b620dfd7c980e/packages/connectors/src/base.ts, which contains the methodsetStorage
Steps To Reproduce
N/A
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
I'm testing in Chrome browser. The issue, as mentioned above, happens only when I deploy in Vercel. I don't have such issue when I run the dev environment nor when I run the production bundle in my local, so there must be something happening with the build on prod that might be pulling some wrong version?. I'm using Vite to build a SvelteKit project (Node 18.x). Following are the dev dependencies in case this is also needed:
Once again, I don't expect an answer to this issue, but some opinion. Thanks a lot
The text was updated successfully, but these errors were encountered: