From da7686621b92ddac260e9b97331f4257165ab8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 3 Sep 2024 16:27:07 +0200 Subject: [PATCH] fix: fetch incoming payment did not work for internal payment --- tasks.py | 3 +-- views_api.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tasks.py b/tasks.py index 286cedc..7eb4293 100644 --- a/tasks.py +++ b/tasks.py @@ -1,7 +1,6 @@ import asyncio from lnbits.core.models import Payment -from lnbits.helpers import get_current_extension_name from lnbits.tasks import register_invoice_listener from .crud import set_ticket_paid @@ -9,7 +8,7 @@ async def wait_for_paid_invoices(): invoice_queue = asyncio.Queue() - register_invoice_listener(invoice_queue, get_current_extension_name()) + register_invoice_listener(invoice_queue, "ext_events") while True: payment = await invoice_queue.get() diff --git a/views_api.py b/views_api.py index 8deb212..6cfc572 100644 --- a/views_api.py +++ b/views_api.py @@ -170,7 +170,7 @@ async def api_ticket_send_ticket(event_id, payment_hash): status_code=HTTPStatus.NOT_FOUND, detail="Ticket could not be fetched.", ) - payment = await get_standalone_payment(payment_hash) + payment = await get_standalone_payment(payment_hash, incoming=True) assert payment price = ( event.price_per_ticket * 1000