Skip to content

Commit f54c206

Browse files
committed
[GUI] Finally, fix duplicate records.
1 parent 7a25694 commit f54c206

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/qt/transactionrecord.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ bool TransactionRecord::decomposeDebitTransaction(const CWallet* wallet, const C
343343
}
344344

345345
// Decompose shielded debit
346-
return decomposeShieldedDebitTransaction(wallet, wtx, nTxFee, involvesWatchAddress, parts);
346+
return decomposeShieldedDebitTransaction(wallet, wtx, nTxFee, involvesWatchAddress, parts) || !parts.empty();
347347
}
348348

349349
// Check whether all the shielded inputs and outputs are from and send to this wallet
@@ -445,10 +445,14 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet*
445445
}
446446
}
447447

448-
// if we get to this point, we have a mixed debit transaction, can't break down payees.
449-
TransactionRecord record(wtx.GetHash(), wtx.GetTxTime(), wtx.GetTotalSize(), TransactionRecord::Other, "", nNet, 0);
450-
record.involvesWatchAddress = involvesWatchAddress;
451-
parts.append(record);
448+
// Check if wasn't able to decompose the transaction
449+
if (parts.empty()) {
450+
// if we get to this point, we have a mixed debit transaction, can't break down payees.
451+
TransactionRecord record(wtx.GetHash(), wtx.GetTxTime(), wtx.GetTotalSize(), TransactionRecord::Other, "", nNet,
452+
0);
453+
record.involvesWatchAddress = involvesWatchAddress;
454+
parts.append(record);
455+
}
452456
return parts;
453457
}
454458

0 commit comments

Comments
 (0)