mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 06:35:23 +01:00
core: check_invoice_status for outgoing payments
This commit is contained in:
parent
8dbe1b3678
commit
f08fbc2487
1 changed files with 4 additions and 1 deletions
|
@ -321,7 +321,10 @@ 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)
|
||||||
status = await WALLET.get_invoice_status(payment.checking_id)
|
if payment.is_out:
|
||||||
|
status = await WALLET.get_payment_status(payment.checking_id)
|
||||||
|
else:
|
||||||
|
status = await WALLET.get_invoice_status(payment.checking_id)
|
||||||
if not payment.pending:
|
if not payment.pending:
|
||||||
return status
|
return status
|
||||||
if payment.is_out and status.failed:
|
if payment.is_out and status.failed:
|
||||||
|
|
Loading…
Add table
Reference in a new issue