useDApp icon indicating copy to clipboard operation
useDApp copied to clipboard

WalletConnectV2Connector fails to communicate with iframe

Open kubasulek2 opened this issue 2 years ago • 6 comments

Describe the bug After switching to WalletConnectV2Connector I'am receiving cors errors in communication between application and WalletConnect Iframe:

index.es.js:1 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://verify.walletconnect.com') does not match the recipient window's origin ('http://localhost:3000')

After scanning QR code with wallet app on mobile nothing happens. My suspicion is that the reason behind it is lack of communication between application and iframe.

To Reproduce Config:

Screenshot 2023-07-05 at 10 28 00

Rpc urls:

  • Mainnet: https://bsc-dataseed2.binance.org/
  • BSC: https://fragrant-falling-feather.bsc.quiknode.pro/722dbb4bcf7924f7921729a8f4116274f070d1cc/
  • BSCTestnet: https://data-seed-prebsc-1-s1.binance.org:8545/

Software versions

kubasulek2 avatar Jul 05 '23 10:07 kubasulek2

Facing the same issue, shows connected to [missing{title}] in the metamask app, but nothing reflects and modal is still opened

nv08 avatar Jul 06 '23 04:07 nv08

Any update here?

nv08 avatar Jul 07 '23 13:07 nv08

Is someone looking into this bug?? @kubasulek2

nv08 avatar Jul 12 '23 04:07 nv08

Updating to 1.0.4 solved the issue

kubasulek2 avatar Jul 14 '23 12:07 kubasulek2

"@usedapp/core": "^1.2.7", "@usedapp/wallet-connect-v2-connector": "^1.0.4",

Already using 1.0.4 version.
the flow i face is it shows the connect modal inside metamask but not connects the account

@kubasulek2

nv08 avatar Jul 14 '23 13:07 nv08

Solution:-

  1. Removed useDapp + all bulky dependencies.
  2. Switched to Web3modal + Wagmi.

Benefits:-

  1. increased LH score from 15 - 61
  2. works for all desktop and mobile devices
  3. amazingly fast

nv08 avatar Jul 16 '23 10:07 nv08