decentraland / decentraland-connect

Connect your Ethereum wallet from different providers
6 stars 12 forks source link

Decentraland RPC does not work with WalletConnectV2 #51

Closed fzavalia closed 1 year ago

fzavalia commented 1 year ago
// Request

curl --request POST \
  --url 'https://rpc.decentraland.org/mainnet?project=walletconnect_v2' \
  --header 'Content-Type: application/json' \
  --header 'accept: application/json' \
  --header 'accept-language: en-US,en;q=0.9' \
  --header 'authority: rpc.decentraland.org' \
  --header 'dnt: 1' \
  --header 'origin: http://localhost:3000' \
  --header 'referer: http://localhost:3000/' \
  --header 'sec-ch-ua: "Not:A-Brand";v="99", "Chromium";v="112"' \
  --header 'sec-ch-ua-mobile: ?0' \
  --header 'sec-ch-ua-platform: "macOS"' \
  --header 'sec-fetch-dest: empty' \
  --header 'sec-fetch-mode: cors' \
  --header 'sec-fetch-site: cross-site' \
  --header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' \
  --data '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "test",
  "params": []
}'
// Response

HTTP/1.1 503 Service Unavailable
Cf-Ray: 7ba73e39cb7bab1d-EZE
Connection: close
Content-Length: 33
Content-Type: text/plain;charset=UTF-8
Date: Wed, 19 Apr 2023 18:34:41 GMT
Server: cloudflare
Strict-Transport-Security: max-age=15552000; includeSubDomains; preload
X-Content-Type-Options: nosniff

No Provider available for mainnet

Checking logs, it seems that the test rpc method is being called which seems to be unsupported.

{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"The method test does not exist/is not available"}}

Using WallectConnect default rpcs seem to work fine

fzavalia commented 1 year ago

Fixed in #58