remove elif for vlad

This commit is contained in:
dni ⚡ 2023-04-05 11:39:01 +02:00
parent 50149c360c
commit 255638a9ce
No known key found for this signature in database
GPG key ID: 886317704CC4E618

View file

@ -160,10 +160,10 @@ class SparkWallet(Wallet):
if pay["status"] == "failed":
return PaymentResponse(False, None, None, None, str(exc))
elif pay["status"] == "pending":
if pay["status"] == "pending":
return PaymentResponse(None, payment_hash, None, None, None)
elif pay["status"] == "complete":
if pay["status"] == "complete":
r = pay
r["payment_preimage"] = pay["preimage"]
r["msatoshi"] = int(pay["amount_msat"][0:-4])
@ -218,7 +218,7 @@ class SparkWallet(Wallet):
- int(r["pays"][0]["amount_msat"][0:-4])
)
return PaymentStatus(True, fee_msat, r["pays"][0]["preimage"])
elif status == "failed":
if status == "failed":
return PaymentStatus(False)
return PaymentStatus(None)
raise KeyError("supplied an invalid checking_id")