Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.
Merged
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
8 changes: 4 additions & 4 deletions async_substrate_interface/async_substrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,7 @@ async def _process_response(
q = query_value
decoded = await self.decode_scale(value_scale_type, q, runtime=runtime)
result = decoded
if asyncio.iscoroutinefunction(result_handler):
if inspect.iscoroutinefunction(result_handler):
# For multipart responses as a result of subscriptions.
message, bool_result = await result_handler(result, subscription_id) # type: ignore[arg-type]
return message, bool_result
Expand Down Expand Up @@ -2637,11 +2637,11 @@ async def _make_rpc_request(
for item_id in request_manager.unresponded():
if (
item_id not in request_manager.responses
or asyncio.iscoroutinefunction(result_handler)
or inspect.iscoroutinefunction(result_handler)
):
if response := await ws.retrieve(item_id):
if (
asyncio.iscoroutinefunction(result_handler)
inspect.iscoroutinefunction(result_handler)
and not subscription_added
):
# handles subscriptions, overwrites the previous mapping of {item_id : payload_id}
Expand Down Expand Up @@ -2670,7 +2670,7 @@ async def _make_rpc_request(
)
if (
result_processor is not None
and not asyncio.iscoroutinefunction(result_handler)
and not inspect.iscoroutinefunction(result_handler)
):
decoded_response = result_processor(
decoded_response, item_id
Expand Down
Loading