rainbow-me / rainbowkit

The best way to connect a wallet 🌈 🧰
https://rainbowkit.com
MIT License
2.44k stars 655 forks source link

[bug][iOS] Connecting Trust Wallet opens Trust Bank SG app instead #2132

Open sarevok89 opened 3 months ago

sarevok89 commented 3 months ago

Is there an existing issue for this?

RainbowKit Version

2.1.4

wagmi Version

2.12.4

Current Behavior

Hi guys, I've just noticed that having installed both the Trust Wallet and Trust Bank SG apps on my iPhone and trying to connect to the Trust Wallet wallet using the 'connect' button opens the Singaporean bank app instead. On Android, I can select one of these 2 apps but on iOS, I cannot.

Can we anyhow help the Rainbowkit select the correct app?

Expected Behavior

It should open the Trust Wallet app

Steps To Reproduce

  1. Install on your iPhone both the Trust Wallet and Trust Bank SG apps
  2. Go to https://www.rainbowkit.com/docs/introduction, in the top-right corner press the 'connect' button, and select the Trust Wallet
  3. See that the incorrect app is launched

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

https://www.rainbowkit.com/docs/introduction

Anything else?

https://github.com/user-attachments/assets/84772db8-bb34-4a2f-95b2-c327644c2e3d

DanielSinclair commented 2 months ago

@sarevok89 This is unfortunately a rare edge case related to how iOS deep link schemas work. The trust:// scheme is not inherently reserved for Trust Wallet, and other apps can register the same deep link. iOS attempts to route around this based on which apps the user interacts with more frequently. In this case, it makes sense that you're seeing a clash when regularly interacting with both apps. Will keep this open as we investigate a workaround with a Universal Link for Trust Wallet