File tree Expand file tree Collapse file tree 5 files changed +13
-8
lines changed
Expand file tree Collapse file tree 5 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1313#include < chainparams.h>
1414#include < primitives/transaction.h>
1515#include < key_io.h>
16- #include < init .h>
16+ #include < interface/node .h>
1717#include < policy/policy.h>
1818#include < protocol.h>
1919#include < script/script.h>
@@ -232,12 +232,12 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
232232 return ret;
233233}
234234
235- bool isDust (const QString& address, const CAmount& amount)
235+ bool isDust (interface::Node& node, const QString& address, const CAmount& amount)
236236{
237237 CTxDestination dest = DecodeDestination (address.toStdString ());
238238 CScript script = GetScriptForDestination (dest);
239239 CTxOut txOut (amount, script);
240- return IsDust (txOut, ::dustRelayFee );
240+ return IsDust (txOut, node. getDustRelayFee () );
241241}
242242
243243QString HtmlEscape (const QString& str, bool fMultiLine )
Original file line number Diff line number Diff line change 2020class QValidatedLineEdit ;
2121class SendCoinsRecipient ;
2222
23+ namespace interface
24+ {
25+ class Node ;
26+ }
27+
2328QT_BEGIN_NAMESPACE
2429class QAbstractItemView ;
2530class QDateTime ;
@@ -49,7 +54,7 @@ namespace GUIUtil
4954 QString formatBitcoinURI (const SendCoinsRecipient &info);
5055
5156 // Returns true if given address+amount meets "dust" definition
52- bool isDust (const QString& address, const CAmount& amount);
57+ bool isDust (interface::Node& node, const QString& address, const CAmount& amount);
5358
5459 // HTML escaping for rich text controls
5560 QString HtmlEscape (const QString& str, bool fMultiLine =false );
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ void SendCoinsDialog::on_sendButton_clicked()
226226 SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries ->itemAt (i)->widget ());
227227 if (entry)
228228 {
229- if (entry->validate ())
229+ if (entry->validate (model-> node () ))
230230 {
231231 recipients.append (entry->getValue ());
232232 }
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ void SendCoinsEntry::useAvailableBalanceClicked()
127127 Q_EMIT useAvailableBalance (this );
128128}
129129
130- bool SendCoinsEntry::validate ()
130+ bool SendCoinsEntry::validate (interface::Node& node )
131131{
132132 if (!model)
133133 return false ;
@@ -158,7 +158,7 @@ bool SendCoinsEntry::validate()
158158 }
159159
160160 // Reject dust outputs:
161- if (retval && GUIUtil::isDust (ui->payTo ->text (), ui->payAmount ->value ())) {
161+ if (retval && GUIUtil::isDust (node, ui->payTo ->text (), ui->payAmount ->value ())) {
162162 ui->payAmount ->setValid (false );
163163 retval = false ;
164164 }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class SendCoinsEntry : public QStackedWidget
3030 ~SendCoinsEntry ();
3131
3232 void setModel (WalletModel *model);
33- bool validate ();
33+ bool validate (interface::Node& node );
3434 SendCoinsRecipient getValue ();
3535
3636 /* * Return whether the entry is still empty and unedited */
You can’t perform that action at this time.
0 commit comments