Skip to content

Commit 09a8fc1

Browse files
committed
merge bitcoin-core/gui#280: Remove user input from URI error message
1 parent a3ac694 commit 09a8fc1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/qt/paymentserver.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,17 @@ void PaymentServer::handleURIOrFile(const QString& s)
233233
SendCoinsRecipient recipient;
234234
if (GUIUtil::parseBitcoinURI(s, &recipient))
235235
{
236-
if (!IsValidDestinationString(recipient.address.toStdString())) {
236+
std::string error_msg;
237+
const CTxDestination dest = DecodeDestination(recipient.address.toStdString(), error_msg);
238+
239+
if (!IsValidDestination(dest)) {
237240
if (uri.hasQueryItem("r")) { // payment request
238241
Q_EMIT message(tr("URI handling"),
239242
tr("Cannot process payment request as BIP70 is no longer supported.")+
240243
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."),
241244
CClientUIInterface::ICON_WARNING);
242245
} else {
243-
Q_EMIT message(tr("URI handling"), tr("Invalid payment address %1").arg(recipient.address),
246+
Q_EMIT message(tr("URI handling"), QString::fromStdString(error_msg),
244247
CClientUIInterface::MSG_ERROR);
245248
}
246249
}

0 commit comments

Comments
 (0)