1
0

fix qt invoices list: handle lightning disabled

closes #5738
This commit is contained in:
SomberNight
2019-11-02 03:44:22 +01:00
parent ccccaf099f
commit 3bfcfb49c3

View File

@@ -85,6 +85,7 @@ class InvoiceList(MyTreeView):
return return
status_item = model.item(row, self.Columns.STATUS) status_item = model.item(row, self.Columns.STATUS)
status, status_str = get_request_status(req) status, status_str = get_request_status(req)
if self.parent.wallet.lnworker:
log = self.parent.wallet.lnworker.logs.get(key) log = self.parent.wallet.lnworker.logs.get(key)
if log and status == PR_INFLIGHT: if log and status == PR_INFLIGHT:
status_str += '... (%d)'%len(log) status_str += '... (%d)'%len(log)
@@ -155,6 +156,7 @@ class InvoiceList(MyTreeView):
menu.addAction(_("Details"), lambda: self.parent.show_invoice(key)) menu.addAction(_("Details"), lambda: self.parent.show_invoice(key))
if invoice['status'] == PR_UNPAID: if invoice['status'] == PR_UNPAID:
menu.addAction(_("Pay"), lambda: self.parent.do_pay_invoice(invoice)) menu.addAction(_("Pay"), lambda: self.parent.do_pay_invoice(invoice))
if self.parent.wallet.lnworker:
log = self.parent.wallet.lnworker.logs.get(key) log = self.parent.wallet.lnworker.logs.get(key)
if log: if log:
menu.addAction(_("View log"), lambda: self.show_log(key, log)) menu.addAction(_("View log"), lambda: self.show_log(key, log))