diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 58e9bdd99deb8..153df1499fc5b 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -452,7 +452,9 @@ RES_ICONS = \ qt/pivx/res/img/ic-check-tor.svg \ qt/pivx/res/img/ic-label.svg \ qt/pivx/res/img/ic-transaction-received.svg \ + qt/pivx/res/img/ic-transaction-received-memo.svg \ qt/pivx/res/img/dark/ic-transaction-received.svg \ + qt/pivx/res/img/dark/ic-transaction-received-memo.svg \ qt/pivx/res/img/dark/ic-transaction-warning.svg \ qt/pivx/res/img/dark/ic-transaction-mint.svg \ qt/pivx/res/img/dark/ic-transaction-mint-inactive.svg \ diff --git a/src/qt/pivx.qrc b/src/qt/pivx.qrc index 2fce11e60dd5e..c10a47dd53b80 100644 --- a/src/qt/pivx.qrc +++ b/src/qt/pivx.qrc @@ -142,10 +142,12 @@ pivx/res/img/ic-transaction-warning.svg pivx/res/img/ic-transaction-mint.svg pivx/res/img/ic-transaction-received.svg + pivx/res/img/ic-transaction-received-memo.svg pivx/res/img/ic-transaction-sent.svg pivx/res/img/ic-transaction-staked.svg pivx/res/img/dark/ic-transaction-mint.svg pivx/res/img/dark/ic-transaction-received.svg + pivx/res/img/dark/ic-transaction-received-memo.svg pivx/res/img/dark/ic-transaction-sent.svg pivx/res/img/dark/ic-transaction-staked.svg pivx/res/img/ic-transaction-mint-inactive.svg diff --git a/src/qt/pivx/qtutils.cpp b/src/qt/pivx/qtutils.cpp index 39e6546a51f00..422d9e6ccbb8c 100644 --- a/src/qt/pivx/qtutils.cpp +++ b/src/qt/pivx/qtutils.cpp @@ -159,7 +159,8 @@ void setSortTxTypeFilter(QComboBox* filter, SortEdit* lineEditType) filter->addItem(QObject::tr("Received"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) | TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther) | - TransactionFilterProxy::TYPE(TransactionRecord::RecvWithShieldedAddress)); + TransactionFilterProxy::TYPE(TransactionRecord::RecvWithShieldedAddress) | + TransactionFilterProxy::TYPE(TransactionRecord::RecvWithShieldedAddressMemo)); filter->addItem(QObject::tr("Sent"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) | TransactionFilterProxy::TYPE(TransactionRecord::SendToOther) | @@ -167,6 +168,7 @@ void setSortTxTypeFilter(QComboBox* filter, SortEdit* lineEditType) TransactionFilterProxy::TYPE(TransactionRecord::SendToNobody)); filter->addItem(QObject::tr("Shield"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithShieldedAddress) | + TransactionFilterProxy::TYPE(TransactionRecord::RecvWithShieldedAddressMemo) | TransactionFilterProxy::TYPE(TransactionRecord::SendToShielded) | TransactionFilterProxy::TYPE(TransactionRecord::SendToSelfShieldToShieldChangeAddress) | TransactionFilterProxy::TYPE(TransactionRecord::SendToSelfShieldToTransparent) | diff --git a/src/qt/pivx/res/img/dark/ic-transaction-received-memo.svg b/src/qt/pivx/res/img/dark/ic-transaction-received-memo.svg new file mode 100644 index 0000000000000..4d8e7193a1012 --- /dev/null +++ b/src/qt/pivx/res/img/dark/ic-transaction-received-memo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/qt/pivx/res/img/ic-transaction-received-memo.svg b/src/qt/pivx/res/img/ic-transaction-received-memo.svg new file mode 100644 index 0000000000000..ccfd520aed16c --- /dev/null +++ b/src/qt/pivx/res/img/ic-transaction-received-memo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/qt/pivx/txrow.cpp b/src/qt/pivx/txrow.cpp index f8514258483f2..de7ef2890f8aa 100644 --- a/src/qt/pivx/txrow.cpp +++ b/src/qt/pivx/txrow.cpp @@ -89,6 +89,10 @@ void TxRow::setType(bool isLightTheme, int type, bool isConfirmed) path = "://ic-transaction-received"; css = "text-list-amount-receive"; break; + case TransactionRecord::RecvWithShieldedAddressMemo: + path = "://ic-transaction-received-memo"; + css = "text-list-amount-receive"; + break; case TransactionRecord::SendToAddress: case TransactionRecord::SendToOther: case TransactionRecord::ZerocoinSpend: diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index c7c76a3e28a5c..afe1c037f41f2 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -180,6 +180,9 @@ bool TransactionRecord::decomposeCreditTransaction(const CWallet* wallet, const sub.type = TransactionRecord::RecvWithShieldedAddress; sub.credit = sspkm->GetOutPointValue(wtx, out); sub.memo = sspkm->GetOutPointMemo(wtx, out); + if (!sub.memo->empty()) { + sub.type = TransactionRecord::RecvWithShieldedAddressMemo; + } sub.idx = i; parts.append(sub); } diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index 66f41c06c1603..a803c99281fda 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -98,6 +98,7 @@ class TransactionRecord P2CSUnlockStaker, // Staker watching the owner spent the delegated utxo SendToShielded, // Shielded send RecvWithShieldedAddress, // Shielded receive + RecvWithShieldedAddressMemo, // Shielded recieve with memo SendToSelfShieldedAddress, // Shielded send to self SendToSelfShieldToTransparent, // Unshield coins to self SendToSelfShieldToShieldChangeAddress, // Changing coins from one shielded address to another inside the wallet. diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 60e93f91b8866..32bd86e69e5b0 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -479,6 +479,8 @@ QString TransactionTableModel::formatTxType(const TransactionRecord* wtx) const return tr("Converted z%1 to %1").arg(CURRENCY_UNIT.c_str()); case TransactionRecord::RecvWithShieldedAddress: return tr("Received with shielded"); + case TransactionRecord::RecvWithShieldedAddressMemo: + return tr("Received shielded memo"); case TransactionRecord::SendToShielded: return tr("Shielded send to"); case TransactionRecord::SendToNobody: @@ -532,6 +534,7 @@ QString TransactionTableModel::formatTxToAddress(const TransactionRecord* wtx, b case TransactionRecord::RecvFromZerocoinSpend: return lookupAddress(wtx->address, tooltip); case TransactionRecord::RecvWithShieldedAddress: + case TransactionRecord::RecvWithShieldedAddressMemo: case TransactionRecord::SendToShielded: // todo: add addressbook support for shielded addresses. return QString::fromStdString(wtx->address); @@ -708,6 +711,7 @@ QVariant TransactionTableModel::data(const QModelIndex& index, int role) const return COLOR_ORPHAN; else return COLOR_STAKE; + } // Conflicted tx if (rec->status.status == TransactionStatus::Conflicted || rec->status.status == TransactionStatus::NotAccepted) {