mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-21 15:10:12 +00:00
testing: bybit references, bybit mock testing, pair formatting, standards improvement (#1322)
* fixes tests * pair formats and extra fixes * quick change before shazbert sees * sneaky lint * adds bybit mock testing and fixes test * whoops * error response instead * classic forgetting to lint * bybit live test no longer auto-records results * ty thrasher- Update exchanges/bybit/bybit_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> --------- Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -171,17 +171,17 @@ func (e *ExecutionLimits) GetOrderExecutionLimits(a asset.Item, cp currency.Pair
|
||||
|
||||
m1, ok := e.m[a]
|
||||
if !ok {
|
||||
return MinMaxLevel{}, errExchangeLimitAsset
|
||||
return MinMaxLevel{}, fmt.Errorf("%w %v", errExchangeLimitAsset, a)
|
||||
}
|
||||
|
||||
m2, ok := m1[cp.Base.Item]
|
||||
if !ok {
|
||||
return MinMaxLevel{}, errExchangeLimitBase
|
||||
return MinMaxLevel{}, fmt.Errorf("%w %v", errExchangeLimitBase, cp.Base)
|
||||
}
|
||||
|
||||
limit, ok := m2[cp.Quote.Item]
|
||||
if !ok {
|
||||
return MinMaxLevel{}, errExchangeLimitQuote
|
||||
return MinMaxLevel{}, fmt.Errorf("%w %v", errExchangeLimitQuote, cp.Quote)
|
||||
}
|
||||
|
||||
return limit, nil
|
||||
|
||||
Reference in New Issue
Block a user