From 3ceb2443a3042ee1bc79d8548908068e65ec468f Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Sun, 27 Oct 2019 12:12:00 -0700 Subject: [PATCH 1/2] Show incoming memos properly --- src/controller.cpp | 7 ++++++- src/txtablemodel.cpp | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index bc820a1..f43fe4d 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -377,10 +377,15 @@ void Controller::refreshTransactions() { address = (it["address"].is_null() ? "" : QString::fromStdString(it["address"])); model->markAddressUsed(address); + QString memo; + if (!it["memo"].is_null()) { + memo = QString::fromStdString(it["memo"]); + } + items.push_back(TransactionItemDetail{ address, CAmount::fromqint64(it["amount"].get()), - "" + memo }); TransactionItem tx{ diff --git a/src/txtablemodel.cpp b/src/txtablemodel.cpp index 3b0a795..04d50e3 100644 --- a/src/txtablemodel.cpp +++ b/src/txtablemodel.cpp @@ -150,14 +150,14 @@ bool TxTableModel::exportToCsv(QString fileName) const { } } - if (role == Qt::DecorationRole && index.column() == 0) { + if (role == Qt::DecorationRole && index.column() == 0) { bool hasMemo = false; for (int i=0; i < dat.items.length(); i++) { if (!dat.items[i].memo.isEmpty()) { hasMemo = true; } } - + // If the memo is a Payment URI, then show a payment request icon if (dat.items.length() == 1 && dat.items[0].memo.startsWith("zcash:")) { QIcon icon(":/icons/res/paymentreq.gif"); From 167cfc8bd509d3fd2dd81cb8c9cfeb850121f094 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Sun, 27 Oct 2019 12:17:14 -0700 Subject: [PATCH 2/2] Fix from fields in confirm dialog --- src/confirm.ui | 19 ------------------- src/sendtab.cpp | 11 ----------- src/version.h | 2 +- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/confirm.ui b/src/confirm.ui index 6bb28a7..5babfd4 100644 --- a/src/confirm.ui +++ b/src/confirm.ui @@ -14,25 +14,6 @@ Confirm Transaction - - - - From - - - - - - - - - true - - - - - - diff --git a/src/sendtab.cpp b/src/sendtab.cpp index 730a234..9c6171a 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -606,15 +606,6 @@ bool MainWindow::confirmTx(Tx tx, RecurringPaymentInfo* rpi) { // Syncing warning confirm.syncingWarning->setVisible(Settings::getInstance()->isSyncing()); - // And FromAddress in the confirm dialog - confirm.sendFrom->setText(fnSplitAddressForWrap(tx.fromAddr)); - confirm.sendFrom->setFont(fixedFont); - QString tooltip = tr("Current balance : ") + - rpc->getModel()->getAllBalances().value(tx.fromAddr).toDecimalZECUSDString(); - tooltip += "\n" + tr("Balance after this Tx: ") + - (rpc->getModel()->getAllBalances().value(tx.fromAddr) - totalSpending).toDecimalZECUSDString(); - confirm.sendFrom->setToolTip(tooltip); - // Show the dialog and submit it if the user confirms return d.exec() == QDialog::Accepted; } @@ -686,8 +677,6 @@ void MainWindow::sendButton() { } QString MainWindow::doSendTxValidations(Tx tx) { - if (!Settings::isValidAddress(tx.fromAddr)) return QString(tr("From Address is Invalid")); - for (auto toAddr : tx.toAddrs) { if (!Settings::isValidAddress(toAddr.addr)) { QString addr = (toAddr.addr.length() > 100 ? toAddr.addr.left(100) + "..." : toAddr.addr); diff --git a/src/version.h b/src/version.h index d40071e..3e7162c 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define APP_VERSION "0.7.9" +#define APP_VERSION "1.0-beta1"