From d997b1752912feaadb11d5cf46b4905ef97bcf40 Mon Sep 17 00:00:00 2001 From: fusion44 Date: Mon, 4 Jul 2022 18:45:45 +0200 Subject: [PATCH] fix: decoding of bolt11 invoices with route hints refs #129 --- app/models/lightning.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/lightning.py b/app/models/lightning.py index f2637c7..e74704b 100644 --- a/app/models/lightning.py +++ b/app/models/lightning.py @@ -334,7 +334,7 @@ class HopHint(BaseModel): ..., description="The public key of the node at the start of the channel." ) - chan_id: int = Query(..., description="The unique identifier of the channel.") + chan_id: str = Query(..., description="The unique identifier of the channel.") fee_base_msat: int = Query( ..., description="The base fee of the channel denominated in msat." @@ -383,7 +383,7 @@ class RouteHint(BaseModel): @classmethod def from_cln_json(cls, h) -> "RouteHint": - hop_hints = [HopHint.from_cln_json(hh) for hh in h.hop_hints] + hop_hints = [HopHint.from_cln_json(hop_hint) for hop_hint in h] return cls(hop_hints=hop_hints)