From 9926849e3435e308c33aff819bd7033f581a5434 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Wed, 5 Jul 2023 10:20:05 +0100 Subject: [PATCH] fix ws example in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b1a3a9e..cdd7642b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ async def main(): async with connect("wss://api.devnet.solana.com") as websocket: await websocket.logs_subscribe() first_resp = await websocket.recv() - subscription_id = first_resp.result + subscription_id = first_resp[0].result next_resp = await websocket.recv() print(next_resp) await websocket.logs_unsubscribe(subscription_id) @@ -100,7 +100,7 @@ async def main(): async with connect("wss://api.devnet.solana.com") as websocket: await websocket.logs_subscribe() first_resp = await websocket.recv() - subscription_id = first_resp.result + subscription_id = first_resp[0].result async for idx, msg in enumerate(websocket): if idx == 3: break