mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Relax case sensitive string comparisons in various parts of GCT
This commit is contained in:
@@ -108,12 +108,12 @@ func (b *Bitmex) UpdateOrderbook(p currency.Pair, assetType string) (orderbook.B
|
||||
}
|
||||
|
||||
for _, ob := range orderbookNew {
|
||||
if strings.ToUpper(ob.Side) == exchange.SellOrderSide.ToString() {
|
||||
if strings.EqualFold(ob.Side, exchange.SellOrderSide.ToString()) {
|
||||
orderBook.Asks = append(orderBook.Asks,
|
||||
orderbook.Item{Amount: float64(ob.Size), Price: ob.Price})
|
||||
continue
|
||||
}
|
||||
if strings.ToUpper(ob.Side) == exchange.BuyOrderSide.ToString() {
|
||||
if strings.EqualFold(ob.Side, exchange.BuyOrderSide.ToString()) {
|
||||
orderBook.Bids = append(orderBook.Bids,
|
||||
orderbook.Item{Amount: float64(ob.Size), Price: ob.Price})
|
||||
continue
|
||||
|
||||
@@ -220,7 +220,7 @@ func New(name string, authLimit, unauthLimit *RateLimit, httpRequester *http.Cli
|
||||
|
||||
// IsValidMethod returns whether the supplied method is supported
|
||||
func IsValidMethod(method string) bool {
|
||||
return common.StringDataCompareUpper(supportedMethods, method)
|
||||
return common.StringDataCompareInsensitive(supportedMethods, method)
|
||||
}
|
||||
|
||||
// IsValidCycle checks to see whether the current request cycle is valid or not
|
||||
|
||||
Reference in New Issue
Block a user