From 0081d0bd81f7158ccfcc5798b40ba757fd3cdae4 Mon Sep 17 00:00:00 2001 From: Victor Lee Date: Thu, 3 Mar 2022 18:50:31 -0800 Subject: [PATCH] fix WebSocket Unsubscribe() - the ExtraJson already contains `type : subscribe` - instead of adding another `type`, it should replace the `type` instead --- Source/Coinbase.Pro/WebSockets/CoinbaseProWebSocket.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Coinbase.Pro/WebSockets/CoinbaseProWebSocket.cs b/Source/Coinbase.Pro/WebSockets/CoinbaseProWebSocket.cs index 9f54aeb..9f0e22a 100644 --- a/Source/Coinbase.Pro/WebSockets/CoinbaseProWebSocket.cs +++ b/Source/Coinbase.Pro/WebSockets/CoinbaseProWebSocket.cs @@ -132,7 +132,7 @@ public async Task SubscribeAsync(Subscription subscription) public void Unsubscribe(Subscription subscription) { - subscription.ExtraJson.Add("type", JToken.FromObject(MessageType.Unsubscribe)); + subscription.ExtraJson["type"] = JToken.FromObject(MessageType.Unsubscribe); var json = JsonConvert.SerializeObject(subscription);