From 11767c05ad5b0333377db9f83a703c4be7b2eeb9 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Tue, 4 Feb 2025 17:06:38 -0800 Subject: [PATCH 1/2] Fixes sync ss58 decoding --- async_substrate_interface/sync_substrate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async_substrate_interface/sync_substrate.py b/async_substrate_interface/sync_substrate.py index 3c3d772..0cb87d1 100644 --- a/async_substrate_interface/sync_substrate.py +++ b/async_substrate_interface/sync_substrate.py @@ -11,7 +11,7 @@ GenericCall, GenericExtrinsic, GenericRuntimeCallDefinition, - ss58_decode, + ss58_encode, ) from scalecodec.base import RuntimeConfigurationObject, ScaleBytes, ScaleType from websockets.sync.client import connect @@ -618,7 +618,7 @@ 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: obj = decode_by_type_string(type_string, self.registry, scale_bytes) if return_scale_obj: From e3b22f1df2e1b333e576a70c88de8fd39d9f3c07 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Tue, 4 Feb 2025 17:14:53 -0800 Subject: [PATCH 2/2] Bumps version and changelog --- CHANGELOG.md | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cdbfe2..8e73e42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.0.0rc10 /2025-02-04 +* Fixes decoding account ids for sync substrate + ## 1.0.0rc9 /2025-01-30 * Fixes decoding account ids diff --git a/pyproject.toml b/pyproject.toml index f2f4c9e..24cdd13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "async-substrate-interface" -version = "1.0.0rc9" +version = "1.0.0rc10" description = "Asyncio library for interacting with substrate. Mostly API-compatible with py-substrate-interface" readme = "README.md" license = { file = "LICENSE" }