diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml index c11fbd0e..54f029b4 100644 --- a/components/HistoryTable.qml +++ b/components/HistoryTable.qml @@ -265,7 +265,7 @@ ListView { font.pixelSize: 13 font.letterSpacing: -1 color: "#545454" - text: blockHeight + text: (typeof blockHeight != "undefined")? blockHeight : qsTr("Pending") + translationManager.emptyString } } diff --git a/src/model/TransactionHistoryModel.cpp b/src/model/TransactionHistoryModel.cpp index 333893aa..9aed10ce 100644 --- a/src/model/TransactionHistoryModel.cpp +++ b/src/model/TransactionHistoryModel.cpp @@ -75,7 +75,11 @@ QVariant TransactionHistoryModel::data(const QModelIndex &index, int role) const result = tInfo->fee(); break; case TransactionBlockHeightRole: - result = tInfo->blockHeight(); + // Use NULL QVariant for transactions without height. + // Forces them to be displayed at top when sorted by blockHeight. + if (tInfo->blockHeight() != 0) { + result = tInfo->blockHeight(); + } break; case TransactionHashRole: result = tInfo->hash();