From c34cd557c6420cbe26e365b92310d9dc1f82b810 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 6 Aug 2021 18:18:58 +0530 Subject: [PATCH] improve comparison --- apps/remix-ide/src/app/ui/confirmDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/ui/confirmDialog.js b/apps/remix-ide/src/app/ui/confirmDialog.js index a747134af4..515d5db59b 100644 --- a/apps/remix-ide/src/app/ui/confirmDialog.js +++ b/apps/remix-ide/src/app/ui/confirmDialog.js @@ -29,7 +29,7 @@ function confirmDialog (tx, network, amount, gasEstimation, newGasPriceCb, initi var maxFee = el.querySelector('#maxfee').value var confirmBtn = document.querySelector('#modal-footer-ok') var maxPriorityFee = el.querySelector('#maxpriorityfee').value - if (Web3.utils.fromWei(Web3.utils.toBN(parseInt(network.lastBlock.baseFeePerGas, 16)), 'Gwei') > parseInt(maxFee)) { + if (parseInt(network.lastBlock.baseFeePerGas, 16) > Web3.utils.toWei(maxFee, 'Gwei')) { el.querySelector('#txfee').innerHTML = 'Transaction is invalid. Max fee should not be less than Base fee' el.gasPriceStatus = false confirmBtn.hidden = true