Changeset View
Changeset View
Standalone View
Standalone View
src/qt/coincontroldialog.cpp
Show First 20 Lines • Show All 540 Lines • ▼ Show 20 Lines | if (nQuantity > 0) { | ||||
// accurate | // accurate | ||||
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, g_mempool); | nPayFee = GetMinimumFee(nBytes, nTxConfirmTarget, g_mempool); | ||||
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 73 Lines • ▼ Show 20 Lines | void CoinControlDialog::updateLabels(WalletModel *model, QDialog *dialog) { | ||||
l7->setStyleSheet((fDust) ? "color:red;" : ""); | l7->setStyleSheet((fDust) ? "color:red;" : ""); | ||||
// tool tips | // tool tips | ||||
QString toolTipDust = | QString toolTipDust = | ||||
tr("This label turns red if any recipient receives an amount smaller " | tr("This label turns red if any recipient receives an amount smaller " | ||||
"than the current dust threshold."); | "than the current dust threshold."); | ||||
// how many satoshis the estimated fee can vary per byte we guess wrong | // how many satoshis the estimated fee can vary per byte we guess wrong | ||||
double dFeeVary = GetMinimumFee(1000, g_mempool) / (1000 * SATOSHI); | double dFeeVary = GetMinimumFee(1000, 2, g_mempool) / (1000 * SATOSHI); | ||||
QString toolTip4 = | QString toolTip4 = | ||||
tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary); | tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary); | ||||
l3->setToolTip(toolTip4); | l3->setToolTip(toolTip4); | ||||
l4->setToolTip(toolTip4); | l4->setToolTip(toolTip4); | ||||
l7->setToolTip(toolTipDust); | l7->setToolTip(toolTipDust); | ||||
l8->setToolTip(toolTip4); | l8->setToolTip(toolTip4); | ||||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |