diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index fa5e3e330..b5d4a5a80 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -689,6 +689,9 @@ class ElectrumWindow(QMainWindow): for item in self.wallet.get_history(self.current_account): tx_hash, conf, value, timestamp, balance = item time_str = _("unknown") + if conf is None and timestamp is None: + continue # skip history in offline mode + if conf > 0: time_str = self.format_time(timestamp) if conf == -1: diff --git a/lib/wallet.py b/lib/wallet.py index 74230e84b..33a7279bc 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -744,7 +744,8 @@ class Abstract_Wallet(object): #balance += value conf, timestamp = self.verifier.get_confirmations(tx_hash) if self.verifier else (None, None) history.append( (tx_hash, conf, value, timestamp) ) - history.sort(key = lambda x: self.verifier.get_txpos(x[0])) + if self.verifier: + history.sort(key = lambda x: self.verifier.get_txpos(x[0])) c, u = self.get_balance(domain) balance = c + u