fix sparko invoice checking ("expired" was being considered as "paid").
This commit is contained in:
parent
810b918619
commit
2f381960a0
1 changed files with 4 additions and 2 deletions
|
|
@ -152,9 +152,11 @@ class SparkWallet(Wallet):
|
||||||
|
|
||||||
if not r or not r.get("invoices"):
|
if not r or not r.get("invoices"):
|
||||||
return PaymentStatus(None)
|
return PaymentStatus(None)
|
||||||
if r["invoices"][0]["status"] == "unpaid":
|
|
||||||
return PaymentStatus(False)
|
if r["invoices"][0]["status"] == "paid":
|
||||||
return PaymentStatus(True)
|
return PaymentStatus(True)
|
||||||
|
else:
|
||||||
|
return PaymentStatus(False)
|
||||||
|
|
||||||
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
||||||
# check if it's 32 bytes hex
|
# check if it's 32 bytes hex
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue