Merge pull request #1761 from c9s/edwin/bybit/fix-nil-pointer
Some checks are pending
Go / build (1.21, 6.2) (push) Waiting to run
golang-lint / lint (push) Waiting to run

FIX: [bybit] fix redundant code
This commit is contained in:
bailantaotao 2024-10-01 21:46:34 +08:00 committed by GitHub
commit 9963f5c14d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,7 +60,6 @@ type Stream struct {
key, secret string
streamDataProvider StreamDataProvider
feeRateProvider FeeRatePoller
marketsInfo types.MarketMap
bookEventCallbacks []func(e BookEvent)
@ -481,7 +480,7 @@ func getFeeRate(symbol string, poller FeeRatePoller, marketsInfo types.MarketMap
func (s *Stream) handleTradeEvent(events []TradeEvent) {
for _, event := range events {
feeRate := getFeeRate(event.Symbol, s.feeRateProvider, s.marketsInfo)
feeRate := getFeeRate(event.Symbol, s.streamDataProvider, s.marketsInfo)
gTrade, err := event.toGlobalTrade(feeRate)
if err != nil {
if tradeLogLimiter.Allow() {