Browse Source

follow-up prev commit: use maxsize to sort timestamps

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
ThomasV 6 years ago
parent
commit
776caeeff0
  1. 9
      electrum/gui/qt/history_list.py

9
electrum/gui/qt/history_list.py

@ -24,6 +24,7 @@
# SOFTWARE.
import os
import sys
import datetime
from datetime import date
from typing import TYPE_CHECKING, Tuple, Dict
@ -138,7 +139,11 @@ class HistoryModel(QAbstractItemModel, Logger):
timestamp = tx_item['timestamp']
if is_lightning:
status = 0
status_str = format_time(int(timestamp))
if timestamp is None:
timestamp = sys.maxsize
status_str = 'unconfirmed'
else:
status_str = format_time(int(timestamp))
else:
tx_hash = tx_item['txid']
conf = tx_item['confirmations']
@ -151,7 +156,7 @@ class HistoryModel(QAbstractItemModel, Logger):
status, status_str = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
# we sort by timestamp
if conf<=0:
timestamp = time.time()
timestamp = sys.maxsize
if role == Qt.UserRole:
# for sorting

Loading…
Cancel
Save