-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
![Screenshot 2023-06-26 at 10 37 49](https://private-user-images.githubusercontent.com/613724/248734900-c268eba1-f8da-4355-8ea8-2c3f0b581af1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODkyNDYsIm5iZiI6MTczOTE4ODk0NiwicGF0aCI6Ii82MTM3MjQvMjQ4NzM0OTAwLWMyNjhlYmExLWY4ZGEtNDM1NS04ZWE4LTJjM2YwYjU4MWFmMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMjAyMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NDUyNmZmOGI2OGI4OWVlZmQ5MDllNjc4NDMyOGEzMzYzNjhmNDY3NTgxY2I3NTI0NTUxZmI3OWY1MjUzNDgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jHntgpTKfNXPjCMuUP2FKwSWUdn0UERUtWldEeysW1s)
walletConnect
instance in my local (first item of the list):Now see screenshot of
![Screenshot 2023-06-26 at 10 46 26](https://private-user-images.githubusercontent.com/613724/248736243-9b9d9ee9-46b1-4b6c-8df8-fb172b1475f7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODkyNDYsIm5iZiI6MTczOTE4ODk0NiwicGF0aCI6Ii82MTM3MjQvMjQ4NzM2MjQzLTliOWQ5ZWU5LTQ2YjEtNGI2Yy04ZGY4LWZiMTcyYjE0NzVmNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMjAyMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNTRhNjI0OGVlNzBkODdiYzhlYTE2MWMzZjEyYTc2YjllNDUxNmE1NGVjNjU1NGZkNjdiZjNmZWZiOTRhYmNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9BF6xzFOrPRfeZgqw3WN-20mPRhMaLlvkl66rfn_EtY)
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
![Screenshot 2023-06-26 at 10 43 58](https://private-user-images.githubusercontent.com/613724/248735527-a10486a7-3433-46ad-abf2-5c7e02cf89d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODkyNDYsIm5iZiI6MTczOTE4ODk0NiwicGF0aCI6Ii82MTM3MjQvMjQ4NzM1NTI3LWExMDQ4NmE3LTM0MzMtNDZhZC1hYmYyLTVjN2UwMmNmODlkNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMjAyMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iY2ZmZTRiZjhmYTVhNzY0MmExODQyYjg1YThjZjE1Mzk2OGVhZWRjOGUzNDBhMzA5OGJhMDQwODUyMTJkZGNmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.BP9VB39Uzb7UtZpXd-oIUVZTwSysSwQIbYbkRnZwIPg)
setStorage
:Whereas in my local you see it:
![Screenshot 2023-06-26 at 10 44 34](https://private-user-images.githubusercontent.com/613724/248735753-9cea86dc-6431-48be-aa1c-eafc59bc2d20.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODkyNDYsIm5iZiI6MTczOTE4ODk0NiwicGF0aCI6Ii82MTM3MjQvMjQ4NzM1NzUzLTljZWE4NmRjLTY0MzEtNDhiZS1hYTFjLWVhZmM1OWJjMmQyMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxMjAyMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZTgzZDhhOTMwYTVlMzRjZTFkYjZkMDk0MGJhYzA0MjIyMGM1NjRjNWE2YTcxNWQyN2I2YjQzYzdhNmZjZTJkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9EpU4cDNkPrqOgWhsliN-7Pp9aOPiYeo5WxS0GygTzM)
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: