mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 09:19:42 +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":
|
||||
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")
|
||||
|
|
Loading…
Add table
Reference in a new issue