@@ -82,7 +82,7 @@ static QString ipcServerName()
82
82
// the main GUI window is up and ready to ask the user
83
83
// to send payment.
84
84
85
- static QList <QString> savedPaymentRequests;
85
+ static QSet <QString> savedPaymentRequests;
86
86
87
87
//
88
88
// Sending to the server is done synchronously, at startup.
@@ -107,7 +107,8 @@ void PaymentServer::ipcParseCommandLine(interfaces::Node& node, int argc, char*
107
107
// will start a mainnet instance and throw a "wrong network" error.
108
108
if (arg.startsWith (BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI
109
109
{
110
- savedPaymentRequests.append (arg);
110
+ if (savedPaymentRequests.contains (arg)) continue ;
111
+ savedPaymentRequests.insert (arg);
111
112
112
113
SendCoinsRecipient r;
113
114
if (GUIUtil::parseBitcoinURI (arg, &r) && !r.address .isEmpty ())
@@ -127,7 +128,8 @@ void PaymentServer::ipcParseCommandLine(interfaces::Node& node, int argc, char*
127
128
#ifdef ENABLE_BIP70
128
129
else if (QFile::exists (arg)) // Filename
129
130
{
130
- savedPaymentRequests.append (arg);
131
+ if (savedPaymentRequests.contains (arg)) continue ;
132
+ savedPaymentRequests.insert (arg);
131
133
132
134
PaymentRequestPlus request;
133
135
if (readPaymentRequestFromFile (arg, request))
@@ -280,7 +282,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
280
282
{
281
283
if (saveURIs)
282
284
{
283
- savedPaymentRequests.append (s);
285
+ savedPaymentRequests.insert (s);
284
286
return ;
285
287
}
286
288
0 commit comments