From 03bb08863a661e044a3b8109ca0587c905bea3fe Mon Sep 17 00:00:00 2001 From: xinhangzhou Date: Mon, 24 Mar 2025 17:46:35 +0800 Subject: [PATCH] chore: add missing brace and remove redundant word in comment Signed-off-by: xinhangzhou --- providers/base/provider_test.go | 2 +- providers/websockets/bybit/messages.go | 33 +++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/providers/base/provider_test.go b/providers/base/provider_test.go index e331c86fc..659d3f121 100644 --- a/providers/base/provider_test.go +++ b/providers/base/provider_test.go @@ -557,7 +557,7 @@ func TestWebSocketProvider(t *testing.T) { expectedPrices: map[connecttypes.CurrencyPair]*big.Int{}, }, { - name: "updates the timestamp associated with a result if the the data is unchanged and still valid", + name: "updates the timestamp associated with a result if the data is unchanged and still valid", handler: func() wshandlers.WebSocketQueryHandler[connecttypes.CurrencyPair, *big.Int] { // First response is valid and sets the data. resolved := map[connecttypes.CurrencyPair]providertypes.ResolvedResult[*big.Int]{ diff --git a/providers/websockets/bybit/messages.go b/providers/websockets/bybit/messages.go index 29e3e2521..93b00d6fd 100644 --- a/providers/websockets/bybit/messages.go +++ b/providers/websockets/bybit/messages.go @@ -154,22 +154,23 @@ type SubscriptionResponse struct { // // Example: // -// { -// "topic": "tickers.BTCUSDT", -// "ts": 1673853746003, -// "type": "snapshot", -// "cs": 2588407389, -// "data": { -// "symbol": "BTCUSDT", -// "lastPrice": "21109.77", -// "highPrice24h": "21426.99", -// "lowPrice24h": "20575", -// "prevPrice24h": "20704.93", -// "volume24h": "6780.866843", -// "turnover24h": "141946527.22907118", -// "price24hPcnt": "0.0196", -// "usdIndexPrice": "21120.2400136" -// } +// { +// "topic": "tickers.BTCUSDT", +// "ts": 1673853746003, +// "type": "snapshot", +// "cs": 2588407389, +// "data": { +// "symbol": "BTCUSDT", +// "lastPrice": "21109.77", +// "highPrice24h": "21426.99", +// "lowPrice24h": "20575", +// "prevPrice24h": "20704.93", +// "volume24h": "6780.866843", +// "turnover24h": "141946527.22907118", +// "price24hPcnt": "0.0196", +// "usdIndexPrice": "21120.2400136" +// } +// } type TickerUpdateMessage struct { Topic string `json:"topic"` Data TickerUpdateData `json:"data"`