mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-11 01:11:18 +02:00
Revert "Check invoice status outgoing"
This commit is contained in:
parent
2a53ee00fc
commit
b4ad0e101d
@ -321,9 +321,6 @@ async def check_invoice_status(
|
|||||||
payment = await get_wallet_payment(wallet_id, payment_hash, conn=conn)
|
payment = await get_wallet_payment(wallet_id, payment_hash, conn=conn)
|
||||||
if not payment:
|
if not payment:
|
||||||
return PaymentStatus(None)
|
return PaymentStatus(None)
|
||||||
if payment.is_out:
|
|
||||||
status = await WALLET.get_payment_status(payment.checking_id)
|
|
||||||
else:
|
|
||||||
status = await WALLET.get_invoice_status(payment.checking_id)
|
status = await WALLET.get_invoice_status(payment.checking_id)
|
||||||
if not payment.pending:
|
if not payment.pending:
|
||||||
return status
|
return status
|
||||||
|
@ -365,12 +365,13 @@ 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)):
|
||||||
if X_Api_Key is not None:
|
|
||||||
wallet = await get_wallet_for_key(X_Api_Key)
|
|
||||||
else:
|
|
||||||
wallet = None
|
wallet = None
|
||||||
|
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)
|
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…
x
Reference in New Issue
Block a user