From 9bc07f5e6bef91b9590251ec9abc7c5451163b32 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 11 Nov 2021 20:45:43 -0330 Subject: [PATCH] Fix copy issues related to layer 2 fee changes (#12667) --- app/_locales/en/messages.json | 6 +++--- .../multilayer-fee-message/multi-layer-fee-message.js | 11 ++++++++--- .../confirm-transaction-base.component.js | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index f854956fb..84e09c001 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2853,13 +2853,13 @@ "message": "Base Fee (GWEI)" }, "transactionHistoryL1GasLabel": { - "message": "Total L1 gas fee" + "message": "Total L1 Gas Fee" }, "transactionHistoryL2GasLimitLabel": { - "message": "L2 gas limit`" + "message": "L2 Gas Limit" }, "transactionHistoryL2GasPriceLabel": { - "message": "L2 gas price`" + "message": "L2 Gas Price" }, "transactionHistoryMaxFeePerGas": { "message": "Max Fee Per Gas" diff --git a/ui/components/app/multilayer-fee-message/multi-layer-fee-message.js b/ui/components/app/multilayer-fee-message/multi-layer-fee-message.js index 605e9e541..6dc671c89 100644 --- a/ui/components/app/multilayer-fee-message/multi-layer-fee-message.js +++ b/ui/components/app/multilayer-fee-message/multi-layer-fee-message.js @@ -10,7 +10,11 @@ import { toNormalizedDenomination, } from '../../../../shared/modules/conversion.utils'; -export default function MultilayerFeeMessage({ transaction, layer2fee }) { +export default function MultilayerFeeMessage({ + transaction, + layer2fee, + nativeCurrency, +}) { const t = useContext(I18nContext); const [fetchedLayer1Total, setLayer1Total] = useState(null); @@ -21,7 +25,7 @@ export default function MultilayerFeeMessage({ transaction, layer2fee }) { const layer1TotalBN = toBigNumber.hex(fetchedLayer1Total); layer1Total = `${toNormalizedDenomination .WEI(layer1TotalBN) - .toString(10)} ETH`; + .toString(10)} ${nativeCurrency}`; } const totalInWeiHex = sumHexes( @@ -32,7 +36,7 @@ export default function MultilayerFeeMessage({ transaction, layer2fee }) { const totalBN = toBigNumber.hex(totalInWeiHex); const totalInEth = `${toNormalizedDenomination .WEI(totalBN) - .toString(10)} ETH`; + .toString(10)} ${nativeCurrency}`; useEffect(() => { const getEstimatedL1Fee = async () => { @@ -67,4 +71,5 @@ export default function MultilayerFeeMessage({ transaction, layer2fee }) { MultilayerFeeMessage.propTypes = { transaction: PropTypes.object, layer2fee: PropTypes.string, + nativeCurrency: PropTypes.string, }; diff --git a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js index 5c055ade4..d7168b233 100644 --- a/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -318,6 +318,7 @@ export default class ConfirmTransactionBase extends Component { showLedgerSteps, supportsEIP1559, isMultiLayerFeeNetwork, + nativeCurrency, } = this.props; const { t } = this.context; @@ -554,6 +555,7 @@ export default class ConfirmTransactionBase extends Component { ), !isMultiLayerFeeNetwork && (