Skip to content

Commit 1bf3f81

Browse files
Added ByteString to _restored_typed_primitive
1 parent 434a163 commit 1bf3f81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pycardano/serialization.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ def _restore_typed_primitive(
532532
if not isinstance(v, list):
533533
raise DeserializeException(f"Expected type list but got {type(v)}")
534534
return IndefiniteList([_restore_typed_primitive(t, w) for w in v])
535+
elif isclass(t) and t == ByteString:
536+
return ByteString(v)
535537
elif isclass(t) and issubclass(t, IndefiniteList):
536538
try:
537539
return IndefiniteList(v)

0 commit comments

Comments
 (0)