walletconnect is not working since the new update
Current Behavior
Cannot use walletconnect on mobile.
Expected Behavior
Connecting to our dapp with mobile through walletconnect.
Steps To Reproduce
- pnpm i @web3-onboard/walletconnect
- const walletConnect = walletConnectModule({ version: 2, handleUri: uri => console.log(uri), projectId: {ID}, // from walletconnect cloud requiredChains: [1, 56, 137, 1101], dappUrl: my_dapp_url, });
- // Initialize onboard const onboard = Onboard({ wallets: [injected, walletConnect, coinbaseWalletSdk], chains: [polygonMainnet, arbitrum, ethereum, zkEVM], appMetadata: appMetadata, accountCenter: { desktop: { position: "topRight", enabled: false, minimal: false, }, mobile: { position: "bottomLeft", enabled: false, minimal: false, }, }, });
When i try to connect on mobile it gives me a namespaces error. I created a project on walletconnect cloud also and using the project id from there.
What package is effected by this issue?
@web3-onboard/walletconnect
Is this a build or a runtime issue?
N/A
Package Version
2.4.6
Node Version
v18.17.1
What browsers are you seeing the problem on?
Firefox, Chrome, Safari, Microsoft Edge
Relevant log output
No response
Anything else?
No response
Sanity Check
- [X] If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@swan-of-bodom I was able to connect to WC using your same init with our dappUrl and projectId. This leads me to believe it may be a pnpm issue or potentially a typo in the namespace input on the walletconnect cloud front. Can you try using yarn or npm? A reproducible example would be very helpful. You may also want to reach out to the WC team for support as the issue seems to be within the connection pipeline.
Same symptom for me. I'm using yarn and WC 2.5.3 .
The console spits out: (related to unstorage.dist)
"index.mjs:151 Uncaught (in promise) TypeError: Object(...) is not a function
at index.mjs:151:1
at async _.getItem (validators.ts:40:1)
at async O (validators.ts:40:1)"
Connecting OnBoard with other wallets is fine.
https://stackoverflow.com/questions/76597493/walletconnect-suddenly-unable-to-connect-trust-wallet-via-pc-or-mobile
Seems like WC has discontinued the support for the bridge.walletconnect.org etc.
@nblogist Walletconnect discontinued support for their bridge last year. There are other bridges but we have opted to remove support for bridging through WC as recommended by the WC team.