Skip to content

Commit

Permalink
[Qt][CoinControl] fix UI bug that could result in paying unexpected fee
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed Sep 7, 2016
1 parent 5b2ea29 commit 0480293
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ void SendCoinsDialog::updateGlobalFeeVariables()
{
nTxConfirmTarget = defaultConfirmTarget - ui->sliderSmartFee->value();
payTxFee = CFeeRate(0);

// set nMinimumTotalFee to 0 to not accidentally pay a custom fee
CoinControlDialog::coinControl->nMinimumTotalFee = 0;
}
else
{
Expand Down Expand Up @@ -781,7 +784,7 @@ void SendCoinsDialog::coinControlUpdateLabels()
ui->radioCustomAtLeast->setVisible(true);

// only enable the feature if inputs are selected
ui->radioCustomAtLeast->setEnabled(CoinControlDialog::coinControl->HasSelected());
ui->radioCustomAtLeast->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked() &&CoinControlDialog::coinControl->HasSelected());
}
else
{
Expand Down

0 comments on commit 0480293

Please sign in to comment.