diff --git a/x/ecocredit/client/marketplace/query.go b/x/ecocredit/client/marketplace/query.go index 5c6236c3d9..cc01784ff7 100644 --- a/x/ecocredit/client/marketplace/query.go +++ b/x/ecocredit/client/marketplace/query.go @@ -89,10 +89,10 @@ $ regen q sell-orders --pagination.limit 10 --pagination.offset 2 return cmd } -// QuerySellOrdersByAddressCmd returns a query command that retrieves all sell orders by address with pagination. -func QuerySellOrdersByAddressCmd() *cobra.Command { +// QuerySellOrdersBySellerCmd returns a query command that retrieves all sell orders by address with pagination. +func QuerySellOrdersBySellerCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "sell-orders-by-seller [address]", + Use: "sell-orders-by-seller [seller]", Short: "List all sell orders by seller address with pagination", Long: strings.TrimSpace( `Retrieve sell orders by seller address with pagination diff --git a/x/ecocredit/client/query.go b/x/ecocredit/client/query.go index 450e7edb2d..df2f69ca61 100644 --- a/x/ecocredit/client/query.go +++ b/x/ecocredit/client/query.go @@ -50,7 +50,7 @@ func QueryCmd(name string) *cobra.Command { basketcli.QueryBasketBalancesCmd(), marketplacecli.QuerySellOrderCmd(), marketplacecli.QuerySellOrdersCmd(), - marketplacecli.QuerySellOrdersByAddressCmd(), + marketplacecli.QuerySellOrdersBySellerCmd(), marketplacecli.QuerySellOrdersByBatchDenomCmd(), marketplacecli.QueryAllowedDenomsCmd(), ) diff --git a/x/ecocredit/client/testsuite/grpc.go b/x/ecocredit/client/testsuite/grpc.go index abb3502b7d..48a604e681 100644 --- a/x/ecocredit/client/testsuite/grpc.go +++ b/x/ecocredit/client/testsuite/grpc.go @@ -520,7 +520,7 @@ func (s *IntegrationTestSuite) TestQuerySellOrdersByBatchDenom() { } } -func (s *IntegrationTestSuite) TestQuerySellOrdersByAddress() { +func (s *IntegrationTestSuite) TestQuerySellOrdersBySeller() { val := s.network.Validators[0] _, _, batchDenom := s.createClassProjectBatch(val.ClientCtx, val.Address.String()) validAsk := types.NewInt64Coin(types.DefaultBondDenom, 10) diff --git a/x/ecocredit/client/testsuite/query.go b/x/ecocredit/client/testsuite/query.go index 96b91635f1..d71fc17ae5 100644 --- a/x/ecocredit/client/testsuite/query.go +++ b/x/ecocredit/client/testsuite/query.go @@ -703,7 +703,7 @@ func (s *IntegrationTestSuite) TestQuerySellOrdersCmd() { } } -func (s *IntegrationTestSuite) TestQuerySellOrdersByAddressCmd() { +func (s *IntegrationTestSuite) TestQuerySellOrdersBySellerCmd() { val := s.network.Validators[0] clientCtx := val.ClientCtx clientCtx.OutputFormat = "JSON" @@ -748,7 +748,7 @@ func (s *IntegrationTestSuite) TestQuerySellOrdersByAddressCmd() { for _, tc := range testCases { s.Run(tc.name, func() { - cmd := marketplaceclient.QuerySellOrdersByAddressCmd() + cmd := marketplaceclient.QuerySellOrdersBySellerCmd() out, err := cli.ExecTestCLICmd(clientCtx, cmd, tc.args) if tc.expErr { s.Require().Error(err) diff --git a/x/ecocredit/server/marketplace/query_sell_orders.go b/x/ecocredit/server/marketplace/query_sell_orders.go index 6596475438..3d71637fe3 100644 --- a/x/ecocredit/server/marketplace/query_sell_orders.go +++ b/x/ecocredit/server/marketplace/query_sell_orders.go @@ -121,7 +121,7 @@ func (k Keeper) SellOrdersByBatchDenom(ctx context.Context, req *marketplace.Que return &marketplace.QuerySellOrdersByBatchDenomResponse{SellOrders: orders, Pagination: pr}, nil } -// SellOrdersByAddress queries all sell orders created by the given address with optional pagination +// SellOrdersBySeller queries all sell orders created by the given address with optional pagination func (k Keeper) SellOrdersBySeller(ctx context.Context, req *marketplace.QuerySellOrdersBySellerRequest) (*marketplace.QuerySellOrdersBySellerResponse, error) { pg, err := ormutil.GogoPageReqToPulsarPageReq(req.Pagination) if err != nil { diff --git a/x/ecocredit/spec/04_queries.md b/x/ecocredit/spec/04_queries.md index b0b7fc8c4d..d026bb46c5 100644 --- a/x/ecocredit/spec/04_queries.md +++ b/x/ecocredit/spec/04_queries.md @@ -40,5 +40,5 @@ For examples on how to query state using gRPC and REST, see the [ecocredit clien - [AllowedDenoms](https://buf.build/regen/regen-ledger/docs/main:regen.ecocredit.marketplace.v1#regen.ecocredit.marketplace.v1.Query.AllowedDenoms) - [SellOrder](https://buf.build/regen/regen-ledger/docs/main:regen.ecocredit.marketplace.v1#regen.ecocredit.marketplace.v1.Query.SellOrder) - [SellOrders](https://buf.build/regen/regen-ledger/docs/main:regen.ecocredit.marketplace.v1#regen.ecocredit.marketplace.v1.Query.SellOrders) -- [SellOrdersByAddress](https://buf.build/regen/regen-ledger/docs/main:regen.ecocredit.marketplace.v1#regen.ecocredit.marketplace.v1.Query.SellOrdersByAddress) +- [SellOrdersBySeller](https://buf.build/regen/regen-ledger/docs/main:regen.ecocredit.marketplace.v1#regen.ecocredit.marketplace.v1.Query.SellOrdersBySeller) - [SellOrdersByBatchDenom](https://buf.build/regen/regen-ledger/docs/main:regen.ecocredit.marketplace.v1#regen.ecocredit.marketplace.v1.Query.SellOrdersByBatchDenom)