mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
merge bitcoin-core/gui#280: Remove user input from URI error message
This commit is contained in:
parent
a3ac6941a7
commit
09a8fc1df9
@ -233,14 +233,17 @@ void PaymentServer::handleURIOrFile(const QString& s)
|
|||||||
SendCoinsRecipient recipient;
|
SendCoinsRecipient recipient;
|
||||||
if (GUIUtil::parseBitcoinURI(s, &recipient))
|
if (GUIUtil::parseBitcoinURI(s, &recipient))
|
||||||
{
|
{
|
||||||
if (!IsValidDestinationString(recipient.address.toStdString())) {
|
std::string error_msg;
|
||||||
|
const CTxDestination dest = DecodeDestination(recipient.address.toStdString(), error_msg);
|
||||||
|
|
||||||
|
if (!IsValidDestination(dest)) {
|
||||||
if (uri.hasQueryItem("r")) { // payment request
|
if (uri.hasQueryItem("r")) { // payment request
|
||||||
Q_EMIT message(tr("URI handling"),
|
Q_EMIT message(tr("URI handling"),
|
||||||
tr("Cannot process payment request as BIP70 is no longer supported.")+
|
tr("Cannot process payment request as BIP70 is no longer supported.")+
|
||||||
tr("Due to discontinued support, you should request the merchant to provide you with a BIP21 compatible URI or use a wallet that does continue to support BIP70."),
|
tr("Due to discontinued support, you should request the merchant to provide you with a BIP21 compatible URI or use a wallet that does continue to support BIP70."),
|
||||||
CClientUIInterface::ICON_WARNING);
|
CClientUIInterface::ICON_WARNING);
|
||||||
} else {
|
} else {
|
||||||
Q_EMIT message(tr("URI handling"), tr("Invalid payment address %1").arg(recipient.address),
|
Q_EMIT message(tr("URI handling"), QString::fromStdString(error_msg),
|
||||||
CClientUIInterface::MSG_ERROR);
|
CClientUIInterface::MSG_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user