internal payments get reported on async listeners.

This commit is contained in:
fiatjaf
2020-10-22 15:36:37 -03:00
parent a773584f6f
commit 2552fd8fc9
3 changed files with 23 additions and 5 deletions
+8
View File
@@ -77,6 +77,14 @@ async def webhook_handler():
return "", HTTPStatus.NO_CONTENT
internal_invoice_paid, internal_invoice_received = trio.open_memory_channel(0)
async def internal_invoice_listener():
async for checking_id in internal_invoice_received:
await run_on_pseudo_request(invoice_callback_dispatcher, checking_id)
async def invoice_listener():
async for checking_id in WALLET.paid_invoices_stream():
await run_on_pseudo_request(invoice_callback_dispatcher, checking_id)