From 0e182e343aa219908240defdf50322643752ec86 Mon Sep 17 00:00:00 2001 From: furszy Date: Fri, 9 Apr 2021 12:16:48 -0300 Subject: [PATCH] GUI: if the custom fee is disabled, use the minimum required fee and not the stored value. --- src/qt/pivx/sendcustomfeedialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qt/pivx/sendcustomfeedialog.cpp b/src/qt/pivx/sendcustomfeedialog.cpp index b0650cccec196..9712b8d224dfa 100644 --- a/src/qt/pivx/sendcustomfeedialog.cpp +++ b/src/qt/pivx/sendcustomfeedialog.cpp @@ -127,8 +127,12 @@ void SendCustomFeeDialog::accept() inform(tr("Fee too high. Must be below: %1").arg( BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), insaneFee))); } else if (customFee < CWallet::GetRequiredFee(1000)) { - CAmount nFee; - walletModel->getWalletCustomFee(nFee); + CAmount nFee = 0; + if (walletModel->hasWalletCustomFee()) { + walletModel->getWalletCustomFee(nFee); + } else { + nFee = CWallet::GetRequiredFee(1000); + } ui->lineEditCustomFee->setText(BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), nFee)); inform(tr("Fee too low. Must be at least: %1").arg( BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), CWallet::GetRequiredFee(1000))));