mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-07 19:38:13 +02:00
Fixing string subtraction because sparko returns the msat amounts with suffix 'msat'
This commit is contained in:
parent
6f9ad06449
commit
03beeac049
@ -199,9 +199,7 @@ class SparkWallet(Wallet):
|
||||
if r["pays"][0]["payment_hash"] == checking_id:
|
||||
status = r["pays"][0]["status"]
|
||||
if status == "complete":
|
||||
fee_msat = -int(
|
||||
r["pays"][0]["amount_sent_msat"] - r["pays"][0]["amount_msat"]
|
||||
)
|
||||
fee_msat = -(int(r["pays"][0]["amount_sent_msat"][0:-4]) - int(r["pays"][0]["amount_msat"][0:-4]))
|
||||
return PaymentStatus(True, fee_msat, r["pays"][0]["preimage"])
|
||||
elif status == "failed":
|
||||
return PaymentStatus(False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user