bitfinex: fix websocket subscribing issue caused by formatting (#1276)

* bitfinex: fix subscribing issue caused by formatting

* glorious: nits

---------

Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
Ryan O'Hara-Reid
2023-07-24 13:26:50 +10:00
committed by GitHub
parent f48993dfdc
commit b797934854

View File

@@ -1493,12 +1493,8 @@ func (b *Bitfinex) WsUpdateOrderbook(p currency.Pair, assetType asset.Item, book
// GenerateDefaultSubscriptions Adds default subscriptions to websocket to be handled by ManageSubscriptions()
func (b *Bitfinex) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription, error) {
var channels = []string{
wsBook,
wsTrades,
wsTicker,
wsCandles,
}
var wsPairFormat = currency.PairFormat{Uppercase: true}
var channels = []string{wsBook, wsTrades, wsTicker, wsCandles}
var subscriptions []stream.ChannelSubscription
assets := b.GetAssetTypes(true)
@@ -1526,7 +1522,7 @@ func (b *Bitfinex) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription,
}
params["key"] = "trade:1m:" + prefix + enabledPairs[k].String() + fundingPeriod
} else {
params["symbol"] = enabledPairs[k].String()
params["symbol"] = wsPairFormat.Format(enabledPairs[k])
}
subscriptions = append(subscriptions, stream.ChannelSubscription{