Fix copy issues related to layer 2 fee changes (#12667)

feature/default_network_editable
Dan J Miller 3 years ago committed by GitHub
parent 7069570979
commit 9bc07f5e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/_locales/en/messages.json
  2. 11
      ui/components/app/multilayer-fee-message/multi-layer-fee-message.js
  3. 2
      ui/pages/confirm-transaction-base/confirm-transaction-base.component.js

@ -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"

@ -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,
};

@ -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 {
<MultiLayerFeeMessage
transaction={txData}
layer2fee={hexMinimumTransactionFee}
nativeCurrency={nativeCurrency}
/>
),
!isMultiLayerFeeNetwork && (

Loading…
Cancel
Save