aboutsummaryrefslogtreecommitdiff
path: root/src/qt/coincontroldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/coincontroldialog.cpp')
-rw-r--r--src/qt/coincontroldialog.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index e1b1ae12e9..998ef2ef3d 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -70,7 +70,6 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
- QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
connect(clipboardQuantityAction, &QAction::triggered, this, &CoinControlDialog::clipboardQuantity);
@@ -78,7 +77,6 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
connect(clipboardFeeAction, &QAction::triggered, this, &CoinControlDialog::clipboardFee);
connect(clipboardAfterFeeAction, &QAction::triggered, this, &CoinControlDialog::clipboardAfterFee);
connect(clipboardBytesAction, &QAction::triggered, this, &CoinControlDialog::clipboardBytes);
- connect(clipboardLowOutputAction, &QAction::triggered, this, &CoinControlDialog::clipboardLowOutput);
connect(clipboardChangeAction, &QAction::triggered, this, &CoinControlDialog::clipboardChange);
ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
@@ -86,7 +84,6 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
ui->labelCoinControlFee->addAction(clipboardFeeAction);
ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
ui->labelCoinControlBytes->addAction(clipboardBytesAction);
- ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
ui->labelCoinControlChange->addAction(clipboardChangeAction);
// toggle tree/list mode
@@ -294,12 +291,6 @@ void CoinControlDialog::clipboardBytes()
GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace(ASYMP_UTF8, ""));
}
-// copy label "Dust" to clipboard
-void CoinControlDialog::clipboardLowOutput()
-{
- GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text());
-}
-
// copy label "Change" to clipboard
void CoinControlDialog::clipboardChange()
{
@@ -390,17 +381,8 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
// nPayAmount
CAmount nPayAmount = 0;
- bool fDust = false;
- for (const CAmount &amount : CoinControlDialog::payAmounts)
- {
+ for (const CAmount &amount : CoinControlDialog::payAmounts) {
nPayAmount += amount;
-
- if (amount > 0)
- {
- // Assumes a p2pkh script size
- CTxOut txout(amount, CScript() << std::vector<unsigned char>(24, 0));
- fDust |= IsDust(txout, model->node().getDustRelayFee());
- }
}
CAmount nAmount = 0;
@@ -516,12 +498,9 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
QLabel *l3 = dialog->findChild<QLabel *>("labelCoinControlFee");
QLabel *l4 = dialog->findChild<QLabel *>("labelCoinControlAfterFee");
QLabel *l5 = dialog->findChild<QLabel *>("labelCoinControlBytes");
- QLabel *l7 = dialog->findChild<QLabel *>("labelCoinControlLowOutput");
QLabel *l8 = dialog->findChild<QLabel *>("labelCoinControlChange");
- // enable/disable "dust" and "change"
- dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setEnabled(nPayAmount > 0);
- dialog->findChild<QLabel *>("labelCoinControlLowOutput") ->setEnabled(nPayAmount > 0);
+ // enable/disable "change"
dialog->findChild<QLabel *>("labelCoinControlChangeText") ->setEnabled(nPayAmount > 0);
dialog->findChild<QLabel *>("labelCoinControlChange") ->setEnabled(nPayAmount > 0);
@@ -531,7 +510,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
l3->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nPayFee)); // Fee
l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee)); // After Fee
l5->setText(((nBytes > 0) ? ASYMP_UTF8 : "") + QString::number(nBytes)); // Bytes
- l7->setText(fDust ? tr("yes") : tr("no")); // Dust
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
if (nPayFee > 0)
{
@@ -541,12 +519,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
l8->setText(ASYMP_UTF8 + l8->text());
}
- // turn label red when dust
- l7->setStyleSheet((fDust) ? "color:red;" : "");
-
- // tool tips
- QString toolTipDust = tr("This label turns red if any recipient receives an amount smaller than the current dust threshold.");
-
// how many satoshis the estimated fee can vary per byte we guess wrong
double dFeeVary = (nBytes != 0) ? (double)nPayFee / nBytes : 0;
@@ -554,12 +526,10 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
l3->setToolTip(toolTip4);
l4->setToolTip(toolTip4);
- l7->setToolTip(toolTipDust);
l8->setToolTip(toolTip4);
dialog->findChild<QLabel *>("labelCoinControlFeeText") ->setToolTip(l3->toolTip());
dialog->findChild<QLabel *>("labelCoinControlAfterFeeText") ->setToolTip(l4->toolTip());
dialog->findChild<QLabel *>("labelCoinControlBytesText") ->setToolTip(l5->toolTip());
- dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
dialog->findChild<QLabel *>("labelCoinControlChangeText") ->setToolTip(l8->toolTip());
// Insufficient funds