From 113f0004bec2dd203502f2a9bcba93676d5b9cda Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 31 Dec 2018 02:48:46 +0000 Subject: GUI: If BIP70 is disabled, give a proper error when trying to open a payment request file --- src/qt/paymentserver.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/qt') diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index 9e8afc8aa4..43dccec4ea 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -347,9 +347,9 @@ void PaymentServer::handleURIOrFile(const QString& s) } } -#ifdef ENABLE_BIP70 if (QFile::exists(s)) // payment request file { +#ifdef ENABLE_BIP70 PaymentRequestPlus request; SendCoinsRecipient recipient; if (!readPaymentRequestFromFile(s, request)) @@ -362,8 +362,12 @@ void PaymentServer::handleURIOrFile(const QString& s) Q_EMIT receivedPaymentRequest(recipient); return; - } +#else + Q_EMIT message(tr("Payment request file handling"), + tr("Cannot process payment request because BIP70 support was not compiled in."), + CClientUIInterface::ICON_WARNING); #endif + } } void PaymentServer::handleURIConnection() -- cgit v1.2.3