From 20957ac4d92d0e7f016f81597c7f5b81729d8bc6 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 11 Sep 2018 02:43:54 +0200 Subject: [PATCH] follow-up prev --- electrum/gui/qt/history_list.py | 2 ++ electrum/gui/qt/utxo_list.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/history_list.py b/electrum/gui/qt/history_list.py index 3a3430b59..645388480 100644 --- a/electrum/gui/qt/history_list.py +++ b/electrum/gui/qt/history_list.py @@ -297,6 +297,8 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): else: tx_hash = item.data(0, Qt.UserRole) tx = self.wallet.transactions.get(tx_hash) + if not tx: + return self.parent.show_transaction(tx) def update_labels(self): diff --git a/electrum/gui/qt/utxo_list.py b/electrum/gui/qt/utxo_list.py index 78e865360..f75ffb370 100644 --- a/electrum/gui/qt/utxo_list.py +++ b/electrum/gui/qt/utxo_list.py @@ -68,7 +68,8 @@ class UTXOList(MyTreeWidget): if len(selected) == 1: txid = selected[0].split(':')[0] tx = self.wallet.transactions.get(txid) - menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx)) + if tx: + menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx)) menu.exec_(self.viewport().mapToGlobal(position))