@@ -292,9 +292,9 @@ void PaymentServer::handleURIOrFile(const QString& s)
292
292
else if (s.startsWith (BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI
293
293
{
294
294
QUrlQuery uri ((QUrl (s)));
295
+ #ifdef ENABLE_BIP70
295
296
if (uri.hasQueryItem (" r" )) // payment request URI
296
297
{
297
- #ifdef ENABLE_BIP70
298
298
Q_EMIT message (tr (" URI handling" ),
299
299
tr (" You are using a BIP70 URL which will be unsupported in the future." ),
300
300
CClientUIInterface::ICON_WARNING);
@@ -315,19 +315,23 @@ void PaymentServer::handleURIOrFile(const QString& s)
315
315
tr (" Payment request fetch URL is invalid: %1" ).arg (fetchUrl.toString ()),
316
316
CClientUIInterface::ICON_WARNING);
317
317
}
318
- #else
319
- Q_EMIT message (tr (" URI handling" ),
320
- tr (" Cannot process payment request because BIP70 support was not compiled in." ),
321
- CClientUIInterface::ICON_WARNING);
322
- #endif
323
318
return ;
324
319
}
325
- else // normal URI
320
+ else
321
+ #endif
322
+ // normal URI
326
323
{
327
324
SendCoinsRecipient recipient;
328
325
if (GUIUtil::parseBitcoinURI (s, &recipient))
329
326
{
330
327
if (!IsValidDestinationString (recipient.address .toStdString ())) {
328
+ #ifndef ENABLE_BIP70
329
+ if (uri.hasQueryItem (" r" )) { // payment request
330
+ Q_EMIT message (tr (" URI handling" ),
331
+ tr (" Cannot process payment request because BIP70 support was not compiled in." ),
332
+ CClientUIInterface::ICON_WARNING);
333
+ }
334
+ #endif
331
335
Q_EMIT message (tr (" URI handling" ), tr (" Invalid payment address %1" ).arg (recipient.address ),
332
336
CClientUIInterface::MSG_ERROR);
333
337
}
0 commit comments