mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[qt] Properly display required fee instead of minTxFee
This commit is contained in:
@@ -172,7 +172,7 @@ void SendCoinsDialog::setModel(WalletModel *model)
|
||||
connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
connect(ui->checkBoxFreeTx, SIGNAL(stateChanged(int)), this, SLOT(updateGlobalFeeVariables()));
|
||||
connect(ui->checkBoxFreeTx, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
|
||||
ui->customFee->setSingleStep(CWallet::minTxFee.GetFeePerK());
|
||||
ui->customFee->setSingleStep(CWallet::GetRequiredFee(1000));
|
||||
updateFeeSectionControls();
|
||||
updateMinFeeLabel();
|
||||
updateSmartFeeLabel();
|
||||
@@ -569,7 +569,7 @@ void SendCoinsDialog::on_buttonMinimizeFee_clicked()
|
||||
void SendCoinsDialog::setMinimumFee()
|
||||
{
|
||||
ui->radioCustomPerKilobyte->setChecked(true);
|
||||
ui->customFee->setValue(CWallet::minTxFee.GetFeePerK());
|
||||
ui->customFee->setValue(CWallet::GetRequiredFee(1000));
|
||||
}
|
||||
|
||||
void SendCoinsDialog::updateFeeSectionControls()
|
||||
@@ -621,8 +621,8 @@ void SendCoinsDialog::updateFeeMinimizedLabel()
|
||||
void SendCoinsDialog::updateMinFeeLabel()
|
||||
{
|
||||
if (model && model->getOptionsModel())
|
||||
ui->checkBoxMinimumFee->setText(tr("Pay only the minimum fee of %1").arg(
|
||||
BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::minTxFee.GetFeePerK()) + "/kB")
|
||||
ui->checkBoxMinimumFee->setText(tr("Pay only the required fee of %1").arg(
|
||||
BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::GetRequiredFee(1000)) + "/kB")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -635,7 +635,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
||||
CFeeRate feeRate = mempool.estimateFee(nBlocksToConfirm);
|
||||
if (feeRate <= CFeeRate(0)) // not enough data => minfee
|
||||
{
|
||||
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::minTxFee.GetFeePerK()) + "/kB");
|
||||
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::GetRequiredFee(1000)) + "/kB");
|
||||
ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...)
|
||||
ui->labelFeeEstimation->setText("");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user