Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The library callback didFailToConnect even if the session if approved #136

Open
siavkuong opened this issue Oct 12, 2022 · 0 comments
Open

Comments

@siavkuong
Copy link

siavkuong commented Oct 12, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant