X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fqt%2Ftransactiontablemodel.cpp;h=48c03d3a64e6c61048614ee54120ad8389bc0832;hp=847c9e97338657005545ee00f03a24f00a4d96d7;hb=6145f2d5e9f380a11bce933fe343d48fd8936a33;hpb=ada04fc66d18048cb1d94ab02290be2796d9395f diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 847c9e9..48c03d3 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -295,7 +295,7 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons status = tr("Confirmed (%1 confirmations)").arg(wtx->status.depth); break; } - if(wtx->type == TransactionRecord::Generated) + if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint) { switch(wtx->status.maturity) { @@ -359,6 +359,7 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const return tr("Sent to"); case TransactionRecord::SendToSelf: return tr("Payment to yourself"); + case TransactionRecord::StakeMint: case TransactionRecord::Generated: return tr("Mined"); default: @@ -371,6 +372,7 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx switch(wtx->type) { case TransactionRecord::Generated: + case TransactionRecord::StakeMint: return QIcon(":/icons/tx_mined"); case TransactionRecord::RecvWithAddress: case TransactionRecord::RecvFromOther: @@ -438,7 +440,7 @@ QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx) const { - if(wtx->type == TransactionRecord::Generated) + if(wtx->type == TransactionRecord::Generated || wtx->type == TransactionRecord::StakeMint) { switch(wtx->status.maturity) { @@ -573,7 +575,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const return QString::fromStdString(rec->getTxID()); case ConfirmedRole: // Return True if transaction counts for balance - return rec->status.confirmed && !(rec->type == TransactionRecord::Generated && + return rec->status.confirmed && !((rec->type == TransactionRecord::Generated || rec->type == TransactionRecord::StakeMint) && rec->status.maturity != TransactionStatus::Mature); case FormattedAmountRole: return formatTxAmount(rec, false);