History: sort by blockheight for date ordering

This commit is contained in:
tobtoht 2024-01-21 16:36:50 +01:00
parent c4beab7e57
commit f291649ce2
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -146,7 +146,10 @@ QVariant TransactionHistoryModel::parseTransactionInfo(const TransactionRow &tIn
case Column::Date:
{
if (role == Qt::UserRole) {
return tInfo.timestamp();
if (tInfo.blockHeight() > 0) {
return tInfo.blockHeight();
}
return tInfo.timestamp().toMSecsSinceEpoch();
}
return tInfo.timestamp().toString(QString("%1 %2 ").arg(conf()->get(Config::dateFormat).toString(),
conf()->get(Config::timeFormat).toString()));