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(
869
869
"""
870
870
if scale_bytes == b"\x00 " :
871
871
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 ))
875
872
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 )
878
879
if return_scale_obj :
879
880
return ScaleObj (obj )
880
881
else :
Original file line number Diff line number Diff line change @@ -615,11 +615,12 @@ def decode_scale(
615
615
616
616
if scale_bytes == b"\x00 " :
617
617
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 ))
621
618
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 )
623
624
if return_scale_obj :
624
625
return ScaleObj (obj )
625
626
else :
You can’t perform that action at this time.
0 commit comments