fix sparko invoice checking ("expired" was being considered as "paid").

This commit is contained in:
fiatjaf 2022-04-05 08:44:38 -03:00
parent 810b918619
commit 2f381960a0

View File

@ -152,9 +152,11 @@ class SparkWallet(Wallet):
if not r or not r.get("invoices"):
return PaymentStatus(None)
if r["invoices"][0]["status"] == "unpaid":
if r["invoices"][0]["status"] == "paid":
return PaymentStatus(True)
else:
return PaymentStatus(False)
return PaymentStatus(True)
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
# check if it's 32 bytes hex