Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions async_substrate_interface/async_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2574,16 +2574,12 @@ async def query_multi(
for change_storage_key, change_data in result_group["changes"]:
# Decode result for specified storage_key
storage_key = storage_key_map[change_storage_key]
if change_data is None:
change_data = b""
else:
change_data = bytes.fromhex(change_data[2:])
if change_data is not None:
change_data = ScaleBytes(change_data)
result.append(
(
storage_key,
await self.decode_scale(
storage_key.value_scale_type, change_data, runtime=runtime
),
storage_key.decode_scale_value(change_data).value,
),
)

Expand Down
8 changes: 3 additions & 5 deletions async_substrate_interface/sync_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2163,14 +2163,12 @@ def query_multi(
for change_storage_key, change_data in result_group["changes"]:
# Decode result for specified storage_key
storage_key = storage_key_map[change_storage_key]
if change_data is None:
change_data = b"\x00"
else:
change_data = bytes.fromhex(change_data[2:])
if change_data is not None:
change_data = ScaleBytes(change_data)
result.append(
(
storage_key,
self.decode_scale(storage_key.value_scale_type, change_data),
storage_key.decode_scale_value(change_data).value,
),
)

Expand Down
Loading