key check
This commit is contained in:
parent
f08fbc2487
commit
ebd6d6d58b
1 changed files with 5 additions and 6 deletions
|
|
@ -365,13 +365,12 @@ 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
|
if X_Api_Key is not None:
|
||||||
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)
|
||||||
|
else:
|
||||||
|
wallet = None
|
||||||
payment = await get_standalone_payment(payment_hash)
|
payment = await get_standalone_payment(payment_hash)
|
||||||
|
if payment:
|
||||||
await check_invoice_status(payment.wallet_id, payment_hash)
|
await check_invoice_status(payment.wallet_id, payment_hash)
|
||||||
payment = await get_standalone_payment(payment_hash)
|
payment = await get_standalone_payment(payment_hash)
|
||||||
if not payment:
|
if not payment:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue