[BUG] Deeplinking on mobile wallets fails for signing transactions using wagmi
See original GitHub issueDescribe the bug
After connecting a wallet with connectkit
on a mobile device, if you attempt to sign either a transaction or message using the wagmi hooks, then the wallet app does not open and you stay in the browser. You also don’t get notifications to do anything so it looks like your app just hangs, but it’s waiting for the signing to happen.
To reproduce
https://codesandbox.io/s/condescending-euler-sluziu
This also happens when using a custom wagmi client config instead of getDefaultClient
.
Edit: An example in production can be found at https://drops.samking.studio, and the repo can be found here.
Expected behavior
When signing either a transaction or message using the wagmi hooks, the connected wallet app should open e.g. MetaMask mobile, or Rainbow etc. with the prompt to sign the transaction/message.
Screenshots
N/A
Environment details
iOS v16.1 and Safari
wagmi@0.7.5
connectkit@0.2.0
Additional context
If I just replace connectkit
with @rainbow-me/rainbowkit
then the wagmi hooks work perfectly on mobile.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Hey @samkingco, this is something we’re looking into. I was hoping to get this fix ready for the latest update but couldn’t quite figure out exactly why this issue is occuring.
So far I’ve discovered that if you create your own wagmi client instead of using our
getDefaultClient
helper it seems to resolve itself – but from what we can tell the returned value is perfectly fine.We will still be investigating this further and will let you know when we find a fix.
Hi, @lochie I too am having trouble with this issue. Can you please let me know your current situation?