fix: cln nodemanager errors on failed transactions (#2865)
This commit is contained in:
parent
982732cbd4
commit
2ee7180aa0
1 changed files with 8 additions and 3 deletions
|
|
@ -304,14 +304,19 @@ class CoreLightningNode(Node):
|
|||
return [
|
||||
NodePayment(
|
||||
bolt11=pay.get("bolt11"),
|
||||
amount=pay["amount_msat"],
|
||||
fee=int(pay["amount_msat"]) - int(pay["amount_sent_msat"]),
|
||||
amount=pay.get("amount_msat", 0),
|
||||
fee=int(pay.get("amount_msat", 0))
|
||||
- int(pay.get("amount_sent_msat", 0)),
|
||||
memo=pay.get("description"),
|
||||
time=pay["created_at"],
|
||||
preimage=pay.get("preimage"),
|
||||
payment_hash=pay["payment_hash"],
|
||||
pending=pay["status"] != "complete",
|
||||
destination=await self.get_peer_info(pay["destination"]),
|
||||
destination=(
|
||||
await self.get_peer_info(pay.get("destination"))
|
||||
if pay.get("destination")
|
||||
else None
|
||||
),
|
||||
)
|
||||
for pay in reversed(result["pays"])
|
||||
if pay["status"] != "failed"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue