mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge #10582: Pass in smart fee slider value to coin control dialog
e9cd778
Pass in smart fee slider value to coin control dialog (Alex Morcos)
Tree-SHA512: 3899c3eb89b06e9cc842b33fabcce40a84fcc3a88ac2b02861f63419925312ac2a9f632567c02b0a060f5c5cd55f337e35e99b80535d1c1b8fcb7fd0c539f3c0
This commit is contained in:
commit
7c72fb99af
@ -510,7 +510,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
nBytes -= 34;
|
||||
|
||||
// Fee
|
||||
nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, ::mempool, ::feeEstimator);
|
||||
nPayFee = CWallet::GetMinimumFee(nBytes, coinControl->nConfirmTarget, ::mempool, ::feeEstimator);
|
||||
|
||||
if (nPayAmount > 0)
|
||||
{
|
||||
@ -588,7 +588,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
if (payTxFee.GetFeePerK() > 0)
|
||||
dFeeVary = (double)std::max(CWallet::GetRequiredFee(1000), payTxFee.GetFeePerK()) / 1000;
|
||||
else {
|
||||
dFeeVary = (double)std::max(CWallet::GetRequiredFee(1000), ::feeEstimator.estimateSmartFee(nTxConfirmTarget, NULL, ::mempool).GetFeePerK()) / 1000;
|
||||
dFeeVary = (double)std::max(CWallet::GetRequiredFee(1000), ::feeEstimator.estimateSmartFee(coinControl->nConfirmTarget, NULL, ::mempool).GetFeePerK()) / 1000;
|
||||
}
|
||||
QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
|
||||
|
||||
|
@ -822,6 +822,12 @@ void SendCoinsDialog::coinControlUpdateLabels()
|
||||
// set pay amounts
|
||||
CoinControlDialog::payAmounts.clear();
|
||||
CoinControlDialog::fSubtractFeeFromAmount = false;
|
||||
if (ui->radioSmartFee->isChecked()) {
|
||||
CoinControlDialog::coinControl->nConfirmTarget = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2;
|
||||
} else {
|
||||
CoinControlDialog::coinControl->nConfirmTarget = model->getDefaultConfirmTarget();
|
||||
}
|
||||
|
||||
for(int i = 0; i < ui->entries->count(); ++i)
|
||||
{
|
||||
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
|
||||
|
Loading…
Reference in New Issue
Block a user