1
0

add invoice status to invoice_status callback (#8020)

* add invoice status to invoice_status callback

* debug statement fails tests

* removed commented lines, added progress/attempt counter comment in lnworker.pay_to_node,
and update the invoice_status event handler in qeinvoicelistmodel.py
This commit is contained in:
accumulator
2022-10-21 18:45:12 +02:00
committed by GitHub
parent d65ee17100
commit 6e536d2d91
5 changed files with 15 additions and 28 deletions

View File

@@ -158,16 +158,10 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
self.historyModel.init_model()
@event_listener
def on_event_invoice_status(self, wallet, key):
def on_event_invoice_status(self, wallet, key, status):
if wallet == self.wallet:
self._logger.debug('invoice status update for key %s' % key)
# FIXME event doesn't pass the new status, so we need to retrieve
invoice = self.wallet.get_invoice(key)
if invoice:
status = self.wallet.get_invoice_status(invoice)
self.invoiceStatusChanged.emit(key, status)
else:
self._logger.debug(f'No invoice found for key {key}')
self._logger.debug(f'invoice status update for key {key} to {status}')
self.invoiceStatusChanged.emit(key, status)
@qt_event_listener
def on_event_new_transaction(self, wallet, tx):