We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ByteString
_restore_typed_primitive
1 parent af8afdc commit cd1f359Copy full SHA for cd1f359
pycardano/serialization.py
@@ -532,6 +532,10 @@ def _restore_typed_primitive(
532
if not isinstance(v, list):
533
raise DeserializeException(f"Expected type list but got {type(v)}")
534
return IndefiniteList([_restore_typed_primitive(t, w) for w in v])
535
+ elif isclass(t) and t == ByteString:
536
+ if not isinstance(v, bytes):
537
+ raise DeserializeException(f"Expected type bytes but got {type(v)}")
538
+ return ByteString(v)
539
elif isclass(t) and issubclass(t, IndefiniteList):
540
try:
541
return IndefiniteList(v)
0 commit comments