refactor: dev-friendly payment status name (#2322)

* refactor: dev-friendly payment status name
* refactor: change `PaymentStatus(True, ...)` to `PaymentSuccessStatus(...)`
This commit is contained in:
Vlad Stan
2024-03-13 16:17:33 +01:00
committed by GitHub
parent 65b8868c36
commit 352fd23c0b
18 changed files with 120 additions and 74 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ from lnbits.settings import settings
from .base import (
InvoiceResponse,
PaymentPendingStatus,
PaymentResponse,
PaymentStatus,
StatusResponse,
@@ -134,7 +135,7 @@ class LNPayWallet(Wallet):
)
if r.is_error:
return PaymentStatus(None)
return PaymentPendingStatus()
data = r.json()
preimage = data["payment_preimage"]