@@ -70,23 +70,20 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
70
70
QAction *clipboardFeeAction = new QAction (tr (" Copy fee" ), this );
71
71
QAction *clipboardAfterFeeAction = new QAction (tr (" Copy after fee" ), this );
72
72
QAction *clipboardBytesAction = new QAction (tr (" Copy bytes" ), this );
73
- QAction *clipboardLowOutputAction = new QAction (tr (" Copy dust" ), this );
74
73
QAction *clipboardChangeAction = new QAction (tr (" Copy change" ), this );
75
74
76
75
connect (clipboardQuantityAction, &QAction::triggered, this , &CoinControlDialog::clipboardQuantity);
77
76
connect (clipboardAmountAction, &QAction::triggered, this , &CoinControlDialog::clipboardAmount);
78
77
connect (clipboardFeeAction, &QAction::triggered, this , &CoinControlDialog::clipboardFee);
79
78
connect (clipboardAfterFeeAction, &QAction::triggered, this , &CoinControlDialog::clipboardAfterFee);
80
79
connect (clipboardBytesAction, &QAction::triggered, this , &CoinControlDialog::clipboardBytes);
81
- connect (clipboardLowOutputAction, &QAction::triggered, this , &CoinControlDialog::clipboardLowOutput);
82
80
connect (clipboardChangeAction, &QAction::triggered, this , &CoinControlDialog::clipboardChange);
83
81
84
82
ui->labelCoinControlQuantity ->addAction (clipboardQuantityAction);
85
83
ui->labelCoinControlAmount ->addAction (clipboardAmountAction);
86
84
ui->labelCoinControlFee ->addAction (clipboardFeeAction);
87
85
ui->labelCoinControlAfterFee ->addAction (clipboardAfterFeeAction);
88
86
ui->labelCoinControlBytes ->addAction (clipboardBytesAction);
89
- ui->labelCoinControlLowOutput ->addAction (clipboardLowOutputAction);
90
87
ui->labelCoinControlChange ->addAction (clipboardChangeAction);
91
88
92
89
// toggle tree/list mode
@@ -294,12 +291,6 @@ void CoinControlDialog::clipboardBytes()
294
291
GUIUtil::setClipboard (ui->labelCoinControlBytes ->text ().replace (ASYMP_UTF8, " " ));
295
292
}
296
293
297
- // copy label "Dust" to clipboard
298
- void CoinControlDialog::clipboardLowOutput ()
299
- {
300
- GUIUtil::setClipboard (ui->labelCoinControlLowOutput ->text ());
301
- }
302
-
303
294
// copy label "Change" to clipboard
304
295
void CoinControlDialog::clipboardChange ()
305
296
{
@@ -390,17 +381,8 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
390
381
391
382
// nPayAmount
392
383
CAmount nPayAmount = 0 ;
393
- bool fDust = false ;
394
- for (const CAmount &amount : CoinControlDialog::payAmounts)
395
- {
384
+ for (const CAmount &amount : CoinControlDialog::payAmounts) {
396
385
nPayAmount += amount;
397
-
398
- if (amount > 0 )
399
- {
400
- // Assumes a p2pkh script size
401
- CTxOut txout (amount, CScript () << std::vector<unsigned char >(24 , 0 ));
402
- fDust |= IsDust (txout, model->node ().getDustRelayFee ());
403
- }
404
386
}
405
387
406
388
CAmount nAmount = 0 ;
@@ -516,12 +498,9 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
516
498
QLabel *l3 = dialog->findChild <QLabel *>(" labelCoinControlFee" );
517
499
QLabel *l4 = dialog->findChild <QLabel *>(" labelCoinControlAfterFee" );
518
500
QLabel *l5 = dialog->findChild <QLabel *>(" labelCoinControlBytes" );
519
- QLabel *l7 = dialog->findChild <QLabel *>(" labelCoinControlLowOutput" );
520
501
QLabel *l8 = dialog->findChild <QLabel *>(" labelCoinControlChange" );
521
502
522
- // enable/disable "dust" and "change"
523
- dialog->findChild <QLabel *>(" labelCoinControlLowOutputText" )->setEnabled (nPayAmount > 0 );
524
- dialog->findChild <QLabel *>(" labelCoinControlLowOutput" ) ->setEnabled (nPayAmount > 0 );
503
+ // enable/disable "change"
525
504
dialog->findChild <QLabel *>(" labelCoinControlChangeText" ) ->setEnabled (nPayAmount > 0 );
526
505
dialog->findChild <QLabel *>(" labelCoinControlChange" ) ->setEnabled (nPayAmount > 0 );
527
506
@@ -531,7 +510,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
531
510
l3->setText (BitcoinUnits::formatWithUnit (nDisplayUnit, nPayFee)); // Fee
532
511
l4->setText (BitcoinUnits::formatWithUnit (nDisplayUnit, nAfterFee)); // After Fee
533
512
l5->setText (((nBytes > 0 ) ? ASYMP_UTF8 : " " ) + QString::number (nBytes)); // Bytes
534
- l7->setText (fDust ? tr (" yes" ) : tr (" no" )); // Dust
535
513
l8->setText (BitcoinUnits::formatWithUnit (nDisplayUnit, nChange)); // Change
536
514
if (nPayFee > 0 )
537
515
{
@@ -541,25 +519,17 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
541
519
l8->setText (ASYMP_UTF8 + l8->text ());
542
520
}
543
521
544
- // turn label red when dust
545
- l7->setStyleSheet ((fDust ) ? " color:red;" : " " );
546
-
547
- // tool tips
548
- QString toolTipDust = tr (" This label turns red if any recipient receives an amount smaller than the current dust threshold." );
549
-
550
522
// how many satoshis the estimated fee can vary per byte we guess wrong
551
523
double dFeeVary = (nBytes != 0 ) ? (double )nPayFee / nBytes : 0 ;
552
524
553
525
QString toolTip4 = tr (" Can vary +/- %1 satoshi(s) per input." ).arg (dFeeVary);
554
526
555
527
l3->setToolTip (toolTip4);
556
528
l4->setToolTip (toolTip4);
557
- l7->setToolTip (toolTipDust);
558
529
l8->setToolTip (toolTip4);
559
530
dialog->findChild <QLabel *>(" labelCoinControlFeeText" ) ->setToolTip (l3->toolTip ());
560
531
dialog->findChild <QLabel *>(" labelCoinControlAfterFeeText" ) ->setToolTip (l4->toolTip ());
561
532
dialog->findChild <QLabel *>(" labelCoinControlBytesText" ) ->setToolTip (l5->toolTip ());
562
- dialog->findChild <QLabel *>(" labelCoinControlLowOutputText" )->setToolTip (l7->toolTip ());
563
533
dialog->findChild <QLabel *>(" labelCoinControlChangeText" ) ->setToolTip (l8->toolTip ());
564
534
565
535
// Insufficient funds
0 commit comments