mirror of
https://github.com/lnbits/lnbits.git
synced 2025-07-01 19:11:17 +02:00
Important fix to payment check
This commit is contained in:
@ -365,7 +365,10 @@ async def api_payments_sse(
|
|||||||
@core_app.get("/api/v1/payments/{payment_hash}")
|
@core_app.get("/api/v1/payments/{payment_hash}")
|
||||||
async def api_payment(payment_hash, X_Api_Key: Optional[str] = Header(None)):
|
async def api_payment(payment_hash, X_Api_Key: Optional[str] = Header(None)):
|
||||||
wallet = 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)
|
wallet = await get_wallet_for_key(X_Api_Key)
|
||||||
payment = await get_standalone_payment(payment_hash)
|
payment = await get_standalone_payment(payment_hash)
|
||||||
await check_invoice_status(payment.wallet_id, payment_hash)
|
await check_invoice_status(payment.wallet_id, payment_hash)
|
||||||
|
Reference in New Issue
Block a user