Skip to content

Commit

Permalink
More improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 committed Aug 12, 2024
1 parent 3603e5e commit 8bcf65f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions src/qt/transactionrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,13 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
std::map<std::string, std::string> mapValue = wtx.mapValue;

bool isAllSigmaSpendFromMe = false;
for (const auto& vin : wtx.tx->vin) {
isAllSigmaSpendFromMe = (wallet->IsMine(vin, *wtx.tx) & ISMINE_SPENDABLE) && vin.IsSigmaSpend();
if (!isAllSigmaSpendFromMe)
break;
if (wtx.tx->vin[0].IsSigmaSpend()) {
isAllSigmaSpendFromMe = (wallet->IsMine(wtx.tx->vin[0], *wtx.tx) & ISMINE_SPENDABLE);
}

bool isAllJoinSplitFromMe = false;
for (const auto& vin : wtx.tx->vin) {
isAllJoinSplitFromMe = (wallet->IsMine(vin, *wtx.tx) & ISMINE_SPENDABLE) && vin.IsLelantusJoinSplit();
if (!isAllJoinSplitFromMe)
break;
if (wtx.tx->vin[0].IsLelantusJoinSplit()) {
isAllJoinSplitFromMe = (wallet->IsMine(wtx.tx->vin[0], *wtx.tx) & ISMINE_SPENDABLE);
}

if (wtx.tx->IsZerocoinSpend() || isAllSigmaSpendFromMe || isAllJoinSplitFromMe) {
Expand Down
2 changes: 1 addition & 1 deletion src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void TransactionTableModel::updateConfirmations()
// Invalidate status (number of confirmations) and (possibly) description
// for all rows. Qt is smart enough to only actually request the data for the
// visible rows.
int numRows = std::min(1000, priv->size()-1);
int numRows = std::min(300, priv->size()-1);
Q_EMIT dataChanged(index(0, Status), index(numRows, Status));
Q_EMIT dataChanged(index(0, ToAddress), index(numRows, ToAddress));
}
Expand Down

0 comments on commit 8bcf65f

Please sign in to comment.