mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 09:19:42 +01:00
fix cln wallet for msat migration (#1671)
* fix cln wallet for msat migration * status wants our funds only
This commit is contained in:
parent
ca41a92bd9
commit
39066e4bc8
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ class CoreLightningWallet(Wallet):
|
||||||
try:
|
try:
|
||||||
funds = self.ln.listfunds()
|
funds = self.ln.listfunds()
|
||||||
return StatusResponse(
|
return StatusResponse(
|
||||||
None, sum([ch["channel_sat"] * 1000 for ch in funds["channels"]])
|
None, sum([int(ch["our_amount_msat"]) for ch in funds["channels"]])
|
||||||
)
|
)
|
||||||
except RpcError as exc:
|
except RpcError as exc:
|
||||||
error_message = f"lightningd '{exc.method}' failed with '{exc.error}'."
|
error_message = f"lightningd '{exc.method}' failed with '{exc.error}'."
|
||||||
|
@ -141,7 +141,7 @@ class CoreLightningWallet(Wallet):
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return PaymentResponse(False, None, None, None, str(exc))
|
return PaymentResponse(False, None, None, None, str(exc))
|
||||||
|
|
||||||
fee_msat = -int(r["msatoshi_sent"] - r["msatoshi"])
|
fee_msat = -int(r["amount_sent_msat"] - r["amount_msat"])
|
||||||
return PaymentResponse(
|
return PaymentResponse(
|
||||||
True, r["payment_hash"], fee_msat, r["payment_preimage"], None
|
True, r["payment_hash"], fee_msat, r["payment_preimage"], None
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue