feat(@desktop/wallet): Display for L1 fees on a transaction as per design

fixes #14208
This commit is contained in:
Khushboo Mehta 2024-07-04 17:39:17 +02:00 committed by Khushboo-dev-cpp
parent 1ebdbde5c3
commit 429a2af66e
1 changed files with 5 additions and 3 deletions

View File

@ -50,11 +50,13 @@ Item {
statusListItemIcon.opacity: modelData.isFirstSimpleTx
title: qsTr("%1 transaction fee").arg(root.getNetworkName(modelData.fromNetwork))
subTitle: {
let fee = root.formatCurrencyAmount(totalGasAmountEth, Constants.ethToken)
let primaryFee = root.formatCurrencyAmount(totalGasAmountEth, Constants.ethToken)
if (modelData.gasFees.eip1559Enabled && modelData.gasFees.l1GasFee > 0) {
fee += "\n(L1 %1)".arg(root.formatCurrencyAmount(totalGasAmountL1Eth, Constants.ethToken))
return qsTr("L1 fee: %1\nL2 fee: %2")
.arg(root.formatCurrencyAmount(totalGasAmountL1Eth, Constants.ethToken))
.arg(primaryFee)
}
return fee
return primaryFee
}
property double totalGasAmountL1Eth: {
const l1FeeInGWei = modelData.gasFees.l1GasFee