File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 61
61
}
62
62
property double decimalTotalGasAmountL1: {
63
63
const l1FeeInGWei = modelData .gasFees .l1GasFee
64
- const l1FeeInEth = Utils .getGasDecimalValue (modelData .fromNetwork , l1FeeInGWei, modelData .gasAmount )
64
+ const l1FeeInEth = Utils .calculateGasCost (modelData .fromNetwork , l1FeeInGWei, modelData .gasAmount )
65
65
return l1FeeInEth
66
66
}
67
67
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ Rectangle {
72
72
id: gasSelector
73
73
width: parent .width
74
74
getGasNativeCryptoValue : function (gasPrice , gasAmount , chainId ) {
75
- return Utils .getGasDecimalValue (chainId, gasPrice, gasAmount)
75
+ return Utils .calculateGasCost (chainId, gasPrice, gasAmount)
76
76
}
77
77
getFiatValue: root .currencyStore .getFiatValue
78
78
formatCurrencyAmount: root .currencyStore .formatCurrencyAmount
Original file line number Diff line number Diff line change @@ -853,10 +853,10 @@ QtObject {
853
853
StatusQUtils .AmountsArithmetic .fromNumber (1 , rawDecimals - gasDecimals))
854
854
}
855
855
856
- function getGasDecimalValue (chainID , gasValue , gasLimit ) {
857
- let rawValue = nativeTokenGasToRaw (chainID, gasValue )
858
- rawValue = StatusQUtils .AmountsArithmetic .times (rawValue , StatusQUtils .AmountsArithmetic .fromNumber (gasLimit ))
859
- return nativeTokenRawToDecimal (chainID, rawValue )
856
+ function calculateGasCost (chainID , gasPriceInGwei , gasAmount ) {
857
+ let rawGasPrice = nativeTokenGasToRaw (chainID, gasPriceInGwei )
858
+ rawGasPrice = StatusQUtils .AmountsArithmetic .times (rawGasPrice , StatusQUtils .AmountsArithmetic .fromNumber (gasAmount ))
859
+ return nativeTokenRawToDecimal (chainID, rawGasPrice )
860
860
}
861
861
862
862
// Leave this function at the bottom of the file as QT Creator messes up the code color after this
You can’t perform that action at this time.
0 commit comments