electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 1aec982b27a7b12d51493a393849da4f4bccd10d
parent 7ca64ebbd8872e8ebe0b0c3849e2ec078e0dfcab
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed,  3 Mar 2021 16:57:54 +0100

kivy: SendScreen: reliably show LN payment attempt progress for invoice

Diffstat:
Melectrum/gui/kivy/uix/screens.py | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/electrum/gui/kivy/uix/screens.py b/electrum/gui/kivy/uix/screens.py @@ -219,24 +219,21 @@ class SendScreen(CScreen, Logger): _list = self.app.wallet.get_unpaid_invoices() _list.reverse() payments_container = self.ids.payments_container - payments_container.data = [self.get_card(item) for item in _list] + payments_container.data = [self.get_card(invoice) for invoice in _list] def update_item(self, key, invoice): payments_container = self.ids.payments_container data = payments_container.data for item in data: if item['key'] == key: - status = self.app.wallet.get_invoice_status(invoice) - status_str = invoice.get_status_str(status) - item['status'] = status - item['status_str'] = status_str + item.update(self.get_card(invoice)) payments_container.data = data payments_container.refresh_from_data() def show_item(self, obj): self.app.show_invoice(obj.is_lightning, obj.key) - def get_card(self, item: Invoice): + def get_card(self, item: Invoice) -> Dict[str, Any]: status = self.app.wallet.get_invoice_status(item) status_str = item.get_status_str(status) is_lightning = item.type == PR_TYPE_LN