1
0

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'
```
This commit is contained in:
SomberNight
2023-02-08 23:37:51 +00:00
parent 227ccc65d4
commit 72d750c51c

View File

@@ -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