Skip to content

Commit 06dd931

Browse files
committed
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 <[email protected]>
1 parent 3110d20 commit 06dd931

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/pyln-client/pyln/client/lightning.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ def replace_amounts(obj):
503503
"""
504504
if isinstance(obj, dict):
505505
for k, v in obj.items():
506-
if k.endswith('msat'):
506+
# Objects ending in msat are not treated specially!
507+
if k.endswith('msat') and not isinstance(v, dict):
507508
if isinstance(v, list):
508509
obj[k] = [Millisatoshi(e) for e in v]
509510
# FIXME: Deprecated "listconfigs" gives two 'null' fields:

0 commit comments

Comments
 (0)