From 9fcf5f1581b8e5668c364db3696e9647ebdaac85 Mon Sep 17 00:00:00 2001 From: f321x Date: Mon, 18 Aug 2025 11:02:22 +0200 Subject: [PATCH] qt: invoice_list: only show invoice if it is not None Check if the invoice is not None when the user tries to open the invoice details to prevent an Exception, update the list instead if the invoice hasn't been found. It can happen that the user deletes the invoice through the CLI and then tries to open the details in the gui, which hasn't been updated, at the same time. Fixes #10144 --- electrum/gui/qt/invoice_list.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/gui/qt/invoice_list.py b/electrum/gui/qt/invoice_list.py index 1acc866c6..0a56d9376 100644 --- a/electrum/gui/qt/invoice_list.py +++ b/electrum/gui/qt/invoice_list.py @@ -143,6 +143,9 @@ class InvoiceList(MyTreeView): def show_invoice(self, key): invoice = self.wallet.get_invoice(key) + if not invoice: + self.update() + return if invoice.is_lightning(): self.main_window.show_lightning_invoice(invoice) else: