Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Edge case where passing weird number of params vs normal param types …
…could result in valid data received and decoded, but unable to create the map.
  • Loading branch information
thewhaleking committed Sep 16, 2025
commit b72b7e77e903735952d996bf8030dcf41ca22541
11 changes: 7 additions & 4 deletions async_substrate_interface/utils/decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,14 @@ def concat_hash_len(key_hasher: str) -> int:
if decode_ss58:
if kts[kts.index(", ") + 2 : kts.index(")")] == "scale_info::0":
item_key = ss58_encode(bytes(item_key[0]), runtime.ss58_format)

else:
item_key = tuple(
dk[key + 1] for key in range(len(params), len(param_types) + 1, 2)
)
try:
item_key = tuple(
dk[key + 1]
for key in range(len(params), len(param_types) + 1, 2)
)
except IndexError:
item_key = dk

except Exception as _:
if not ignore_decoding_errors:
Expand Down