From a284660986f3b38edc623e8d36917dbd05a76f10 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Mon, 19 Oct 2020 21:32:37 +0000 Subject: [PATCH 1/4] Version v8.1.2 --- CHANGELOG.md | 2 ++ app/manifest/_base.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a42139678..8c62aec15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Develop Branch +## 8.1.2 Mon Oct 19 2020 + ## 8.1.1 Tue Oct 13 2020 - [#9586](https://github.com/MetaMask/metamask-extension/pull/9586): Prevent build quote crash when swapping from non-tracked token with balance (#9586) - [#9592](https://github.com/MetaMask/metamask-extension/pull/9592): Remove commitment to maintain a public metrics dashboard (#9592) diff --git a/app/manifest/_base.json b/app/manifest/_base.json index 09bb58e6d..f32d4e9bb 100644 --- a/app/manifest/_base.json +++ b/app/manifest/_base.json @@ -68,6 +68,6 @@ "notifications" ], "short_name": "__MSG_appName__", - "version": "8.1.1", + "version": "8.1.2", "web_accessible_resources": ["inpage.js", "phishing.html"] } From d684c1b2e329830195c65bd5a5d9e35ecb2aa9cf Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 19 Oct 2020 19:40:03 -0230 Subject: [PATCH 2/4] Update changelog for v8.1.2 (#9645) All user-facing changes since v8.1.1 have been included. --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c62aec15..c2d1ff61c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ ## Current Develop Branch ## 8.1.2 Mon Oct 19 2020 +- [#9608](https://github.com/MetaMask/metamask-extension/pull/9608): Ensure QR code scanner works +- [#9624](https://github.com/MetaMask/metamask-extension/pull/9624): Help users avoid insufficient gas prices in swaps +- [#9614](https://github.com/MetaMask/metamask-extension/pull/9614): Update swaps network fee tooltip +- [#9623](https://github.com/MetaMask/metamask-extension/pull/9623): Prevent reducing the gas limit for swaps +- [#9630](https://github.com/MetaMask/metamask-extension/pull/9630): Fix UI crash when trying to render estimated time remaining of non-submitted transaction +- [#9633](https://github.com/MetaMask/metamask-extension/pull/9633): Update View Quote page to better represent the MetaMask fee ## 8.1.1 Tue Oct 13 2020 - [#9586](https://github.com/MetaMask/metamask-extension/pull/9586): Prevent build quote crash when swapping from non-tracked token with balance (#9586) From ff1e134ac9cc908027cd94ed0571aec44f89ae72 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 19 Oct 2020 20:58:48 -0230 Subject: [PATCH 3/4] Remove duplicate percent sign from MetaMask fee (#9647) 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. --- ui/app/pages/swaps/swaps.util.js | 2 -- ui/app/pages/swaps/view-quote/view-quote.js | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/app/pages/swaps/swaps.util.js b/ui/app/pages/swaps/swaps.util.js index 92d20556e..d1805c1cb 100644 --- a/ui/app/pages/swaps/swaps.util.js +++ b/ui/app/pages/swaps/swaps.util.js @@ -315,7 +315,6 @@ export function quotesToRenderableData (quotes, gasPrice, conversionRate, curren conversionRate, ) - const metaMaskFee = `0.875%` const slippageMultiplier = (new BigNumber(100 - slippage)).div(100) const minimumAmountReceived = (new BigNumber(destinationValue)).times(slippageMultiplier).toFixed(6) @@ -348,7 +347,6 @@ export function quotesToRenderableData (quotes, gasPrice, conversionRate, curren destinationTokenValue: formatSwapsValueForDisplay(destinationValue), isBestQuote: quote.isBestQuote, liquiditySourceKey, - metaMaskFee, feeInEth, detailedNetworkFees: `${feeInEth} (${feeInFiat})`, networkFees: feeInFiat, diff --git a/ui/app/pages/swaps/view-quote/view-quote.js b/ui/app/pages/swaps/view-quote/view-quote.js index 3ebb16803..da08f7615 100644 --- a/ui/app/pages/swaps/view-quote/view-quote.js +++ b/ui/app/pages/swaps/view-quote/view-quote.js @@ -22,6 +22,7 @@ import { getBalanceError, getCustomSwapsGas, getDestinationTokenInfo, + getMetaMaskFeeAmount, getSwapsTradeTxParams, getTopQuote, navigateBackToBuildQuote, @@ -200,7 +201,6 @@ export default function ViewQuote () { sourceTokenDecimals, sourceTokenSymbol, sourceTokenValue, - metaMaskFee, } = renderableDataForUsedQuote const { feeInFiat, feeInEth } = getRenderableGasFeesForQuote( @@ -341,6 +341,8 @@ export default function ViewQuote () { } }, [sourceTokenSymbol, sourceTokenValue, destinationTokenSymbol, destinationTokenValue, fetchParams, topQuote, numberOfQuotes, feeInFiat, bestQuoteReviewedEvent, anonymousBestQuoteReviewedEvent]) + const metaMaskFee = useSelector(getMetaMaskFeeAmount) + const onFeeCardTokenApprovalClick = () => { anonymousEditSpendLimitOpened() editSpendLimitOpened() From aa554f51397b77d5a72c67d15fd7822089b31e9c Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Mon, 19 Oct 2020 16:29:31 -0700 Subject: [PATCH 4/4] Fix estimated network fee line split (#9648) --- ui/app/pages/swaps/fee-card/index.scss | 5 +---- ui/app/pages/swaps/swaps.util.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ui/app/pages/swaps/fee-card/index.scss b/ui/app/pages/swaps/fee-card/index.scss index 262b7a5eb..0a86f6ab7 100644 --- a/ui/app/pages/swaps/fee-card/index.scss +++ b/ui/app/pages/swaps/fee-card/index.scss @@ -106,11 +106,8 @@ color: $Grey-500; } + &__row-header-secondary, &__row-header-secondary--bold { - margin-right: 16px; - } - - &__row-header-secondary { margin-right: 12px; } diff --git a/ui/app/pages/swaps/swaps.util.js b/ui/app/pages/swaps/swaps.util.js index d1805c1cb..32974d5b6 100644 --- a/ui/app/pages/swaps/swaps.util.js +++ b/ui/app/pages/swaps/swaps.util.js @@ -275,7 +275,7 @@ export function getRenderableGasFeesForQuote (tradeGas, approveGas, gasPrice, cu const ethFee = getValueFromWeiHex({ value: gasTotalInWeiHex, toDenomination: 'ETH', - numberOfDecimals: 6, + numberOfDecimals: 5, }) const rawNetworkFees = getValueFromWeiHex({ value: gasTotalInWeiHex,