aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2018-12-31 02:48:46 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2019-02-11 15:08:41 +0000
commit113f0004bec2dd203502f2a9bcba93676d5b9cda (patch)
treee105af8080a3b69e1489322cdc68494c0e065fb1 /src
parent9975282fa80b1ffd6274d5c7fcff4494375e3f9b (diff)
GUI: If BIP70 is disabled, give a proper error when trying to open a payment request file
Diffstat (limited to 'src')
-rw-r--r--src/qt/paymentserver.cpp8
1 files changed, 6 insertions, 2 deletions
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()