GUI: If BIP70 is disabled, give a proper error when trying to open a payment request file

This commit is contained in:
Luke Dashjr 2018-12-31 02:48:46 +00:00
parent 9975282fa8
commit 113f0004be

View file

@ -347,9 +347,9 @@ void PaymentServer::handleURIOrFile(const QString& s)
} }
} }
#ifdef ENABLE_BIP70
if (QFile::exists(s)) // payment request file if (QFile::exists(s)) // payment request file
{ {
#ifdef ENABLE_BIP70
PaymentRequestPlus request; PaymentRequestPlus request;
SendCoinsRecipient recipient; SendCoinsRecipient recipient;
if (!readPaymentRequestFromFile(s, request)) if (!readPaymentRequestFromFile(s, request))
@ -362,8 +362,12 @@ void PaymentServer::handleURIOrFile(const QString& s)
Q_EMIT receivedPaymentRequest(recipient); Q_EMIT receivedPaymentRequest(recipient);
return; 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 #endif
}
} }
void PaymentServer::handleURIConnection() void PaymentServer::handleURIConnection()