Skip to content

Commit 05390a1

Browse files
authored
remove uses of return scale obj (#2479)
decode_scale's return_scale_obj arg was removed, but its references were not.
1 parent 599be1f commit 05390a1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

bittensor/utils/async_substrate_interface.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,8 +1613,7 @@ async def _process_response(
16131613
q = bytes(query_value)
16141614
else:
16151615
q = query_value
1616-
obj = await self.decode_scale(value_scale_type, q, True)
1617-
result = obj
1616+
result = await self.decode_scale(value_scale_type, q)
16181617
if asyncio.iscoroutinefunction(result_handler):
16191618
# For multipart responses as a result of subscriptions.
16201619
message, bool_result = await result_handler(response, subscription_id)
@@ -2346,7 +2345,6 @@ async def get_constant(
23462345
return await self.decode_scale(
23472346
constant.type,
23482347
bytes(constant.constant_value),
2349-
return_scale_obj=True,
23502348
)
23512349
else:
23522350
return None
@@ -2571,7 +2569,6 @@ def concat_hash_len(key_hasher: str) -> int:
25712569
item_key_obj = await self.decode_scale(
25722570
type_string=f"({', '.join(key_type_string)})",
25732571
scale_bytes=bytes.fromhex(item[0][len(prefix) :]),
2574-
return_scale_obj=True,
25752572
)
25762573

25772574
# strip key_hashers to use as item key
@@ -2592,9 +2589,7 @@ def concat_hash_len(key_hasher: str) -> int:
25922589
item_bytes = hex_to_bytes(item[1])
25932590

25942591
item_value = await self.decode_scale(
2595-
type_string=value_type,
2596-
scale_bytes=item_bytes,
2597-
return_scale_obj=True,
2592+
type_string=value_type, scale_bytes=item_bytes
25982593
)
25992594
except Exception as _:
26002595
if not ignore_decoding_errors:

0 commit comments

Comments
 (0)