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 13
13
#include < chainparams.h>
14
14
#include < primitives/transaction.h>
15
15
#include < key_io.h>
16
- #include < init .h>
16
+ #include < interface/node .h>
17
17
#include < policy/policy.h>
18
18
#include < protocol.h>
19
19
#include < script/script.h>
@@ -232,12 +232,12 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
232
232
return ret;
233
233
}
234
234
235
- bool isDust (const QString& address, const CAmount& amount)
235
+ bool isDust (interface::Node& node, const QString& address, const CAmount& amount)
236
236
{
237
237
CTxDestination dest = DecodeDestination (address.toStdString ());
238
238
CScript script = GetScriptForDestination (dest);
239
239
CTxOut txOut (amount, script);
240
- return IsDust (txOut, ::dustRelayFee );
240
+ return IsDust (txOut, node. getDustRelayFee () );
241
241
}
242
242
243
243
QString HtmlEscape (const QString& str, bool fMultiLine )
Original file line number Diff line number Diff line change 20
20
class QValidatedLineEdit ;
21
21
class SendCoinsRecipient ;
22
22
23
+ namespace interface
24
+ {
25
+ class Node ;
26
+ }
27
+
23
28
QT_BEGIN_NAMESPACE
24
29
class QAbstractItemView ;
25
30
class QDateTime ;
@@ -49,7 +54,7 @@ namespace GUIUtil
49
54
QString formatBitcoinURI (const SendCoinsRecipient &info);
50
55
51
56
// 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);
53
58
54
59
// HTML escaping for rich text controls
55
60
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()
226
226
SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries ->itemAt (i)->widget ());
227
227
if (entry)
228
228
{
229
- if (entry->validate ())
229
+ if (entry->validate (model-> node () ))
230
230
{
231
231
recipients.append (entry->getValue ());
232
232
}
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ void SendCoinsEntry::useAvailableBalanceClicked()
127
127
Q_EMIT useAvailableBalance (this );
128
128
}
129
129
130
- bool SendCoinsEntry::validate ()
130
+ bool SendCoinsEntry::validate (interface::Node& node )
131
131
{
132
132
if (!model)
133
133
return false ;
@@ -158,7 +158,7 @@ bool SendCoinsEntry::validate()
158
158
}
159
159
160
160
// 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 ())) {
162
162
ui->payAmount ->setValid (false );
163
163
retval = false ;
164
164
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class SendCoinsEntry : public QStackedWidget
30
30
~SendCoinsEntry ();
31
31
32
32
void setModel (WalletModel *model);
33
- bool validate ();
33
+ bool validate (interface::Node& node );
34
34
SendCoinsRecipient getValue ();
35
35
36
36
/* * Return whether the entry is still empty and unedited */
You can’t perform that action at this time.
0 commit comments