fix(WalletConnect): Fixing fees parsing when provided by the dApp

This commit is contained in:
Alex Jbanca 2024-08-05 18:07:26 +03:00 committed by Iuri Matias
parent 5e4a72ade5
commit 12eda28c08
1 changed files with 4 additions and 3 deletions

View File

@ -432,10 +432,11 @@ SQUtils.QObject {
// Beware, the tx values are standard blockchain hex big number values; the fees values are nim's float64 values, hence the complex conversions
if (!!tx.maxFeePerGas && !!tx.maxPriorityFeePerGas) {
let maxFeePerGasDec = root.store.hexToDec(tx.maxFeePerGas)
gasPrice = BigOps.fromString(maxFeePerGasDec)
const gasPriceInWei = BigOps.fromString(maxFeePerGasDec)
gasPrice = hexToGwei(tx.maxFeePerGas)
// Source fees info from the incoming transaction for when we process it
maxFeePerGas = maxFeePerGasDec
let maxPriorityFeePerGasDec = root.store.hexToDec(tx.maxPriorityFeePerGas)
maxFeePerGas = root.store.hexToDec(tx.maxFeePerGas)
let maxPriorityFeePerGasDec = hexToGwei(tx.maxPriorityFeePerGas)
maxPriorityFeePerGas = maxPriorityFeePerGasDec
} else {
let fees = root.store.getSuggestedFees(chainId)