From 72d750c51c1e4c0d0217454eaa93aa254ec2c8e2 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 8 Feb 2023 23:37:51 +0000 Subject: [PATCH] plot history: also include lightning items ``` 6.15 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter Traceback (most recent call last): File "/home/user/wspace/electrum/electrum/gui/qt/history_list.py", line 637, in plot_history_dialog plt = plot_history(list(self.hm.transactions.values())) File "/home/user/wspace/electrum/electrum/plot.py", line 24, in plot_history if not item['confirmations']: KeyError: 'confirmations' ``` --- electrum/plot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/plot.py b/electrum/plot.py index 1b27bf5d9..42bdee0c9 100644 --- a/electrum/plot.py +++ b/electrum/plot.py @@ -23,7 +23,8 @@ def plot_history(history): hist_in = defaultdict(int) hist_out = defaultdict(int) for item in history: - if not item['confirmations']: + is_lightning = item.get("lightning", False) + if not is_lightning and not item['confirmations']: continue if item['timestamp'] is None: continue