electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 776caeeff00f34d9380a16b431f0740ca9196ca9
parent f04e10f61afafaf66b23a887b87da9ecf40314bd
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 31 Jan 2019 19:43:11 +0100

follow-up prev commit: use maxsize to sort timestamps

Diffstat:
Melectrum/gui/qt/history_list.py | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/electrum/gui/qt/history_list.py b/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