AlphaWallet / alpha-wallet-ios

An advanced Ethereum/EVM mobile wallet
https://www.alphawallet.com
MIT License
585 stars 360 forks source link

SushiSwap doesn't connect via WalletConnect in Chrome on iOS #2990

Closed hieronymus4826 closed 2 years ago

hieronymus4826 commented 2 years ago

No effect after scanning the QR code in Chrome.

Works perfectly fine in the app browser, but auto-connects via injection rather than prompting for options, such as WalletConnect and others.

Iphone SE, iOS version 14.6, AW 3.25

hboon commented 2 years ago

Checking the problem. But this part:

but auto-connects via injection rather than prompting for options, such as WalletConnect and others.

Ah. Bit of history for context and posterity:

Initially, dapps (can) check right away if there is a wallet provider injected (i.e. this is a dapp browser) and access the user's Ethereum address.

But this means it's possible for any site to figure out if the user is using a dapp browser, and if so, retrieve their Ethereum address and discover the contents of their wallet without the user knowing.

So a change was introduced in Ethereum wallets so the dapp has to make a call so the wallet app prompts the user for permission to "connect" and reveal the Ethereum address. This is one of the reasons for the "Connect" button and multiple variations of it (like choosing which wallet app/extension etc).

AlphaWallet supports this "connect" prompt, but it doesn't yet hide the address at the get go. i.e. dapps can still use the wallet and Ethereum address right way, but if they make the call to connect, AlphaWallet will just quietly let it since access has already been given.

I suppose some dapps (like SushiSwap) might first check if the Ethereum address is available and if it is, just use it (hence no prompt for connection or choice of wallet)

hboon commented 2 years ago

No effect after scanning the QR code in Chrome.

Works for me when I tried it with the latest TestFlight and and older version on the app store. Can you try to reproduce?

Could be due to sometimes WalletConnect not being stable?

hieronymus4826 commented 2 years ago

Thank you for taking the time to explain in-depth!

I've installed the testflight and tested Sushi again. I got WalletConnect error in Chrome every time I attempted in a 30 min period.

Just in case I tested all the other big Defi apps - Pancake, Uniswap and 1inch and they all connect fine, so whatever it is its the Sushi implementation.

The app is working perfectly fine in the in-app browser.