-
Notifications
You must be signed in to change notification settings - Fork 182
Description
I tried the example app with a bunch of apps compatible with walletconnect and I encountered a common issue when the JSON of the response is not correctly formatted, the library callback didFailToConnect even if the session if approved.
here 3 examples of JSON where the peerMeta is null or not as expected:
{"id":1665480655442172,"jsonrpc":"2.0","result":{"accounts":["0x26319094e78a654d8436cc8b6387a74803667f11"],"approved":true,"chainId":1,"peerId":"9ae2083d-66ac-4309-927d-3a898f54c2c2","peerMeta":{"description":"0x26319094e78a654d8436cc8b6387a74803667f11","icons":[],"name":"NFT Account 1","url":""}}}
{"id":1665414764704848,"jsonrpc":"2.0","result":{"accounts":["0x26319094e78a654d8436cc8b6387a74803667f11"],"approved":true,"chainId":1,"networkId":0,"peerId":"2e52bca4-ac24-4ec7-bb0c-1f8b6752790f","peerMeta":null,"rpcUrl":""}}
{"id":1665151495041811,
"jsonrpc":"2.0",
"result":{"accounts":["0x219638E639C774d8C4D8aA6D8F6406C509778E65"],
"approved":true,
"chainId":1,
"networkId":0,
"peerId":"8a5b0989-0a5c-462f-8139-e23200fe0343",
"peerMeta":{
"data":{"description":"Eidoo Wallet",
"icons":["https://static.eidoo.io/images/eidoo-logo-green.svg"],
"name":"Eidoo",
"ssl":true,
"url":"https://eidoo.io"},
"relayProvider":"wss://relay.walletconnect.org"
},
"rpcUrl":""}
}
Would it be possible for the library to call back with success and client wallet info even with session info empty?