From f530e7259aea2068719dfcaff0bc421057c2e551 Mon Sep 17 00:00:00 2001 From: bdhimes Date: Tue, 23 Sep 2025 23:02:20 +0200 Subject: [PATCH] Fixes inconsistency between AsyncSubstrateInterface and SubstrateInterface raw websocket logger for send --- 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 504f77d..e4c6c1c 100644 --- a/async_substrate_interface/sync_substrate.py +++ b/async_substrate_interface/sync_substrate.py @@ -1899,10 +1899,10 @@ def _make_rpc_request( ws = self.connect(init=False if attempt == 1 else True) for payload in payloads: item_id = get_next_id() - to_send = {**payload["payload"], **{"id": item_id}} + to_send = json.dumps({**payload["payload"], **{"id": item_id}}) if self.log_raw_websockets: raw_websocket_logger.debug(f"WEBSOCKET_SEND> {to_send}") - ws.send(json.dumps(to_send)) + ws.send(to_send) request_manager.add_request(item_id, payload["id"]) logger.debug( f"Submitted payload ID {payload['id']} with websocket ID {item_id}: {payload}"