Skip to content

Commit

Permalink
fixup! Kucoin: Subscription configuration
Browse files Browse the repository at this point in the history
Replace for alias with index lookup for performance

Fixes [review comment](thrasher-corp#1394 (comment))
  • Loading branch information
gbjk committed Nov 13, 2023
1 parent b0f1450 commit 6840f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exchanges/kucoin/kucoin_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6840f77

Please sign in to comment.