hyperlane-xyz / hyperlane-warp-ui-template

A web app template for building Hyperlane Warp Route UIs
https://hyperlane-warp-template.vercel.app
Other
93 stars 82 forks source link

Support OKX wallet / explicitly surface Keplr errors #85

Open tkporter opened 8 months ago

tkporter commented 8 months ago

Someone in Discord was having intermittent issues with Keplr wallet. They also had the OKX wallet installed. Sometimes when trying to connect to Keplr, the OKX wallet would silently take precedence. The addresses in the side panel would relate to the OKX wallet addresses despite saying "Keplr" on them. We should:

Context

jmrossy commented 7 months ago

I tested this with the latest wagmi/rainbowkit (branch off https://github.com/hyperlane-xyz/hyperlane-warp-ui-template/pull/89) and I don't see any errors. It's possible this issues was fixed in a recent update.

jmrossy commented 4 months ago

Reopening to further investigate OKX issues

jmrossy commented 4 months ago

I've done some more testing with OKX mixed with other wallets in Chrome:

So TLDR, I can confirm OKX is willing to masquerade as another wallet but I can't repro the exact issue the user saw. It's possible that some users are clicking the Keplr option without realizing they don't have it installed, causing it to actually connect to OKX instead.

AFAI can tell, there is no way to differentiate from Metamask/Keplr vs OKX when OKX is impersonating those other wallets.

I'm testing with the latest version of all extensions. Maybe this bug requires an older version.

In terms of next steps, if I can't get any a reproduction of the bug, I don't think I can look for workarounds. We could try UX solutions, like forcing a confirmation modal for the user to accept.

Finally, I'll just add that the Warp UI is not the only DApp feeling this pain. There's an EIP that Pedro from WalletConnect has been leading which alleviates it but wallets must each buy-in: https://twitter.com/pedrouid/status/1765822163829862589