@@ -292,9 +292,9 @@ void PaymentServer::handleURIOrFile(const QString& s)
292292 else if (s.startsWith (BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI
293293 {
294294 QUrlQuery uri ((QUrl (s)));
295+ #ifdef ENABLE_BIP70
295296 if (uri.hasQueryItem (" r" )) // payment request URI
296297 {
297- #ifdef ENABLE_BIP70
298298 Q_EMIT message (tr (" URI handling" ),
299299 tr (" You are using a BIP70 URL which will be unsupported in the future." ),
300300 CClientUIInterface::ICON_WARNING);
@@ -315,19 +315,23 @@ void PaymentServer::handleURIOrFile(const QString& s)
315315 tr (" Payment request fetch URL is invalid: %1" ).arg (fetchUrl.toString ()),
316316 CClientUIInterface::ICON_WARNING);
317317 }
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
323318 return ;
324319 }
325- else // normal URI
320+ else
321+ #endif
322+ // normal URI
326323 {
327324 SendCoinsRecipient recipient;
328325 if (GUIUtil::parseBitcoinURI (s, &recipient))
329326 {
330327 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
331335 Q_EMIT message (tr (" URI handling" ), tr (" Invalid payment address %1" ).arg (recipient.address ),
332336 CClientUIInterface::MSG_ERROR);
333337 }
0 commit comments