Skip to content

Commit

Permalink
Payment request URI syntax changed, from request=... to r=...
Browse files Browse the repository at this point in the history
BIP 72 was changed to save six bytes in bitcoin: URIs.
  • Loading branch information
gavinandresen committed Dec 4, 2013
1 parent f15bd3c commit 1e01f7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/qt/openuridialog.cpp
Expand Up @@ -48,5 +48,5 @@ void OpenURIDialog::on_selectFileButton_clicked()
if(filename.isEmpty())
return;
QUrl fileUri = QUrl::fromLocalFile(filename);
ui->uriEdit->setText("bitcoin:?request=" + QUrl::toPercentEncoding(fileUri.toString()));
ui->uriEdit->setText("bitcoin:?r=" + QUrl::toPercentEncoding(fileUri.toString()));
}
4 changes: 2 additions & 2 deletions src/qt/paymentserver.cpp
Expand Up @@ -366,10 +366,10 @@ void PaymentServer::handleURIOrFile(const QString& s)
#else
QUrlQuery uri((QUrl(s)));
#endif
if (uri.hasQueryItem("request"))
if (uri.hasQueryItem("r"))
{
QByteArray temp;
temp.append(uri.queryItemValue("request"));
temp.append(uri.queryItemValue("r"));
QString decoded = QUrl::fromPercentEncoding(temp);
QUrl fetchUrl(decoded, QUrl::StrictMode);

Expand Down

0 comments on commit 1e01f7c

Please sign in to comment.