Skip to content

Commit fed5f8d

Browse files
authored
Merge pull request #23 from opentensor/fix/decode-scale-acc-id
Fixes decoding acc ids
2 parents 1b108d7 + 8602653 commit fed5f8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

async_substrate_interface/async_substrate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
GenericCall,
3131
GenericExtrinsic,
3232
GenericRuntimeCallDefinition,
33-
ss58_decode,
33+
ss58_encode,
3434
)
3535
from websockets.asyncio.client import connect
3636
from websockets.exceptions import ConnectionClosed
@@ -872,7 +872,7 @@ async def decode_scale(
872872
else:
873873
if type_string == "scale_info::0": # Is an AccountId
874874
# Decode AccountId bytes to SS58 address
875-
return bytes.fromhex(ss58_decode(scale_bytes, SS58_FORMAT))
875+
return ss58_encode(scale_bytes, SS58_FORMAT)
876876
else:
877877
await self._wait_for_registry(_attempt, _retries)
878878
obj = decode_by_type_string(type_string, self.registry, scale_bytes)

0 commit comments

Comments
 (0)