Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: display warning when sending zero tokens (#21091)
## **Description** This PR display a warning when the user attempts to send zero amount in tokens/native currency. ## **Manual testing steps** _1. Click on any token _2. Click Send _3. Enter zero as amount _4. Click next and notice the display of warning. ## **Screenshots/Recordings** ### **Before** ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/7f37a546-0c27-4e78-99b3-a739eff27986) ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/28e9d00f-b1a3-4230-b908-a013400b0175) ### **After** Sending zero ETH ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/8b81d6d1-6e7e-40a5-b80d-6410e929c56d) Sending zero token (DAI) ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/c4b03fdd-587b-46a7-8c55-8f39cf946c65) Not displayed when sending amount in ETH !== 0 ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/14e12b85-3cef-4c49-b2f6-39e1d086a30f) Not displayed when sending amount of tokens different than zero ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/ce179f3f-7925-490f-849b-bbde4eaa1a40) ## **Related issues** [_Fixes #MMASSETS-44](https://consensyssoftware.atlassian.net/browse/MMASSETS-44) ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained: - [x] What problem this PR is solving. - [x] How this problem was solved. - [x] How reviewers can test my changes. - [x] I’ve indicated what issue this PR is linked to: Fixes #??? - [x] I’ve included tests if applicable. - [x] I’ve documented any added code. - [x] 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)). - [ ] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **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.
- Loading branch information