Skip to content

Commit

Permalink
GUI: If BIP70 is disabled, give a proper error when trying to open a …
Browse files Browse the repository at this point in the history
…payment request file
  • Loading branch information
luke-jr committed Feb 11, 2019
1 parent 9975282 commit 113f000
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/qt/paymentserver.cpp
Expand Up @@ -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))
Expand All @@ -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()
Expand Down

0 comments on commit 113f000

Please sign in to comment.