From 6840f777a20ec0a8e9a4d386cc418bc63620fcd7 Mon Sep 17 00:00:00 2001 From: Gareth Kirwan Date: Mon, 13 Nov 2023 13:16:23 +0700 Subject: [PATCH] fixup! Kucoin: Subscription configuration Replace for alias with index lookup for performance Fixes [review comment](https://github.com/thrasher-corp/gocryptotrader/pull/1394#discussion_r1387315999) --- exchanges/kucoin/kucoin_websocket.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exchanges/kucoin/kucoin_websocket.go b/exchanges/kucoin/kucoin_websocket.go index 986058d69e0..6830c25d753 100644 --- a/exchanges/kucoin/kucoin_websocket.go +++ b/exchanges/kucoin/kucoin_websocket.go @@ -1098,8 +1098,8 @@ func spotOrMarginPairSubs(assetPairs map[asset.Item]currency.Pairs, b *subscript s.Channel = fmt.Sprintf(b.Channel, f...) subs = append(subs, s) } else { - for _, p := range pairs { - f := append([]any{p.String()}, fmtArgs...) + for i := range pairs { + f := append([]any{pairs[i].String()}, fmtArgs...) s.Channel = fmt.Sprintf(b.Channel, f...) subs = append(subs, s) }