From f73356e2e8f2c6569ea58b8ead5bb469b24c7cf0 Mon Sep 17 00:00:00 2001 From: Alex Jbanca Date: Mon, 5 Aug 2024 18:07:26 +0300 Subject: [PATCH] fix(WalletConnect): Fixing fees parsing when provided by the dApp --- .../Wallet/services/dapps/DAppsRequestHandler.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/services/dapps/DAppsRequestHandler.qml b/ui/app/AppLayouts/Wallet/services/dapps/DAppsRequestHandler.qml index 006aee701a..38ef6e4e87 100644 --- a/ui/app/AppLayouts/Wallet/services/dapps/DAppsRequestHandler.qml +++ b/ui/app/AppLayouts/Wallet/services/dapps/DAppsRequestHandler.qml @@ -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)