-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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]: Unable send any token after update Metamask to 12.5.0 #28112
Comments
Thanks for the report! Update: we've since been able to reproduce in a wider variety of situations, not just Trezor. |
Hi @gades When you get to the send screen and it says you have zero tokens, are you still able to enter an amount of tokens and click "Continue"? I see the same problem you see, with the balance shown as 0, but I was still able to to enter and amount and click continue. See the video below, and let me know if it is working differently for you: Screencast.2024-10-28.16.27.57.mp4 |
## **Description** Fixes an issue where token balance showed as 0 during send flow. This occurred when clicking the token in the token list, then clicking the send button from the token details page. When going send first and then picking a token, picking `decimals` was a number: ![image](https://github.com/user-attachments/assets/95d32a68-1076-4050-b129-187672694794) But when going token first and then clicking send , `decimals` was a string and skipped calculating the balance. ![image](https://github.com/user-attachments/assets/99a8fcd4-bd29-4969-b98d-6639d50553ff) `calcTokenAmount` seems to work with either string or number, so changing logic from #27083 which introduced the number check [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28136?quickstart=1) ## **Related issues** Fixes: #28112 ## **Manual testing steps** 1. Click on an erc20 token on the token list 2. Click the send button on the token details page 3. Choose a destination account 4. The balance under the asset picker should be accurate ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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.
## **Description** Fixes an issue where token balance showed as 0 during send flow. This occurred when clicking the token in the token list, then clicking the send button from the token details page. When going send first and then picking a token, picking `decimals` was a number: ![image](https://github.com/user-attachments/assets/95d32a68-1076-4050-b129-187672694794) But when going token first and then clicking send , `decimals` was a string and skipped calculating the balance. ![image](https://github.com/user-attachments/assets/99a8fcd4-bd29-4969-b98d-6639d50553ff) `calcTokenAmount` seems to work with either string or number, so changing logic from #27083 which introduced the number check [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28136?quickstart=1) ## **Related issues** Fixes: #28112 ## **Manual testing steps** 1. Click on an erc20 token on the token list 2. Click the send button on the token details page 3. Choose a destination account 4. The balance under the asset picker should be accurate ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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.
Cherry-picks #28136 (1fd9510). Original PR description: ## **Description** Fixes an issue where token balance showed as 0 during send flow. This occurred when clicking the token in the token list, then clicking the send button from the token details page. When going send first and then picking a token, picking `decimals` was a number: ![image](https://github.com/user-attachments/assets/95d32a68-1076-4050-b129-187672694794) But when going token first and then clicking send , `decimals` was a string and skipped calculating the balance. ![image](https://github.com/user-attachments/assets/99a8fcd4-bd29-4969-b98d-6639d50553ff) `calcTokenAmount` seems to work with either string or number, so changing logic from #27083 which introduced the number check [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28136?quickstart=1) ## **Related issues** Fixes: #28112 ## **Manual testing steps** 1. Click on an erc20 token on the token list 2. Click the send button on the token details page 3. Choose a destination account 4. The balance under the asset picker should be accurate ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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. <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28151?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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. Co-authored-by: Brian Bergeron <brian.e.bergeron@gmail.com>
Describe the bug
I have on my wallet a different tokens and after update metamask to 12.5.0 from 12.4.2 I can't sent tokens (CAKE and others ) to other address because I see 0 tokens on sent screen
Expected behavior
Screenshots/Recordings
No response
Steps to reproduce
Error messages or log output
No response
Detection stage
In production (default)
Version
12.5.0
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
Trezor
Additional context
No response
Severity
No response
The text was updated successfully, but these errors were encountered: