GUI: If BIP70 is disabled, give a proper error when trying to open a payment request file
This commit is contained in:
parent
9975282fa8
commit
113f0004be
1 changed files with 6 additions and 2 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue