Fix invoice-follower output logs and order_update

This commit is contained in:
Reckless_Satoshi 2023-04-30 09:32:15 -07:00
parent c693faacde
commit 3a49902a7c
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -65,20 +65,22 @@ class Command(BaseCommand):
# Only save the hold_payments that change (otherwise this function does not scale) # Only save the hold_payments that change (otherwise this function does not scale)
changed = not old_status == new_status changed = not old_status == new_status
if changed: if changed:
# self.handle_status_change(hold_lnpayment, old_status) # self.handle_status_change(hold_lnpayment, old_status)
self.update_order_status(hold_lnpayment)
hold_lnpayment.status = new_status hold_lnpayment.status = new_status
self.update_order_status(hold_lnpayment)
hold_lnpayment.save() hold_lnpayment.save()
# Report for debugging # Report for debugging
new_status = LNPayment.Status(hold_lnpayment.status).label old = LNPayment.Status(old_status).label
new = LNPayment.Status(hold_lnpayment.status).label
debug["invoices"].append( debug["invoices"].append(
{ {
idx: { idx: {
"payment_hash": str(hold_lnpayment.payment_hash), "payment_hash": str(hold_lnpayment.payment_hash),
"old_status": old_status, "old_status": old,
"new_status": new_status, "new_status": new,
} }
} }
) )