Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: display conversion rate (#21185)
## **Description** This PR solves one bug shown in this github issue: #20106 When you try to send a token, on Polygon, it does not show the conversion of the amount, it just shows "ETH". If you chose "FIAT" in the settings=>general, this issue does not occur. This only happens when you choose crypto. PS: I have also noticed this issue on BNB chain. On Ethereum network, all works fine. If you try to send a token on other chains, you won't be able to see the conversion correctly and it will always just show "ETH". ## **Manual testing steps** _1. Chose polygon network _2. Go to settings => General and choose "MATIC" as the primary currency. _3. Go back to the home screen and choose a token to send (exp USDC) _4. Click on the "send" button and choose an account _5. Notice that if you type "5" in the amount input, you will see "ETH" as the conversion of that amount. (The same steps are applicable on BNB chain) ## **Screenshots/Recordings** _If applicable, add screenshots and/or recordings to visualize the before and after of your change._ ### **Before** On Polygon ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/56959e21-d14c-4cc4-a950-46ec240476dd) On BNB ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/de6aac12-b250-4b56-b1d2-4f38c21fd6c2) ### **After** On Polygon: ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/19ed9179-0f55-4f90-8c9b-4cc8ee49f1a1) On BNB: ![image](https://github.com/MetaMask/metamask-extension/assets/10994169/8c5819f3-62e5-4156-9e76-406c760c8827) ## **Related issues** (_Fixes #MMASSETS-26)[https://consensyssoftware.atlassian.net/browse/MMASSETS-26] ## **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