From c708cb1e2b3b59e87dc002c74b0e413520cd8448 Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Mon, 7 Mar 2022 18:27:03 +0000 Subject: [PATCH] Important fix to payment check --- lnbits/core/views/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 28195ddbc..d67cd7be2 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -365,7 +365,10 @@ async def api_payments_sse( @core_app.get("/api/v1/payments/{payment_hash}") async def api_payment(payment_hash, X_Api_Key: Optional[str] = Header(None)): wallet = None - if X_Api_Key: + try: + if X_Api_Key.extra: + print("No key") + except: wallet = await get_wallet_for_key(X_Api_Key) payment = await get_standalone_payment(payment_hash) await check_invoice_status(payment.wallet_id, payment_hash)