mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 09:54:21 +01:00
Fix: LNbits backend payent state (#2187)
This commit is contained in:
parent
60839481ad
commit
14519135d8
@ -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"]:
|
||||
|
Loading…
Reference in New Issue
Block a user