diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 51365d16d1..dbae32708c 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -189,11 +189,32 @@ void TransactionRecord::updateStatus(const interfaces::WalletTxStatus& wtx, int // Determine transaction status // Sort order, unrecorded transactions sort to the top - status.sortKey = strprintf("%010d-%01d-%010u-%03d", + int typesort; + switch (type) { + case Fee: + typesort = 0; + break; + case IssuedAsset: + typesort = 1; + break; + case SendToAddress: + case SendToOther: + case SendToSelf: + typesort = 2; + break; + case RecvWithAddress: + case RecvFromOther: + typesort = 3; + break; + default: + typesort = 10; + } + status.sortKey = strprintf("%010d-%01d-%010u-%03d-%d", wtx.block_height, wtx.is_coinbase ? 1 : 0, wtx.time_received, - idx); + idx, + typesort); status.countsForBalance = wtx.is_trusted && !(wtx.blocks_to_maturity > 0); status.depth = wtx.depth_in_main_chain; status.cur_num_blocks = numBlocks; diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index c538f6c25e..5fbffcf691 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -554,7 +554,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const case Status: return QString::fromStdString(rec->status.sortKey); case Date: - return rec->time; + return QString::fromStdString(strprintf("%020-%s", rec->time, rec->status.sortKey)); case Type: return formatTxType(rec); case Watchonly: