question: connection duration / stability #875
Unanswered
vonoro
asked this question in
Developer Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Thanks for the protocol! I came to ask about the walletconnect connection duration / stability / longevity, because it's a topic I have not seen covered in the docs (I'll be honest, they are not very good, which is likely part of the problem - but please don't take that personally 😃 ).
My situation is following: (step 1) I can connect my dapp to a wallet (tested with tokenPocket, metamask, imToken, trust) and right after that (step 2) ask the wallet to approve spending user's token. This works very reliably because the connection is "fresh" at that point.
However, things become unreliable if I perform this test scenario: (step 1), then kill the wallet app, wait for a few seconds and then do (step 2).
My questions are:
(A) is there some limit to how long the connection between a dapp and wallet will work? Does WC even consider such scenario? in https://docs.walletconnect.com/tech-spec#establishing-connection there are docs for establishing a connection but nothing about resuming an already established connection.
Let's say that I pair my dapp and a wallet, then kill those apps, come back a week later, open the dapp and try to sign a transaction (redirecting the user from my dapp to the wallet app) - is walletconnect designed so that it should still mediate that signing request?
(B) is this a goal or a non-goal?
(C) is walletconnect v2 improved in this respect?
I have done some testing with the aforementioned wallets and here are some observations when I perform the test scenario as given above.
Does WC relay server require message receipt acknowledgment from the wallet app and repeats its communication to the wallet in case no ack is received? I did not find this in the docs. If it's not the case, then I'm afraid that can cause reliability issues.
Debugging these issues is kinda hard because the integration steps from either side (dapp and wallet) are not properly documented (eg. this undocumented event), and involve multiple parties: dapp, walletconnect and wallet app (whose sources are not public).
Without clear docs (which state both goals and non-goals) and without automated test suites that would verify that the dapp and wallet implement the WC protocol correctly, I'm afraid the experience of using walletconnect will not be a pleasing one. The protocol itself, needs improvements too - these are the tests for the JS WS transport implementation which is a core part of WC.
related: #516, #683, MetaMask/metamask-mobile#3415
Thank you for your comments and insights.
PS: the docs search is broken: try, for example, using the search field to search for
InternalEvent
on this page https://docs.walletconnect.com/tech-spec#internal-events vs using ctrl/cmd + fBeta Was this translation helpful? Give feedback.
All reactions