mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
Optimisation: large structs/huge param fixes (part 2) (#262)
* updated golangci config to enable hugeparam linter * ModifyOrder struct usage converted to a pointer * OrderBook conversion to struct * More conversion of large structs to pointers * updated golangci config to enable hugeparam linter * ModifyOrder struct usage converted to a pointer * OrderBook conversion to struct * More conversion of large structs to pointers * disabled hugeParam check for golang again * changed based on suggested feedback and fix for no default provider * fixed typing
This commit is contained in:
@@ -386,7 +386,7 @@ func TestGetAccountInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestModifyOrder(t *testing.T) {
|
||||
_, err := g.ModifyOrder(exchange.ModifyOrder{})
|
||||
_, err := g.ModifyOrder(&exchange.ModifyOrder{})
|
||||
if err == nil {
|
||||
t.Error("Test failed - ModifyOrder() error")
|
||||
}
|
||||
|
||||
@@ -264,13 +264,13 @@ func (g *Gateio) WsHandleData() {
|
||||
g.Websocket.DataHandler <- errors.New("gatio websocket error - cannot access bid data")
|
||||
}
|
||||
|
||||
var newOrderbook orderbook.Base
|
||||
newOrderbook.Asks = asks
|
||||
newOrderbook.Bids = bids
|
||||
newOrderbook.AssetType = "SPOT"
|
||||
newOrderbook.Pair = currency.NewPairFromString(c)
|
||||
var newOrderBook orderbook.Base
|
||||
newOrderBook.Asks = asks
|
||||
newOrderBook.Bids = bids
|
||||
newOrderBook.AssetType = "SPOT"
|
||||
newOrderBook.Pair = currency.NewPairFromString(c)
|
||||
|
||||
err = g.Websocket.Orderbook.LoadSnapshot(newOrderbook,
|
||||
err = g.Websocket.Orderbook.LoadSnapshot(&newOrderBook,
|
||||
g.GetName(),
|
||||
false)
|
||||
if err != nil {
|
||||
|
||||
@@ -236,7 +236,7 @@ func (g *Gateio) SubmitOrder(p currency.Pair, side exchange.OrderSide, _ exchang
|
||||
|
||||
// ModifyOrder will allow of changing orderbook placement and limit to
|
||||
// market conversion
|
||||
func (g *Gateio) ModifyOrder(action exchange.ModifyOrder) (string, error) {
|
||||
func (g *Gateio) ModifyOrder(action *exchange.ModifyOrder) (string, error) {
|
||||
return "", common.ErrFunctionNotSupported
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user