[Development Tip] Deeplink retry #1257
christopherferreira9
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As you may know, when dealing with a mobile to mobile experience, the MetaMask SDK takes advantage of deeplinks in order to take the user from a dapp to the MetaMask mobile wallet.
The main inconvenience with this is that both Android and iOS present a default dialog on the device that the user needs to tap in order to jump from one place to another such as:
If a user then dismisses the dialog above the deeplink action then gets
lost
which means that the user won't be able to be directed to the wallet.Given this, it doesn't necessarily mean that an RPC call doesn't reach the wallet, it still travels via websocket and so if the wallet is already in the background and connected it will display the request without the user knowing. A connection start on the other hand strictly relies on the deeplink to happen.
🤔 How do we solve this? How can we allow the user to recover from this state? (for this explanation, react will be used as an example)
openDeeplink
option in the SDKOptions object such as:hasPendingRequest
:This will serve as a workaround but doesn't take a way the fact that the SDK can implement a retry mechanism. For the time being, this needs to be handled on the client 🙏
Beta Was this translation helpful? Give feedback.
All reactions