From 48ebaf7bed6fe7bf22ef4cc73002ab24fa2ae445 Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Sun, 29 Dec 2024 08:27:31 +0700 Subject: [PATCH] fixup! Bitfinex: Fix WS trade processing --- exchanges/bitfinex/bitfinex_websocket.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exchanges/bitfinex/bitfinex_websocket.go b/exchanges/bitfinex/bitfinex_websocket.go index f48514093f9..e7d0978a479 100644 --- a/exchanges/bitfinex/bitfinex_websocket.go +++ b/exchanges/bitfinex/bitfinex_websocket.go @@ -922,11 +922,11 @@ func (b *Bitfinex) handleWSAllTrades(s *subscription.Subscription, respRaw []byt t.Side = order.Sell t.Amount = math.Abs(t.Amount) } - if feedEnabled { - b.Websocket.DataHandler <- &t - } trades[i] = t } + if feedEnabled { + b.Websocket.DataHandler <- trades + } if b.IsSaveTradeDataEnabled() { err = trade.AddTradesToBuffer(b.GetName(), trades...) }