Skip to content

Commit

Permalink
Fix ps collateral/denom creation tx category confusion (#2430)
Browse files Browse the repository at this point in the history
* fix ps collateral/denom creation tx confusion

* clarify the logic of detecting PrivateSendMakeCollaterals/PrivateSendCreateDenominations category
  • Loading branch information
UdjinM6 authored and codablock committed Nov 10, 2018
1 parent 0e9ad20 commit 5ecd91b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/qt/transactionrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,12 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
sub.type = TransactionRecord::PrivateSendCollateralPayment;
} else {
for (const auto& txout : wtx.tx->vout) {
if(txout.nValue == CPrivateSend::GetMaxCollateralAmount()) {
if (txout.nValue == CPrivateSend::GetMaxCollateralAmount()) {
sub.type = TransactionRecord::PrivateSendMakeCollaterals;
break;
}
if(CPrivateSend::IsDenominatedAmount(txout.nValue)) {
continue; // Keep looking, could be a part of PrivateSendCreateDenominations
} else if (CPrivateSend::IsDenominatedAmount(txout.nValue)) {
sub.type = TransactionRecord::PrivateSendCreateDenominations;
break;
break; // Done, it's definitely a tx creating mixing denoms, no need to look any further
}
}
}
Expand Down

0 comments on commit 5ecd91b

Please sign in to comment.