Merge pull request #555 from lnbits/extraPayDetails

Adds more payment details if the correct key is providedd
This commit is contained in:
Arc 2022-03-07 08:20:07 +00:00 committed by GitHub
commit 43f9394014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -364,6 +364,7 @@ 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: if X_Api_Key:
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)