Skip to content

Commit

Permalink
GUI: if the custom fee is disabled, use the minimum required fee and …
Browse files Browse the repository at this point in the history
…not the stored value.
  • Loading branch information
furszy committed Apr 9, 2021
1 parent 1fc145c commit 50a5e84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/qt/pivx/sendcustomfeedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
Expand Down

0 comments on commit 50a5e84

Please sign in to comment.