Fix: LNbits backend payent state (#2187)

This commit is contained in:
callebtc
2024-03-12 13:43:41 +01:00
committed by GitHub
parent 60839481ad
commit 14519135d8
+5 -3
View File
@@ -126,10 +126,12 @@ class LNbitsWallet(Wallet):
return PaymentStatus(None)
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
r = await self.client.get(url=f"/api/v1/payments/{checking_id}")
if r.is_error:
try:
r = await self.client.get(url=f"/api/v1/payments/{checking_id}")
r.raise_for_status()
except Exception:
return PaymentStatus(None)
data = r.json()
if "paid" not in data or not data["paid"]: