mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 17:26:15 +01:00
remove elif for vlad
This commit is contained in:
parent
50149c360c
commit
255638a9ce
1 changed files with 3 additions and 3 deletions
|
@ -160,10 +160,10 @@ class SparkWallet(Wallet):
|
||||||
if pay["status"] == "failed":
|
if pay["status"] == "failed":
|
||||||
return PaymentResponse(False, None, None, None, str(exc))
|
return PaymentResponse(False, None, None, None, str(exc))
|
||||||
|
|
||||||
elif pay["status"] == "pending":
|
if pay["status"] == "pending":
|
||||||
return PaymentResponse(None, payment_hash, None, None, None)
|
return PaymentResponse(None, payment_hash, None, None, None)
|
||||||
|
|
||||||
elif pay["status"] == "complete":
|
if pay["status"] == "complete":
|
||||||
r = pay
|
r = pay
|
||||||
r["payment_preimage"] = pay["preimage"]
|
r["payment_preimage"] = pay["preimage"]
|
||||||
r["msatoshi"] = int(pay["amount_msat"][0:-4])
|
r["msatoshi"] = int(pay["amount_msat"][0:-4])
|
||||||
|
@ -218,7 +218,7 @@ class SparkWallet(Wallet):
|
||||||
- int(r["pays"][0]["amount_msat"][0:-4])
|
- int(r["pays"][0]["amount_msat"][0:-4])
|
||||||
)
|
)
|
||||||
return PaymentStatus(True, fee_msat, r["pays"][0]["preimage"])
|
return PaymentStatus(True, fee_msat, r["pays"][0]["preimage"])
|
||||||
elif status == "failed":
|
if status == "failed":
|
||||||
return PaymentStatus(False)
|
return PaymentStatus(False)
|
||||||
return PaymentStatus(None)
|
return PaymentStatus(None)
|
||||||
raise KeyError("supplied an invalid checking_id")
|
raise KeyError("supplied an invalid checking_id")
|
||||||
|
|
Loading…
Add table
Reference in a new issue