Skip to content

Commit 1e01f7c

Browse files
committed
Payment request URI syntax changed, from request=... to r=...
BIP 72 was changed to save six bytes in bitcoin: URIs.
1 parent f15bd3c commit 1e01f7c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/qt/openuridialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ void OpenURIDialog::on_selectFileButton_clicked()
4848
if(filename.isEmpty())
4949
return;
5050
QUrl fileUri = QUrl::fromLocalFile(filename);
51-
ui->uriEdit->setText("bitcoin:?request=" + QUrl::toPercentEncoding(fileUri.toString()));
51+
ui->uriEdit->setText("bitcoin:?r=" + QUrl::toPercentEncoding(fileUri.toString()));
5252
}

src/qt/paymentserver.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ void PaymentServer::handleURIOrFile(const QString& s)
366366
#else
367367
QUrlQuery uri((QUrl(s)));
368368
#endif
369-
if (uri.hasQueryItem("request"))
369+
if (uri.hasQueryItem("r"))
370370
{
371371
QByteArray temp;
372-
temp.append(uri.queryItemValue("request"));
372+
temp.append(uri.queryItemValue("r"));
373373
QString decoded = QUrl::fromPercentEncoding(temp);
374374
QUrl fetchUrl(decoded, QUrl::StrictMode);
375375

0 commit comments

Comments
 (0)