From d348554ff4a2b31a92be1a9741320886d2cc5b75 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Jun 2023 13:44:21 +0930 Subject: [PATCH] pyln-client: don't try to convert objects to Millisatoshi. The new listconfigs fields will be objects, and this messes us up! Signed-off-by: Rusty Russell --- contrib/pyln-client/pyln/client/lightning.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/pyln-client/pyln/client/lightning.py b/contrib/pyln-client/pyln/client/lightning.py index 47257be96..70c1d0f27 100644 --- a/contrib/pyln-client/pyln/client/lightning.py +++ b/contrib/pyln-client/pyln/client/lightning.py @@ -503,7 +503,8 @@ class LightningRpc(UnixDomainSocketRpc): """ if isinstance(obj, dict): for k, v in obj.items(): - if k.endswith('msat'): + # Objects ending in msat are not treated specially! + if k.endswith('msat') and not isinstance(v, dict): if isinstance(v, list): obj[k] = [Millisatoshi(e) for e in v] # FIXME: Deprecated "listconfigs" gives two 'null' fields: