From 2d619b655732f02be880c99f11d53ea128b7b9ea Mon Sep 17 00:00:00 2001 From: George Brewster <127057440+gbrew@users.noreply.github.com> Date: Sat, 4 Nov 2023 22:06:53 -0700 Subject: [PATCH] fix: use correct json-rpc formatting for eth_unsubscribe on SubscriptionStream drop (#2669) --- ethers-providers/src/rpc/transports/ws/manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-providers/src/rpc/transports/ws/manager.rs b/ethers-providers/src/rpc/transports/ws/manager.rs index cdcf17da4..20d5057d2 100644 --- a/ethers-providers/src/rpc/transports/ws/manager.rs +++ b/ethers-providers/src/rpc/transports/ws/manager.rs @@ -75,7 +75,7 @@ impl SubscriptionManager { // result in the server sending us notifications we ignore let unsub_request = InFlight { method: "eth_unsubscribe".to_string(), - params: SubId(server_id).serialize_raw().ok()?, + params: to_raw_value(&[server_id]).ok()?, channel, }; // reuse the RPC ID. this is somewhat dirty.