File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
async_substrate_interface Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -869,12 +869,13 @@ async def decode_scale(
869869 """
870870 if scale_bytes == b"\x00 " :
871871 obj = None
872- if type_string == "scale_info::0" : # Is an AccountId
873- # Decode AccountId bytes to SS58 address
874- return bytes .fromhex (ss58_decode (scale_bytes , SS58_FORMAT ))
875872 else :
876- await self ._wait_for_registry (_attempt , _retries )
877- obj = decode_by_type_string (type_string , self .registry , scale_bytes )
873+ if type_string == "scale_info::0" : # Is an AccountId
874+ # Decode AccountId bytes to SS58 address
875+ return bytes .fromhex (ss58_decode (scale_bytes , SS58_FORMAT ))
876+ else :
877+ await self ._wait_for_registry (_attempt , _retries )
878+ obj = decode_by_type_string (type_string , self .registry , scale_bytes )
878879 if return_scale_obj :
879880 return ScaleObj (obj )
880881 else :
Original file line number Diff line number Diff line change @@ -615,11 +615,12 @@ def decode_scale(
615615
616616 if scale_bytes == b"\x00 " :
617617 obj = None
618- if type_string == "scale_info::0" : # Is an AccountId
619- # Decode AccountId bytes to SS58 address
620- return bytes .fromhex (ss58_decode (scale_bytes , SS58_FORMAT ))
621618 else :
622- obj = decode_by_type_string (type_string , self .registry , scale_bytes )
619+ if type_string == "scale_info::0" : # Is an AccountId
620+ # Decode AccountId bytes to SS58 address
621+ return bytes .fromhex (ss58_decode (scale_bytes , SS58_FORMAT ))
622+ else :
623+ obj = decode_by_type_string (type_string , self .registry , scale_bytes )
623624 if return_scale_obj :
624625 return ScaleObj (obj )
625626 else :
You can’t perform that action at this time.
0 commit comments