From 2bd0b4784cebd5dfe029be112eae463f2e9f2c95 Mon Sep 17 00:00:00 2001 From: Jane Mercer Date: Wed, 8 May 2019 14:42:57 -0700 Subject: [PATCH] payment uri fix and version bump --- src/mainwindow.cpp | 4 ++-- src/settings.cpp | 4 ++-- src/txtablemodel.cpp | 6 +++--- src/version.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 66e0cc6..4f20bf7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -819,8 +819,8 @@ void MainWindow::payZcashURI(QString uri, QString myAddr) { qDebug() << "Recieved URI " << uri; PaymentURI paymentInfo = Settings::parseURI(uri); if (!paymentInfo.error.isEmpty()) { - QMessageBox::critical(this, tr("Error paying zcash URI"), - tr("URI should be of the form 'zcash:?amt=x&memo=y") + "\n" + paymentInfo.error); + QMessageBox::critical(this, tr("Error paying pirate URI"), + tr("URI should be of the form 'pirate:?amt=x&memo=y") + "\n" + paymentInfo.error); return; } diff --git a/src/settings.cpp b/src/settings.cpp index c1b5f65..05b4ebb 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -296,12 +296,12 @@ QString Settings::paymentURIPretty(PaymentURI uri) { PaymentURI Settings::parseURI(QString uri) { PaymentURI ans; - if (!uri.startsWith("zcash:")) { + if (!uri.startsWith("pirate:")) { ans.error = "Not a Pirate payment URI"; return ans; } - uri = uri.right(uri.length() - QString("zcash:").length()); + uri = uri.right(uri.length() - QString("pirate:").length()); QRegExp re("([a-zA-Z0-9]+)"); int pos; diff --git a/src/txtablemodel.cpp b/src/txtablemodel.cpp index f563921..3075d5c 100644 --- a/src/txtablemodel.cpp +++ b/src/txtablemodel.cpp @@ -139,7 +139,7 @@ void TxTableModel::updateAllData() { if (role == Qt::ToolTipRole) { switch (index.column()) { case 0: { - if (dat.memo.startsWith("zcash:")) { + if (dat.memo.startsWith("pirate:")) { return Settings::paymentURIPretty(Settings::parseURI(dat.memo)); } else { return modeldata->at(index.row()).type + @@ -161,7 +161,7 @@ void TxTableModel::updateAllData() { if (role == Qt::DecorationRole && index.column() == 0) { if (!dat.memo.isEmpty()) { // If the memo is a Payment URI, then show a payment request icon - if (dat.memo.startsWith("zcash:")) { + if (dat.memo.startsWith("pirate:")) { QIcon icon(":/icons/res/paymentreq.gif"); return QVariant(icon.pixmap(16, 16)); } else { @@ -224,4 +224,4 @@ QString TxTableModel::getType(int row) const { QString TxTableModel::getAmt(int row) const { return Settings::getDecimalString(modeldata->at(row).amount); -} \ No newline at end of file +} diff --git a/src/version.h b/src/version.h index 8c7b7da..1cc7722 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define APP_VERSION "0.7.4" +#define APP_VERSION "0.7.5"