From 9006422d3b9fefc7f6dd48efeee45b3487c0270d Mon Sep 17 00:00:00 2001 From: volbil Date: Mon, 12 Apr 2021 17:02:56 +0300 Subject: [PATCH] Fix rapids prefix --- src/pivxd.cpp | 2 +- src/qt/guiutil.cpp | 4 ++-- src/qt/guiutil.h | 2 +- src/qt/locale/pivx_de.ts | 2 +- src/qt/locale/pivx_en.ts | 2 +- src/qt/locale/pivx_en_US.ts | 4 ++-- src/qt/locale/pivx_es.ts | 4 ++-- src/qt/locale/pivx_es_ES.ts | 4 ++-- src/qt/locale/pivx_fr_FR.ts | 4 ++-- src/qt/locale/pivx_hr_HR.ts | 4 ++-- src/qt/locale/pivx_it.ts | 4 ++-- src/qt/locale/pivx_ko_KR.ts | 2 +- src/qt/locale/pivx_nl.ts | 2 +- src/qt/locale/pivx_pl.ts | 4 ++-- src/qt/locale/pivx_ru.ts | 4 ++-- src/qt/locale/pivx_tr.ts | 2 +- src/qt/locale/pivx_zh_CN.ts | 4 ++-- src/qt/openuridialog.cpp | 2 +- src/qt/paymentserver.cpp | 18 +++++++++--------- src/qt/paymentserver.h | 2 +- src/qt/rapids.cpp | 2 +- src/qt/recentrequeststablemodel.h | 2 +- src/qt/test/uritests.cpp | 22 +++++++++++----------- src/qt/walletmodel.cpp | 2 +- 24 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/pivxd.cpp b/src/pivxd.cpp index 90144ef4d..45d8e16bb 100644 --- a/src/pivxd.cpp +++ b/src/pivxd.cpp @@ -109,7 +109,7 @@ bool AppInit(int argc, char* argv[]) // Command-line RPC bool fCommandLine = false; for (int i = 1; i < argc; i++) - if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "pivx:")) + if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "rapids:")) fCommandLine = true; if (fCommandLine) { diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index e9759385d..3b6784ab6 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -206,9 +206,9 @@ bool parseBitcoinURI(const QUrl& uri, SendCoinsRecipient* out) bool parseBitcoinURI(QString uri, SendCoinsRecipient* out) { - // Convert pivx:// to pivx: + // Convert rapids:// to rapids: // - // Cannot handle this later, because pivx:// will cause Qt to see the part after // as host, + // Cannot handle this later, because rapids:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). if (uri.startsWith(URI_SCHEME "://", Qt::CaseInsensitive)) { uri.replace(0, std::strlen(URI_SCHEME) + 3, URI_SCHEME ":"); diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 6504fd647..a7cf572a6 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -67,7 +67,7 @@ void setupAmountWidget(QLineEdit* widget, QWidget* parent); // Update the cursor of the widget after a text change void updateWidgetTextAndCursorPosition(QLineEdit* widget, const QString& str); -// Parse "pivx:" URI into recipient object, return true on successful parsing +// Parse "rapids:" URI into recipient object, return true on successful parsing bool parseBitcoinURI(const QUrl& uri, SendCoinsRecipient* out); bool parseBitcoinURI(QString uri, SendCoinsRecipient* out); QString formatBitcoinURI(const SendCoinsRecipient& info); diff --git a/src/qt/locale/pivx_de.ts b/src/qt/locale/pivx_de.ts index c31927b33..984f0d7bc 100644 --- a/src/qt/locale/pivx_de.ts +++ b/src/qt/locale/pivx_de.ts @@ -2173,7 +2173,7 @@ Adresse: %4 Ungültige Zahlungsaufforderungsadresse %1 - Cannot start pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler Kann PIVX nicht starten: click-to-pay Handler diff --git a/src/qt/locale/pivx_en.ts b/src/qt/locale/pivx_en.ts index 5f7df334b..ec54dd557 100644 --- a/src/qt/locale/pivx_en.ts +++ b/src/qt/locale/pivx_en.ts @@ -2674,7 +2674,7 @@ Address: %4 - Cannot start pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler diff --git a/src/qt/locale/pivx_en_US.ts b/src/qt/locale/pivx_en_US.ts index 4f5c74e0b..be4e63975 100644 --- a/src/qt/locale/pivx_en_US.ts +++ b/src/qt/locale/pivx_en_US.ts @@ -2178,8 +2178,8 @@ Address: %4 Invalid payment address %1 - Cannot start pivx: click-to-pay handler - Cannot start pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler + Cannot start rapids: click-to-pay handler URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_es.ts b/src/qt/locale/pivx_es.ts index 6311973c0..a1c397563 100644 --- a/src/qt/locale/pivx_es.ts +++ b/src/qt/locale/pivx_es.ts @@ -2173,8 +2173,8 @@ Dirección: %4 Dirección de pago inválida %1 - Cannot start pivx: click-to-pay handler - No se puede iniciar pivx: módulo click-to-pay + Cannot start rapids: click-to-pay handler + No se puede iniciar rapids: módulo click-to-pay URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_es_ES.ts b/src/qt/locale/pivx_es_ES.ts index ebbc20550..db1ff6c15 100644 --- a/src/qt/locale/pivx_es_ES.ts +++ b/src/qt/locale/pivx_es_ES.ts @@ -2107,8 +2107,8 @@ Dirección: %4 Dirección de pago inválida %1 - Cannot start pivx: click-to-pay handler - No se puede iniciar pivx: módulo click-to-pay + Cannot start rapids: click-to-pay handler + No se puede iniciar rapids: módulo click-to-pay URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_fr_FR.ts b/src/qt/locale/pivx_fr_FR.ts index acc321e60..4ae7e92ba 100644 --- a/src/qt/locale/pivx_fr_FR.ts +++ b/src/qt/locale/pivx_fr_FR.ts @@ -2174,8 +2174,8 @@ Adresse : %4 Adresse de paiement invalide %1 - Cannot start pivx: click-to-pay handler - Impossible de démarrer pivx: gestionnaire click-to-pay + Cannot start rapids: click-to-pay handler + Impossible de démarrer rapids: gestionnaire click-to-pay URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_hr_HR.ts b/src/qt/locale/pivx_hr_HR.ts index 266801c17..0668a7aad 100644 --- a/src/qt/locale/pivx_hr_HR.ts +++ b/src/qt/locale/pivx_hr_HR.ts @@ -2122,8 +2122,8 @@ Adresa: %4 Nevažeća adresa za plaćanje %1 - Cannot start pivx: click-to-pay handler - Ne može se pokrenuti pivx: clik-to-pay handler + Cannot start rapids: click-to-pay handler + Ne može se pokrenuti rapids: clik-to-pay handler URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_it.ts b/src/qt/locale/pivx_it.ts index 25c1ec900..ca1c423a9 100644 --- a/src/qt/locale/pivx_it.ts +++ b/src/qt/locale/pivx_it.ts @@ -2178,8 +2178,8 @@ Indirizzo: %4 Indirizzo di pagamento %1 invalido - Cannot start pivx: click-to-pay handler - Impossibile avviare pivx: gestore click-to-pay + Cannot start rapids: click-to-pay handler + Impossibile avviare rapids: gestore click-to-pay URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_ko_KR.ts b/src/qt/locale/pivx_ko_KR.ts index 76c49f393..adcfdc975 100644 --- a/src/qt/locale/pivx_ko_KR.ts +++ b/src/qt/locale/pivx_ko_KR.ts @@ -2018,7 +2018,7 @@ Address: %4 잘못된 결제 주소 %1 - Cannot start pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler PIVX을 시작할 수 없습니다: 결제하기 위한 클릭 처리 diff --git a/src/qt/locale/pivx_nl.ts b/src/qt/locale/pivx_nl.ts index 1f2c30003..57d6e1359 100644 --- a/src/qt/locale/pivx_nl.ts +++ b/src/qt/locale/pivx_nl.ts @@ -2177,7 +2177,7 @@ Adres: %4 Ongeldig betalingsadres %1 - Cannot start pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler Kan pivx niet starten: click-to-pay handler diff --git a/src/qt/locale/pivx_pl.ts b/src/qt/locale/pivx_pl.ts index 1b3c2e547..d094da64b 100644 --- a/src/qt/locale/pivx_pl.ts +++ b/src/qt/locale/pivx_pl.ts @@ -2022,8 +2022,8 @@ Adres: %4 Nieprawidłowy adres płatności %1 - Cannot start pivx: click-to-pay handler - Nie można uruchomić pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler + Nie można uruchomić rapids: click-to-pay handler URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_ru.ts b/src/qt/locale/pivx_ru.ts index f86a26075..bef281702 100644 --- a/src/qt/locale/pivx_ru.ts +++ b/src/qt/locale/pivx_ru.ts @@ -2170,8 +2170,8 @@ Address: %4 Неверный адрес оплаты %1 - Cannot start pivx: click-to-pay handler - Не удалось запустить pivx: обработчик click-to-pay + Cannot start rapids: click-to-pay handler + Не удалось запустить rapids: обработчик click-to-pay URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/locale/pivx_tr.ts b/src/qt/locale/pivx_tr.ts index 1ce306868..0adf30c1f 100644 --- a/src/qt/locale/pivx_tr.ts +++ b/src/qt/locale/pivx_tr.ts @@ -1877,7 +1877,7 @@ Adres: %4 Geçersiz ödeme adresi %1 - Cannot start pivx: click-to-pay handler + Cannot start rapids: click-to-pay handler Pivx başlatılamıyor: tıkla ve ödeme işleyicisi diff --git a/src/qt/locale/pivx_zh_CN.ts b/src/qt/locale/pivx_zh_CN.ts index 2968087ea..7c0536fda 100644 --- a/src/qt/locale/pivx_zh_CN.ts +++ b/src/qt/locale/pivx_zh_CN.ts @@ -2026,8 +2026,8 @@ Address: %4 无效支付地址%1 - Cannot start pivx: click-to-pay handler - 无法启动pivx:点击支付处理程序 + Cannot start rapids: click-to-pay handler + 无法启动rapids:点击支付处理程序 URI cannot be parsed! This can be caused by an invalid PIVX address or malformed URI parameters. diff --git a/src/qt/openuridialog.cpp b/src/qt/openuridialog.cpp index 26dddf428..073f85f82 100644 --- a/src/qt/openuridialog.cpp +++ b/src/qt/openuridialog.cpp @@ -17,7 +17,7 @@ OpenURIDialog::OpenURIDialog(QWidget* parent) : QDialog(parent, Qt::WindowSystem { ui->setupUi(this); this->setStyleSheet(parent->styleSheet()); - ui->uriEdit->setPlaceholderText("pivx:"); + ui->uriEdit->setPlaceholderText("rapids:"); ui->labelSubtitle->setText("URI"); setCssProperty(ui->labelSubtitle, "text-title2-dialog"); diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index eed051f23..09c51caf4 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -42,7 +42,7 @@ const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds -const QString BITCOIN_IPC_PREFIX("pivx:"); +const QString BITCOIN_IPC_PREFIX("rapids:"); // BIP70 payment protocol messages const char* BIP70_MESSAGE_PAYMENTACK = "PaymentACK"; const char* BIP70_MESSAGE_PAYMENTREQUEST = "PaymentRequest"; @@ -183,11 +183,11 @@ void PaymentServer::ipcParseCommandLine(int argc, char* argv[]) if (arg.startsWith("-")) continue; - // If the pivx: URI contains a payment request, we are not able to detect the + // If the rapids: URI contains a payment request, we are not able to detect the // network as that would require fetching and parsing the payment request. // That means clicking such an URI which contains a testnet payment request // will start a mainnet instance and throw a "wrong network" error. - if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // pivx: URI + if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // rapids: URI { savedPaymentRequests.append(arg); @@ -267,7 +267,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) : QObject(p GOOGLE_PROTOBUF_VERIFY_VERSION; // Install global event filter to catch QFileOpenEvents - // on Mac: sent when you click pivx: links + // on Mac: sent when you click rapids: links // other OSes: helpful when dealing with payment request files (in the future) if (parent) parent->installEventFilter(this); @@ -283,7 +283,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) : QObject(p if (!uriServer->listen(name)) { // constructor is called early in init, so don't use "emit message()" here QMessageBox::critical(0, tr("Payment request error"), - tr("Cannot start pivx: click-to-pay handler")); + tr("Cannot start rapids: click-to-pay handler")); } else { connect(uriServer, &QLocalServer::newConnection, this, &PaymentServer::handleURIConnection); connect(this, &PaymentServer::receivedPaymentACK, this, &PaymentServer::handlePaymentACK); @@ -297,12 +297,12 @@ PaymentServer::~PaymentServer() } // -// OSX-specific way of handling pivx: URIs and +// OSX-specific way of handling rapids: URIs and // PaymentRequest mime types // bool PaymentServer::eventFilter(QObject* object, QEvent* event) { - // clicking on pivx: URIs creates FileOpen events on the Mac + // clicking on rapids: URIs creates FileOpen events on the Mac if (event->type() == QEvent::FileOpen) { QFileOpenEvent* fileEvent = static_cast(event); if (!fileEvent->file().isEmpty()) @@ -323,7 +323,7 @@ void PaymentServer::initNetManager() if (netManager != NULL) delete netManager; - // netManager is used to fetch paymentrequests given in pivx: URIs + // netManager is used to fetch paymentrequests given in rapids: URIs netManager = new QNetworkAccessManager(this); QNetworkProxy proxy; @@ -358,7 +358,7 @@ void PaymentServer::handleURIOrFile(const QString& s) return; } - if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // pivx: URI + if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // rapids: URI { QUrlQuery uri((QUrl(s))); if (uri.hasQueryItem("r")) // payment request URI diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index a0f6b22ba..bfba27a7a 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -6,7 +6,7 @@ #define BITCOIN_QT_PAYMENTSERVER_H // This class handles payment requests from clicking on -// pivx: URIs +// rapids: URIs // // This is somewhat tricky, because we have to deal with // the situation where the user clicks on a link during diff --git a/src/qt/rapids.cpp b/src/qt/rapids.cpp index 3b8572560..842611a15 100644 --- a/src/qt/rapids.cpp +++ b/src/qt/rapids.cpp @@ -642,7 +642,7 @@ int main(int argc, char* argv[]) exit(0); // Start up the payment server early, too, so impatient users that click on - // pivx: links repeatedly have their payment requests routed to this process: + // rapids: links repeatedly have their payment requests routed to this process: app.createPaymentServer(); #endif diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h index 479471a59..3d02a551f 100644 --- a/src/qt/recentrequeststablemodel.h +++ b/src/qt/recentrequeststablemodel.h @@ -53,7 +53,7 @@ class RecentRequestEntryLessThan Qt::SortOrder order; }; -/** Model for list of recently generated payment requests / pivx: URIs. +/** Model for list of recently generated payment requests / rapids: URIs. * Part of wallet model. */ class RecentRequestsTableModel : public QAbstractTableModel diff --git a/src/qt/test/uritests.cpp b/src/qt/test/uritests.cpp index e5a67c7ab..f09372f35 100644 --- a/src/qt/test/uritests.cpp +++ b/src/qt/test/uritests.cpp @@ -14,54 +14,54 @@ void URITests::uriTests() { SendCoinsRecipient rv; QUrl uri; - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?req-dontexist=")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?req-dontexist=")); QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?dontexist=")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?dontexist=")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.label == QString()); QVERIFY(rv.amount == 0); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?label=Some Example Address")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?label=Some Example Address")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.label == QString("Some Example Address")); QVERIFY(rv.amount == 0); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=0.001")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=0.001")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.label == QString()); QVERIFY(rv.amount == 100000); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=1.001")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=1.001")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.label == QString()); QVERIFY(rv.amount == 100100000); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=100&label=Some Example")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=100&label=Some Example")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.amount == 10000000000LL); QVERIFY(rv.label == QString("Some Example")); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?message=Some Example Address")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?message=Some Example Address")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.label == QString()); - QVERIFY(GUIUtil::parseBitcoinURI("pivx://D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?message=Some Example Address", &rv)); + QVERIFY(GUIUtil::parseBitcoinURI("rapids://D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?message=Some Example Address", &rv)); QVERIFY(rv.address == QString("D72dLgywmL73JyTwQBfuU29CADz9yCJ99v")); QVERIFY(rv.label == QString()); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?req-message=Some Example Address")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?req-message=Some Example Address")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=1,000&label=Some Example")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=1,000&label=Some Example")); QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv)); - uri.setUrl(QString("pivx:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=1,000.0&label=Some Example")); + uri.setUrl(QString("rapids:D72dLgywmL73JyTwQBfuU29CADz9yCJ99v?amount=1,000.0&label=Some Example")); QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); } diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index ce32e8127..d0b2d27bb 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -480,7 +480,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction& tran std::string value; rcp.paymentRequest.SerializeToString(&value); newTx->vOrderForm.push_back(std::make_pair(key, value)); - } else if (!rcp.message.isEmpty()) // Message from normal pivx:URI (pivx:XyZ...?message=example) + } else if (!rcp.message.isEmpty()) // Message from normal rapids:URI (rapids:XyZ...?message=example) { newTx->vOrderForm.push_back(std::make_pair("Message", rcp.message.toStdString())); }