From a4396f4f134b2052ca1e342aed4e0a4b82615806 Mon Sep 17 00:00:00 2001 From: Calin Culianu Date: Tue, 11 Sep 2018 00:58:19 +0300 Subject: [PATCH] Fixed potential bug when clicking in History List on slow wallet synch --- electrum/gui/qt/history_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/history_list.py b/electrum/gui/qt/history_list.py index 79fe4d3ab..3a3430b59 100644 --- a/electrum/gui/qt/history_list.py +++ b/electrum/gui/qt/history_list.py @@ -330,6 +330,9 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): tx_hash = item.data(0, Qt.UserRole) if not tx_hash: return + tx = self.wallet.transactions.get(tx_hash) + if not tx: + return if column is 0: column_title = "ID" column_data = tx_hash @@ -338,7 +341,6 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): column_data = item.text(column) tx_URL = block_explorer_URL(self.config, 'tx', tx_hash) height = self.wallet.get_tx_height(tx_hash).height - tx = self.wallet.transactions.get(tx_hash) is_relevant, is_mine, v, fee = self.wallet.get_wallet_delta(tx) is_unconfirmed = height <= 0 pr_key = self.wallet.invoices.paid.get(tx_hash)