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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-06-01 13:44:21 +09:30
parent 45e16180bc
commit d348554ff4

View File

@@ -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: