Skip to content

Commit

Permalink
(fix) Fix pre-commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aarmoa committed Jul 8, 2024
1 parent 8dcedab commit cea06a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions client/exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ type ExchangeClient interface {
GetRewards(ctx context.Context, req *accountPB.RewardsRequest) (*accountPB.RewardsResponse, error)
GetSpotOrders(ctx context.Context, req *spotExchangePB.OrdersRequest) (*spotExchangePB.OrdersResponse, error)
GetSpotOrderbookV2(ctx context.Context, marketId string) (*spotExchangePB.OrderbookV2Response, error)
GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error)
GetSpotOrderbooksV2(ctx context.Context, marketIDs []string) (*spotExchangePB.OrderbooksV2Response, error)
// StreamSpotOrderbook deprecated API
StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error)
StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error)
StreamSpotOrderbookV2(ctx context.Context, marketIDs []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error)
StreamSpotOrderbookUpdate(ctx context.Context, marketIDs []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error)
GetSpotMarkets(ctx context.Context, req *spotExchangePB.MarketsRequest) (*spotExchangePB.MarketsResponse, error)
GetSpotMarket(ctx context.Context, marketId string) (*spotExchangePB.MarketResponse, error)
StreamSpotMarket(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamMarketsClient, error)
Expand Down Expand Up @@ -670,9 +670,9 @@ func (c *exchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId string
return res, nil
}

func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) {
func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIDs []string) (*spotExchangePB.OrderbooksV2Response, error) {
req := spotExchangePB.OrderbooksV2Request{
MarketIds: marketIds,
MarketIds: marketIDs,
}

res, err := common.ExecuteCall(ctx, c.network.ExchangeCookieAssistant, c.spotExchangeClient.OrderbooksV2, &req)
Expand All @@ -685,9 +685,9 @@ func (c *exchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []st
return res, nil
}

func (c *exchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) {
func (c *exchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIDs []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) {
req := spotExchangePB.StreamOrderbookUpdateRequest{
MarketIds: marketIds,
MarketIds: marketIDs,
}

stream, err := common.ExecuteStreamCall(ctx, c.network.ExchangeCookieAssistant, c.spotExchangeClient.StreamOrderbookUpdate, &req)
Expand All @@ -700,9 +700,9 @@ func (c *exchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketId
return stream, nil
}

func (c *exchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) {
func (c *exchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIDs []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) {
req := spotExchangePB.StreamOrderbookV2Request{
MarketIds: marketIds,
MarketIds: marketIDs,
}

stream, err := common.ExecuteStreamCall(ctx, c.network.ExchangeCookieAssistant, c.spotExchangeClient.StreamOrderbookV2, &req)
Expand Down
6 changes: 3 additions & 3 deletions client/exchange/exchange_test_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ func (e *MockExchangeClient) GetSpotOrderbookV2(ctx context.Context, marketId st
return &spotExchangePB.OrderbookV2Response{}, nil
}

func (e *MockExchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIds []string) (*spotExchangePB.OrderbooksV2Response, error) {
func (e *MockExchangeClient) GetSpotOrderbooksV2(ctx context.Context, marketIDs []string) (*spotExchangePB.OrderbooksV2Response, error) {
return &spotExchangePB.OrderbooksV2Response{}, nil
}

func (e *MockExchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) {
func (e *MockExchangeClient) StreamSpotOrderbookV2(ctx context.Context, marketIDs []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookV2Client, error) {
return nil, nil
}

func (e *MockExchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIds []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) {
func (e *MockExchangeClient) StreamSpotOrderbookUpdate(ctx context.Context, marketIDs []string) (spotExchangePB.InjectiveSpotExchangeRPC_StreamOrderbookUpdateClient, error) {
return nil, nil
}

Expand Down

0 comments on commit cea06a1

Please sign in to comment.