blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
831 stars 490 forks source link

@web3-onboard/walletconnect above 2.4.6 doesn't work #2066

Open piekczyk opened 7 months ago

piekczyk commented 7 months ago

Current Behavior

Config:

   "next": "13.5.5",
    "@web3-onboard/coinbase": "^2.2.5",
    "@web3-onboard/core": "^2.21.1",
    "@web3-onboard/gnosis": "^2.2.0",
    "@web3-onboard/injected-wallets": "^2.10.6",
    "@web3-onboard/ledger": "^2.5.2",
    "@web3-onboard/react": "^2.8.12",
    "@web3-onboard/trezor": "^2.4.3",
    "@web3-onboard/walletconnect": "2.5.3",
    "@web3-onboard/web3auth": "^2.2.3",
const walletConnect = walletConnectModule({
  projectId: 'ourProjectId', // it's failing even with hardcoded string
  version: 2,
  dappUrl: 'ourUrl',
})

When running app locally everything works as expected. Once deployed to staging / prod environment projectId is missing in query as in example below and therefore it's impossible to connect a wallet.

https://explorer-api.walletconnect.com/w3m/v1/getDesktopListings?projectId=&sdkType=wcm&sdkVersion=js-2.6.2&page=1&entries=9&version=2

If we downgrade walletconnect package version to 2.4.6 everything works as expected.

Weirdly enough a request before request mentioned above contains project id and returns 200. https://verify.walletconnect.org/ourProjectId

Expected Behavior

Wallet connection working on package version above 2.4.6

Steps To Reproduce

Use Next.js app. Prep config in the way described above. Deploy it somewhere and try to use wallet connect modal.

What package is effected by this issue?

@web3-onboard/walletconnect": "2.5.3

Is this a build or a runtime issue?

Runtime

Package Version

2.5.3

Node Version

18

What browsers are you seeing the problem on?

Chrome

Relevant log output

{"error":"Missing projectId query parameter"}

Anything else?

No response

Sanity Check

Adamj1232 commented 6 months ago

@piekczyk can you provide a repo I can use/test with?