History: fix sorting of multiple pending transactions

This commit is contained in:
selsta committed 2026-09-04 20:00:12 +02:00
1 parent 27328f36ef
commit c6647c9d63
1 file changed
+8
+8
View File
@@ -1494,6 +1494,14 @@ Rectangle {
// applying sorts
root.txOffset = 0;
root.txData.sort(function(a, b) {
if (root.sortBy === "blockheight") {
var aPending = typeof a.blockheight === "undefined";
var bPending = typeof b.blockheight === "undefined";
if (aPending !== bPending)
return aPending ? 1 : -1;
if (aPending)
return a.timestamp - b.timestamp;
}
return a[root.sortBy] - b[root.sortBy];
});