diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d13c55..9cdbfe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.0.0rc9 /2025-01-30 +* Fixes decoding account ids + ## 1.0.0rc8 /2025-01-30 * Minor bug fixes diff --git a/async_substrate_interface/async_substrate.py b/async_substrate_interface/async_substrate.py index 767f966..efeb24b 100644 --- a/async_substrate_interface/async_substrate.py +++ b/async_substrate_interface/async_substrate.py @@ -30,7 +30,7 @@ GenericCall, GenericExtrinsic, GenericRuntimeCallDefinition, - ss58_decode, + ss58_encode, ) from websockets.asyncio.client import connect from websockets.exceptions import ConnectionClosed @@ -872,7 +872,7 @@ async def decode_scale( else: if type_string == "scale_info::0": # Is an AccountId # Decode AccountId bytes to SS58 address - return bytes.fromhex(ss58_decode(scale_bytes, SS58_FORMAT)) + return ss58_encode(scale_bytes, SS58_FORMAT) else: await self._wait_for_registry(_attempt, _retries) obj = decode_by_type_string(type_string, self.registry, scale_bytes) diff --git a/pyproject.toml b/pyproject.toml index 8116899..f2f4c9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "async-substrate-interface" -version = "1.0.0rc8" +version = "1.0.0rc9" description = "Asyncio library for interacting with substrate. Mostly API-compatible with py-substrate-interface" readme = "README.md" license = { file = "LICENSE" }