Changeset View
Changeset View
Standalone View
Standalone View
src/qt/coincontroldialog.cpp
| Show First 20 Lines • Show All 541 Lines • ▼ Show 20 Lines | if (nQuantity > 0) { | ||||
| if (CoinControlDialog::fSubtractFeeFromAmount) { | if (CoinControlDialog::fSubtractFeeFromAmount) { | ||||
| if (nAmount - nPayAmount == Amount::zero()) { | if (nAmount - nPayAmount == Amount::zero()) { | ||||
| nBytes -= 34; | nBytes -= 34; | ||||
| } | } | ||||
| } | } | ||||
| // Fee | // Fee | ||||
| nPayFee = GetMinimumFee(nBytes, nTxConfirmTarget, g_mempool); | nPayFee = GetMinimumFee(nBytes, nTxConfirmTarget, g_mempool); | ||||
| if (nPayFee > Amount::zero() && | |||||
| coinControl->nMinimumTotalFee > nPayFee) { | |||||
| nPayFee = coinControl->nMinimumTotalFee; | |||||
| } | |||||
| if (nPayAmount > Amount::zero()) { | if (nPayAmount > Amount::zero()) { | ||||
| nChange = nAmount - nPayAmount; | nChange = nAmount - nPayAmount; | ||||
| if (!CoinControlDialog::fSubtractFeeFromAmount) { | if (!CoinControlDialog::fSubtractFeeFromAmount) { | ||||
| nChange -= nPayFee; | nChange -= nPayFee; | ||||
| } | } | ||||
| // Never create dust outputs; if we would, just add the dust to the | // Never create dust outputs; if we would, just add the dust to the | ||||
| ▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | void CoinControlDialog::updateLabels(WalletModel *model, QDialog *dialog) { | ||||
| // After Fee | // After Fee | ||||
| l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); | l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); | ||||
| // Bytes | // Bytes | ||||
| l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); | l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); | ||||
| // Dust | // Dust | ||||
| l7->setText(fDust ? tr("yes") : tr("no")); | l7->setText(fDust ? tr("yes") : tr("no")); | ||||
| // Change | // Change | ||||
| l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); | l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); | ||||
| if (nPayFee > Amount::zero() && (coinControl->nMinimumTotalFee < nPayFee)) { | if (nPayFee > Amount::zero()) { | ||||
| l3->setText(ASYMP_UTF8 + l3->text()); | l3->setText(ASYMP_UTF8 + l3->text()); | ||||
| l4->setText(ASYMP_UTF8 + l4->text()); | l4->setText(ASYMP_UTF8 + l4->text()); | ||||
| if (nChange > Amount::zero() && | if (nChange > Amount::zero() && | ||||
| !CoinControlDialog::fSubtractFeeFromAmount) { | !CoinControlDialog::fSubtractFeeFromAmount) { | ||||
| l8->setText(ASYMP_UTF8 + l8->text()); | l8->setText(ASYMP_UTF8 + l8->text()); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines | |||||