fix: lnd/lndrest failed canceled/expired invoices (#3143)
This commit is contained in:
@@ -16,6 +16,7 @@ from lnbits.utils.crypto import AESCipher, random_secret_and_hash
|
||||
|
||||
from .base import (
|
||||
InvoiceResponse,
|
||||
PaymentFailedStatus,
|
||||
PaymentPendingStatus,
|
||||
PaymentResponse,
|
||||
PaymentStatus,
|
||||
@@ -237,6 +238,9 @@ class LndWallet(Wallet):
|
||||
if resp.settled:
|
||||
return PaymentSuccessStatus(preimage=resp.r_preimage.hex())
|
||||
|
||||
if resp.state == "CANCELED":
|
||||
return PaymentFailedStatus()
|
||||
|
||||
return PaymentPendingStatus()
|
||||
except grpc.RpcError as exc:
|
||||
logger.warning(exc)
|
||||
|
||||
Reference in New Issue
Block a user