AlphaWallet / alpha-wallet-ios

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

Unable to connect wallet to Etherscan "revoke feature" to canx ETH Unlimited Contracts #2782

Open sharonsylu opened 3 years ago

sharonsylu commented 3 years ago

User reported bug via support: Cannot connect to wallet to Etherscan, objective is to revoke Uniswap approval (Unlimited ERC20 allowances!)

Message: Hi I have a problem to revoke UNI Swap access to my founds, please help me. https://etherscan.io/tokenapprovalchecker?search=0x39063c32ebef4b026609ef841b8203e52de68630

Steps to reproduce the behaviour:

  1. Tap Browser
  2. Insert Etherscan Contract url: https://etherscan.io/tokenapprovalchecker?search=0x39063c32ebef4b026609ef841b8203e52de68630
  3. Cannot connect wallet ---> cannot show

My screenshot where I've replicated the UX: Screenshot_20210521-110313_AlphaWallet

Interim workaround:

Quick fix for this user to stay inside Alphawallet -

  1. ask user to navigate Browser
  2. use this Url Eth Allowance / Revocation tool: https://james-sangalli.github.io/eth-allowance/
  3. Wallet should automatically connect (To be confirmed, waiting for user to respond)
  4. User to click "revoke all allowances"

Screenshot_20210521-121252_AlphaWallet

Resolution:

Background:

Etherscan has a new Token Approvals feature released (2 months). https://info.etherscan.com/tokenapprovals/

Unproven projects with novel yield farming have reaped more and more token allowances - to the point where they just start stealing user tokens. Reading: https://kalis.me/unlimited-erc20-allowances/

sharonsylu commented 3 years ago

Note: this ticket is replicated in both iOS and Android pending user confirmation of version iOS ticket: https://github.com/AlphaWallet/alpha-wallet-ios/issues/2782 Android ticket: https://github.com/AlphaWallet/alpha-wallet-android/issues/1852

hboon commented 3 years ago

Looks like it's designed to work with MetaMask and in particular on the desktop.

It's at least checking for these:

window.ethereum.isMetaMask
window.ethereum.chainId == '0x1'

And a lesser problem is it doesn't fit on narrow (mobile) screens.

We can write them and ask them support web3 more generally, not checking specifically for MetaMask.


To summarize, it's a limitation of the dapp, but:

A product decision here. I think we might [1] be able to have a hackish solution in such cases that helps by forcing those properties to be valid for this particular dapp. (Sent an email titled "Do we do what it takes to fix dapps in our dapp browsers so more of them work?")

[1] to be explored and verified if we proceed with this path