diff --git a/src/qt/pivx/qtutils.cpp b/src/qt/pivx/qtutils.cpp index 1086ee60a3639..ee5adae401e91 100644 --- a/src/qt/pivx/qtutils.cpp +++ b/src/qt/pivx/qtutils.cpp @@ -182,6 +182,7 @@ void setSortTxTypeFilter(QComboBox* filter, SortEdit* lineEditType) filter->addItem(QObject::tr("Hot stakes"), TransactionFilterProxy::TYPE(TransactionRecord::StakeHot)); filter->addItem(QObject::tr("Delegated"), TransactionFilterProxy::TYPE(TransactionRecord::P2CSDelegationSent) | TransactionFilterProxy::TYPE(TransactionRecord::P2CSDelegationSentOwner)); filter->addItem(QObject::tr("Delegations"), TransactionFilterProxy::TYPE(TransactionRecord::P2CSDelegation)); + filter->addItem(QObject::tr("DAO payment"), TransactionFilterProxy::TYPE(TransactionRecord::BudgetPayment)); } void setupSettings(QSettings* settings) diff --git a/src/qt/pivx/txrow.cpp b/src/qt/pivx/txrow.cpp index 159a6132b7692..b7602c171a3ac 100644 --- a/src/qt/pivx/txrow.cpp +++ b/src/qt/pivx/txrow.cpp @@ -78,6 +78,7 @@ void TxRow::setType(bool isLightTheme, int type, bool isConfirmed) case TransactionRecord::StakeZPIV: case TransactionRecord::MNReward: case TransactionRecord::StakeMint: + case TransactionRecord::BudgetPayment: path = "://ic-transaction-staked"; css = "text-list-amount-receive"; break; diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp index 04b78769a508e..c82f71acb6a8d 100644 --- a/src/qt/transactionfilterproxy.cpp +++ b/src/qt/transactionfilterproxy.cpp @@ -113,6 +113,6 @@ int TransactionFilterProxy::rowCount(const QModelIndex& parent) const bool TransactionFilterProxy::isOrphan(const int status, const int type) { return ( (type == TransactionRecord::Generated || type == TransactionRecord::StakeMint || - type == TransactionRecord::StakeZPIV || type == TransactionRecord::MNReward) + type == TransactionRecord::StakeZPIV || type == TransactionRecord::MNReward || type == TransactionRecord::BudgetPayment) && (status == TransactionStatus::Conflicted || status == TransactionStatus::NotAccepted) ); } diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index acd9c57e095d7..443afea1c183a 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -55,9 +55,11 @@ bool TransactionRecord::decomposeCoinStake(const CWallet* wallet, const CWalletT int nIndexMN = (int) wtx.tx->vout.size() - 1; if (ExtractDestination(wtx.tx->vout[nIndexMN].scriptPubKey, destMN) && (mine = IsMine(*wallet, destMN)) ) { sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY; - sub.type = TransactionRecord::MNReward; sub.address = EncodeDestination(destMN); sub.credit = wtx.tx->vout[nIndexMN].nValue; + // Simple way to differentiate budget payments from MN rewards. + CAmount mn_reward = Params().GetConsensus().nMNBlockReward; + sub.type = sub.credit > mn_reward ? TransactionRecord::BudgetPayment : TransactionRecord::MNReward; } } @@ -612,6 +614,7 @@ void TransactionRecord::updateStatus(const CWalletTx& wtx, int chainHeight) type == TransactionRecord::StakeMint || type == TransactionRecord::StakeZPIV || type == TransactionRecord::MNReward || + type == TransactionRecord::BudgetPayment || type == TransactionRecord::StakeDelegated || type == TransactionRecord::StakeHot) { diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index edf310d1ff176..c1eebd0d141f4 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -81,6 +81,7 @@ class TransactionRecord SendToOther, RecvWithAddress, MNReward, + BudgetPayment, RecvFromOther, SendToSelf, ZerocoinMint, diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 89683161383bb..1b3435ec59b38 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -435,6 +435,8 @@ QString TransactionTableModel::formatTxType(const TransactionRecord* wtx) const return tr("Received with"); case TransactionRecord::MNReward: return tr("Masternode Reward"); + case TransactionRecord::BudgetPayment: + return tr("Budget Payment"); case TransactionRecord::RecvFromOther: return tr("Received from"); case TransactionRecord::SendToAddress: @@ -493,6 +495,7 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord* wtx case TransactionRecord::StakeMint: case TransactionRecord::StakeZPIV: case TransactionRecord::MNReward: + case TransactionRecord::BudgetPayment: return QIcon(":/icons/tx_mined"); case TransactionRecord::RecvWithAddress: case TransactionRecord::RecvFromOther: @@ -520,6 +523,7 @@ QString TransactionTableModel::formatTxToAddress(const TransactionRecord* wtx, b return QString::fromStdString(wtx->address) + watchAddress; case TransactionRecord::RecvWithAddress: case TransactionRecord::MNReward: + case TransactionRecord::BudgetPayment: case TransactionRecord::SendToAddress: case TransactionRecord::Generated: case TransactionRecord::StakeMint: