Skip to content

Commit 113f000

Browse files
committed
GUI: If BIP70 is disabled, give a proper error when trying to open a payment request file
1 parent 9975282 commit 113f000

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/qt/paymentserver.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ void PaymentServer::handleURIOrFile(const QString& s)
347347
}
348348
}
349349

350-
#ifdef ENABLE_BIP70
351350
if (QFile::exists(s)) // payment request file
352351
{
352+
#ifdef ENABLE_BIP70
353353
PaymentRequestPlus request;
354354
SendCoinsRecipient recipient;
355355
if (!readPaymentRequestFromFile(s, request))
@@ -362,8 +362,12 @@ void PaymentServer::handleURIOrFile(const QString& s)
362362
Q_EMIT receivedPaymentRequest(recipient);
363363

364364
return;
365-
}
365+
#else
366+
Q_EMIT message(tr("Payment request file handling"),
367+
tr("Cannot process payment request because BIP70 support was not compiled in."),
368+
CClientUIInterface::ICON_WARNING);
366369
#endif
370+
}
367371
}
368372

369373
void PaymentServer::handleURIConnection()

0 commit comments

Comments
 (0)