clean up type conversion

This commit is contained in:
c9s 2022-06-09 15:50:06 +08:00
parent f8dbd26736
commit 77eb5da7b7
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -323,12 +323,13 @@ func (e *Exchange) SubscribeMarketData(extraIntervals ...types.Interval) (chan t
loadedIntervals[it] = struct{}{}
}
// collect subscriptions
for _, sub := range e.marketDataStream.Subscriptions {
loadedSymbols[sub.Symbol] = struct{}{}
switch sub.Channel {
case types.KLineChannel:
loadedIntervals[types.Interval(sub.Options.Interval)] = struct{}{}
loadedIntervals[sub.Options.Interval] = struct{}{}
default:
// Since Environment is not yet been injected at this point, no hard error