-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Approve button disabled for Approvals of ERC20 tokens #10834
Comments
I tried this out in android emulator and could not replicate: Screen.Recording.2024-09-06.at.5.56.12.PM.mov |
So @jpuri , i think i've discovered the cause. I've reproduced it with your test dApp: https://metamask.github.io/test-dapp/
See new recording: |
@marctatham Samsung S24+, Android 14, MetMask 7.29.2 Swap on Base: approvePancakeAndroid.mp4Malicious ERC20 approval from test dapp: Uploading maliciousApprovalAndroid.mp4… ERC20 token approval from test dapp approvalAndroid.mp4 |
iPhone 15, iOS 17.5.1, MetaMask 7.29.0 Approvals from test dapp: iosApprovalTestdapp.movApproval from Pancake swaps: approvalIos.mp4Here you can see disabled 'Approve' button for a short time: disabledButton.mov |
Fascinating... thank you for your effort in attempting reproducing @sleepytanya I realise this is unconventional, but as this just is a one of our wallets we use for testing purposes and is very replaceable. If you are open to it, you can share your details with me and I would be open to sharing this wallet's privateKey with you to facilitate your debugging process. I have a vested interest in seeing this one solved. |
@marctatham @jpuri @bschorchit Unfortunately, we're unable to share test wallet details, but we're equally keen on delving into this bug. Uniswap, Base, in-app MetaMask browser, iPhone 15, iOS 17.5.1 USDC -> WETH - success usdcWethBase.mp4WETH -> 1Inch - weth1inchBase.movWETH <-> AXLUSDC - wethAxlusdc.mp4 |
Amazing that you are able to reproduce! If you could be so kind as to let me know when I can hope to see this fix in a new version, that would be appreciated |
@marctatham Sure! Will keep you updated. |
Hey @sleepytanya : I tried the above steps, but its is working for me: Screen.Recording.2024-09-13.at.5.10.33.PM.mov |
WETH <-> ERC20 works fine on Ethereum, seems like the bug is specific to Base. 'Approve' works on mainnet: Ethereum.mov'Approve' disabled on Base: base.mov |
I could replicate this issue on Base Sepolia, I found that this is happening we try to interact a token not present on base for instance I was trying to approve In these cases error is originating in |
cbETH -> WETH on Base, 'Approval' works: RPReplay_Final1726669208.MP4 |
in Tanya's case above, WETH should be present on Base, right? It seems approving WETH on Base has this issue on mobile, but not on extension. Is there something we might be doing on extension that we're not on mobile? |
Hey @bschorchit from @sleepytanya 's comment WETH transaction is workiing on mobile. |
The issue is caused by rate limiting in Base provider which causes query for user balance and asset details to fail. |
@jpuri what strikes me as key information is that
But performing the exact same transaction, using the exact same wallet but using the metamask chrome extension instead of the mobile app works without issue 🤔 |
@marctatham : yep that is valid point why its breaking in mobile only. We will check this further. |
## **Description** PR to fix the approve flow when users swap tokens. ## **Related issues** Fixes: #10834 ## **Manual testing steps** 1. Switch to base network 2. Swap WETH against any other token, exp USDC 3. See approval screen; it should have the buttons enabled and you should be able to see token icon and spending cap ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/d8be6306-be74-4c6c-8463-567f35ee891e ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/8382cc83-e4e7-42ce-b913-fcac7e906d4b ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Thank you to all of you involved in looking into this issue, it is appreciated 🙌 |
Describe the bug
This issue was already opened here: #6654
It has since been closed, however it is clearly still an issue
Behaviour:
Expected behavior
I should be able to approve the transaction, however the approve button is disabled 🙅
Screenshots/Recordings
Recording:
https://github.com/user-attachments/assets/7d2cb0f7-b346-4111-a59c-8572d6047b04
Steps to reproduce
Error messages or log output
Detection stage
In production (default)
Version
7.28.1
Build type
None
Device
Pixel 6, OS 15
Operating system
Android
Additional context
As this is expected behaviour the first time you're interacting with a token via the uniswap protocol, it means this will affect ALL users and completely block them from being able to use this sort of service.
In my opinion, this is High in terms of severity.
Severity
No response
The text was updated successfully, but these errors were encountered: