Skip to content

Commit 1abecf8

Browse files
committed
Use fully recursive JSON logic for compound clvm streamable types
1 parent 828e413 commit 1abecf8

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

chia/wallet/util/clvm_streamable.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,19 @@ def json_deserialize_with_clvm_streamable(
125125
for old_field in old_streamable_fields:
126126
if is_compound_type(old_field.type):
127127
inner_type = get_args(old_field.type)[0]
128-
if is_clvm_streamable_type(inner_type):
129-
new_streamable_fields.append(
130-
dataclasses.replace(
131-
old_field,
132-
convert_function=function_to_convert_one_item(
133-
old_field.type,
134-
functools.partial(
135-
json_deserialize_with_clvm_streamable,
136-
streamable_type=inner_type,
137-
translation_layer=translation_layer,
138-
),
128+
new_streamable_fields.append(
129+
dataclasses.replace(
130+
old_field,
131+
convert_function=function_to_convert_one_item(
132+
old_field.type,
133+
functools.partial(
134+
json_deserialize_with_clvm_streamable,
135+
streamable_type=inner_type,
136+
translation_layer=translation_layer,
139137
),
140-
)
138+
),
141139
)
142-
else:
143-
new_streamable_fields.append(old_field)
140+
)
144141
elif is_clvm_streamable_type(old_field.type):
145142
new_streamable_fields.append(
146143
dataclasses.replace(

0 commit comments

Comments
 (0)