Remove duplicate percent sign from MetaMask fee#9647
Merged
Conversation
The MetaMask fee is shown with two percent signs on the view quote page, because the percent sign is embedded in the fee amount as well as in the localized message. The percent sign has been removed from the amount, and is now only in the localized message. This allows for different locales to display the percentage differently. Note that we should still do further deduplication, as the fee is currently hard-coded, fetched from the `/fee` endpoint, and embedded in each individual quote. Currently the fee embedded in the quote is not used, but the other two are.
Member
Author
Contributor
|
This was my mistake. I think we should just use the fee from the api. We could use |
Contributor
|
My above comment does not need to block this PR or release, but we will want to switch to the api value only before release to chrome store. |
Collaborator
Builds ready [1bcfa00]
Page Load Metrics (384 ± 46 ms)
|
tmashuang
previously approved these changes
Oct 19, 2020
The hard-coded MetaMask fee has been removed. The spot where this was used has been replaced with the fee in the swaps Redux slice, which is from the API `/fee` route.
Member
Author
|
@danjm I have updated this to remove the hard-coded fee, and use the API fee instead. It was a simple enough change. |
danjm
approved these changes
Oct 19, 2020
Collaborator
Builds ready [930f2cb]
Page Load Metrics (394 ± 45 ms)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


The MetaMask fee is shown with two percent signs on the view quote page, because the percent sign is embedded in the fee amount as well as in the localized message.
The fee amount used now comes from the API, and does not have a percent sign. The percent sign is now only in the localized message. This allows for different locales to display the percentage differently. The old hard-coded value with a percent sign embedded has been removed, as it is no longer used anywhere.