Skip to content

Commit 77bd932

Browse files
committed
Merge b49fe0a into merged_master (Bitcoin PR bitcoin-core/gui#280)
2 parents b3ee198 + b49fe0a commit 77bd932

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
@@ -232,15 +232,18 @@ void PaymentServer::handleURIOrFile(const QString& s)
232232
SendCoinsRecipient recipient;
233233
if (GUIUtil::parseBitcoinURI(s, &recipient))
234234
{
235-
if (!IsValidDestinationString(recipient.address.toStdString())) {
235+
std::string error_msg;
236+
const CTxDestination dest = DecodeDestination(recipient.address.toStdString(), error_msg);
237+
238+
if (!IsValidDestination(dest)) {
236239
if (uri.hasQueryItem("r")) { // payment request
237240
Q_EMIT message(tr("URI handling"),
238241
tr("Cannot process payment request because BIP70 is not supported.\n"
239242
"Due to widespread security flaws in BIP70 it's strongly recommended that any merchant instructions to switch wallets be ignored.\n"
240243
"If you are receiving this error you should request the merchant provide a BIP21 compatible URI."),
241244
CClientUIInterface::ICON_WARNING);
242245
}
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
else

0 commit comments

Comments
 (0)