File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments