Skip to content

Commit

Permalink
payment uri fix and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
radix42 committed May 8, 2019
1 parent f3ad25a commit 2bd0b47
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:<addr>?amt=x&memo=y") + "\n" + paymentInfo.error);
QMessageBox::critical(this, tr("Error paying pirate URI"),
tr("URI should be of the form 'pirate:<addr>?amt=x&memo=y") + "\n" + paymentInfo.error);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/txtablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
Expand All @@ -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 {
Expand Down Expand Up @@ -224,4 +224,4 @@ QString TxTableModel::getType(int row) const {

QString TxTableModel::getAmt(int row) const {
return Settings::getDecimalString(modeldata->at(row).amount);
}
}
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define APP_VERSION "0.7.4"
#define APP_VERSION "0.7.5"

0 comments on commit 2bd0b47

Please sign in to comment.