This commit is contained in:
SomberNight 2019-10-28 21:17:20 +01:00
parent 7b5869c7bc
commit a20317fe2a
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 4 additions and 2 deletions

View file

@ -222,7 +222,8 @@ class SendScreen(CScreen):
self.set_URI(self.payment_request_queued)
self.payment_request_queued = None
_list = self.app.wallet.get_invoices()
_list = [x for x in _list if x and x.get('status') != PR_PAID or x.get('rhash') in self.app.wallet.lnworker.logs]
lnworker_logs = self.app.wallet.lnworker.logs if self.app.wallet.lnworker else {}
_list = [x for x in _list if x and x.get('status') != PR_PAID or x.get('rhash') in lnworker_logs]
payments_container = self.screen.ids.payments_container
payments_container.data = [self.get_card(item) for item in _list]

View file

@ -94,7 +94,8 @@ class InvoiceList(MyTreeView):
def update(self):
_list = self.parent.wallet.get_invoices()
# filter out paid invoices unless we have the log
_list = [x for x in _list if x and x.get('status') != PR_PAID or x.get('rhash') in self.parent.wallet.lnworker.logs]
lnworker_logs = self.parent.wallet.lnworker.logs if self.parent.wallet.lnworker else {}
_list = [x for x in _list if x and x.get('status') != PR_PAID or x.get('rhash') in lnworker_logs]
self.model().clear()
self.update_headers(self.__class__.headers)
for idx, item in enumerate(_list):