Added code to catch and remove any / from URI path elements.
Changed how URI path has path separators removed to be once the URI is parsed, rather than when it is received by the application.
This commit is contained in:
parent
02a9d1c7f3
commit
05a1c4599a
|
@ -108,7 +108,10 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
|
|||
return false;
|
||||
|
||||
SendCoinsRecipient rv;
|
||||
rv.address = uri.path();
|
||||
QStringList addressParts = uri.path().split("/", QString::SkipEmptyParts, Qt::CaseSensitive);
|
||||
rv.address = addressParts.isEmpty()
|
||||
? ""
|
||||
: addressParts.first();
|
||||
rv.amount = 0;
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
|
@ -171,6 +174,7 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
|
|||
{
|
||||
uri.replace(0, 11, "dogecoin:");
|
||||
}
|
||||
|
||||
QUrl uriInstance(uri);
|
||||
return parseBitcoinURI(uriInstance, out);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue