TransactionHistoryModel: only place pending tx first

This commit is contained in:
selsta committed 2026-09-02 21:37:23 +02:00
1 parent 7691273c63
commit 27328f36ef
1 file changed
+6 -5
+6 -5
View File
@@ -79,13 +79,14 @@ QVariant TransactionHistoryModel::parseTransactionInfo(const TransactionInfo &tI
return tInfo.fee();
case TransactionBlockHeightRole:
{
// Use NULL QVariant for transactions without height.
// Forces them to be displayed at top when sorted by blockHeight.
if (tInfo.blockHeight() != 0)
// Use NULL QVariant for pending transactions without height.
// Forces them to be displayed at top when sorted by blockHeight,
// without also promoting failed transactions.
if (tInfo.blockHeight() == 0 && tInfo.isPending() && !tInfo.isFailed())
{
return tInfo.blockHeight();
return QVariant();
}
return QVariant();
return tInfo.blockHeight();
}
case TransactionSubaddrIndexRole:
{