diff --git a/apps/remix-ide/src/app/ui/confirmDialog.js b/apps/remix-ide/src/app/ui/confirmDialog.js index 670470597f..d4b41838f1 100644 --- a/apps/remix-ide/src/app/ui/confirmDialog.js +++ b/apps/remix-ide/src/app/ui/confirmDialog.js @@ -26,15 +26,25 @@ function confirmDialog (tx, network, amount, gasEstimation, newGasPriceCb, initi const onMaxFeeChange = function () { var maxFee = el.querySelector('#maxfee').value + var confirmBtn = document.querySelector('#modal-footer-ok') var maxPriorityFee = el.querySelector('#maxpriorityfee').value if (parseInt(network.lastBlock.baseFeePerGas, 16) > parseInt(maxFee)) { - el.querySelector('#txfee').innerHTML = 'Transaction is invalid. Base fee should not be bigger than Max fee' + el.querySelector('#txfee').innerHTML = 'Transaction is invalid. Max fee should not be less than Base fee' el.gasPriceStatus = false + confirmBtn.hidden = true return - } else el.gasPriceStatus = true + } else { + el.gasPriceStatus = true + confirmBtn.hidden = false + } newGasPriceCb(maxFee, (txFeeText, priceStatus) => { el.querySelector('#txfee').innerHTML = txFeeText + if (priceStatus) { + confirmBtn.hidden = false + } else { + confirmBtn.hidden = true + } el.gasPriceStatus = priceStatus el.txFee = { maxFee, maxPriorityFee, baseFeePerGas: network.lastBlock.baseFeePerGas } }) @@ -42,8 +52,9 @@ function confirmDialog (tx, network, amount, gasEstimation, newGasPriceCb, initi const el = yo`
${tx.data && tx.data.length > 50 ? tx.data.substring(0, 49) + '...' : tx.data} ${copyToClipboard(() => { return tx.data })}+
${tx.data && tx.data.length > 50 ? tx.data.substring(0, 49) + '...' : tx.data} ${copyToClipboard(() => { return tx.data })}+