Skip to content

Commit

Permalink
proto gen after suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Jan 2, 2024
1 parent c7ff42d commit dd64996
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 214 deletions.
10 changes: 5 additions & 5 deletions proto/umee/leverage/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ message QueryRegisteredTokensResponse {
repeated Token registry = 1 [(gogoproto.nullable) = false];
}

// QueryRegisteredTokenMarkets defines the request structure for the RegisteredTokenMarkets
// QueryRegisteredTokensWithMarkets defines the request structure for the RegisteredTokenMarkets
// gRPC service handler.
message QueryRegisteredTokenMarkets {}
message QueryRegisteredTokensWithMarkets {}

// QueryRegisteredTokenMarketsResponse defines the response structure for the
// RegisteredTokenMarkets gRPC service handler.
message QueryRegisteredTokenMarketsResponse {
// QueryRegisteredTokensWithMarketsResponse defines the response structure for the
// RegisteredTokensWithMarkets gRPC service handler.
message QueryRegisteredTokensWithMarketsResponse {
repeated TokenMarket markets = 1 [(gogoproto.nullable) = false];
}

Expand Down
8 changes: 4 additions & 4 deletions x/leverage/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ func (q Querier) RegisteredTokens(
}, nil
}

func (q Querier) RegisteredTokenMarkets(
func (q Querier) RegisteredTokensWithMarkets(
goCtx context.Context,
req *types.QueryRegisteredTokenMarkets,
) (*types.QueryRegisteredTokenMarketsResponse, error) {
req *types.QueryRegisteredTokensWithMarkets,
) (*types.QueryRegisteredTokensWithMarketsResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
}
Expand All @@ -86,7 +86,7 @@ func (q Querier) RegisteredTokenMarkets(
})
}

return &types.QueryRegisteredTokenMarketsResponse{
return &types.QueryRegisteredTokensWithMarketsResponse{
Markets: markets,
}, nil
}
Expand Down
6 changes: 3 additions & 3 deletions x/leverage/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ func (s *IntegrationTestSuite) TestQuerier_MarketSummary() {
func (s *IntegrationTestSuite) TestQuerier_TokenMarkets() {
require := s.Require()

req := &types.QueryRegisteredTokenMarkets{}
resp, err := s.queryClient.RegisteredTokenMarkets(context.Background(), req)
req := &types.QueryRegisteredTokensWithMarkets{}
resp, err := s.queryClient.RegisteredTokensWithMarkets(context.Background(), req)
require.NoError(err)

expected := types.QueryRegisteredTokenMarketsResponse{
expected := types.QueryRegisteredTokensWithMarketsResponse{
Markets: []types.TokenMarket{},
}
tokens := s.tk.GetAllRegisteredTokens(s.ctx)
Expand Down
Loading

0 comments on commit dd64996

Please sign in to comment.