mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
pkg/exchange: fix redundant code
This commit is contained in:
parent
5e7627cc7a
commit
771a136acd
|
@ -60,7 +60,6 @@ type Stream struct {
|
||||||
|
|
||||||
key, secret string
|
key, secret string
|
||||||
streamDataProvider StreamDataProvider
|
streamDataProvider StreamDataProvider
|
||||||
feeRateProvider FeeRatePoller
|
|
||||||
marketsInfo types.MarketMap
|
marketsInfo types.MarketMap
|
||||||
|
|
||||||
bookEventCallbacks []func(e BookEvent)
|
bookEventCallbacks []func(e BookEvent)
|
||||||
|
@ -481,7 +480,7 @@ func getFeeRate(symbol string, poller FeeRatePoller, marketsInfo types.MarketMap
|
||||||
|
|
||||||
func (s *Stream) handleTradeEvent(events []TradeEvent) {
|
func (s *Stream) handleTradeEvent(events []TradeEvent) {
|
||||||
for _, event := range events {
|
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)
|
gTrade, err := event.toGlobalTrade(feeRate)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if tradeLogLimiter.Allow() {
|
if tradeLogLimiter.Allow() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user