mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-17 12:21:29 +02:00
fix: proper status check in invoice paid callback (#2592)
status fields like preimage and fee_msat are never updated otherwise
This commit is contained in:
parent
7298c4664b
commit
f9133760fc
@ -175,7 +175,7 @@ async def check_pending_payments():
|
|||||||
|
|
||||||
async def invoice_callback_dispatcher(checking_id: str):
|
async def invoice_callback_dispatcher(checking_id: str):
|
||||||
"""
|
"""
|
||||||
Takes incoming payments, sets pending=False, and dispatches them to
|
Takes an incoming payment, checks its status, and dispatches it to
|
||||||
invoice_listeners from core and extensions.
|
invoice_listeners from core and extensions.
|
||||||
"""
|
"""
|
||||||
payment = await get_standalone_payment(checking_id, incoming=True)
|
payment = await get_standalone_payment(checking_id, incoming=True)
|
||||||
@ -183,7 +183,7 @@ async def invoice_callback_dispatcher(checking_id: str):
|
|||||||
logger.trace(
|
logger.trace(
|
||||||
f"invoice listeners: sending invoice callback for payment {checking_id}"
|
f"invoice listeners: sending invoice callback for payment {checking_id}"
|
||||||
)
|
)
|
||||||
await payment.set_pending(False)
|
await payment.check_status()
|
||||||
for name, send_chan in invoice_listeners.items():
|
for name, send_chan in invoice_listeners.items():
|
||||||
logger.trace(f"invoice listeners: sending to `{name}`")
|
logger.trace(f"invoice listeners: sending to `{name}`")
|
||||||
await send_chan.put(payment)
|
await send_chan.put(payment)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user