diff --git a/osmoutils/osmocli/query_cmd_wrap.go b/osmoutils/osmocli/query_cmd_wrap.go index 790fd2ad5c1..ca893c86e2f 100644 --- a/osmoutils/osmocli/query_cmd_wrap.go +++ b/osmoutils/osmocli/query_cmd_wrap.go @@ -48,7 +48,6 @@ func QueryIndexCmd(moduleName string) *cobra.Command { func AddQueryCmd[Q proto.Message, querier any](cmd *cobra.Command, newQueryClientFn func(grpc1.ClientConn) querier, f func() (*QueryDescriptor, Q)) { desc, _ := f() - prepareDescriptor[Q](desc) subCmd := BuildQueryCli[Q](desc, newQueryClientFn) cmd.AddCommand(subCmd) } diff --git a/x/gamm/client/cli/query.go b/x/gamm/client/cli/query.go index ed307a7992c..f2df5b8c691 100644 --- a/x/gamm/client/cli/query.go +++ b/x/gamm/client/cli/query.go @@ -41,6 +41,10 @@ func GetQueryCmd() *cobra.Command { return cmd } +var customRouterFlagOverride = map[string]string{ + "router": FlagSwapRouteDenoms, +} + func GetCmdPool() (*osmocli.QueryDescriptor, *types.QueryPoolRequest) { return &osmocli.QueryDescriptor{ Use: "pool [poolID]", @@ -201,8 +205,10 @@ func GetCmdEstimateSwapExactAmountIn() (*osmocli.QueryDescriptor, *types.QuerySw Short: "Query estimate-swap-exact-amount-in", Long: `Query estimate-swap-exact-amount-in.{{.ExampleHeader}} {{.CommandPrefix}} estimate-swap-exact-amount-in 1 osm11vmx8jtggpd9u7qr0t8vxclycz85u925sazglr7 stake --swap-route-pool-ids=2 --swap-route-pool-ids=3`, - ParseQuery: EstimateSwapExactAmountInParseArgs, - Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetMultihopSwapRoutes()}}, + ParseQuery: EstimateSwapExactAmountInParseArgs, + Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetMultihopSwapRoutes()}}, + QueryFnName: "EstimateSwapExactAmountIn", + CustomFlagOverrides: customRouterFlagOverride, }, &types.QuerySwapExactAmountInRequest{} } @@ -213,8 +219,10 @@ func GetCmdEstimateSwapExactAmountOut() (*osmocli.QueryDescriptor, *types.QueryS Short: "Query estimate-swap-exact-amount-out", Long: `Query estimate-swap-exact-amount-out.{{.ExampleHeader}} {{.CommandPrefix}} estimate-swap-exact-amount-out 1 osm11vmx8jtggpd9u7qr0t8vxclycz85u925sazglr7 stake --swap-route-pool-ids=2 --swap-route-pool-ids=3`, - ParseQuery: EstimateSwapExactAmountOutParseArgs, - Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetMultihopSwapRoutes()}}, + ParseQuery: EstimateSwapExactAmountOutParseArgs, + Flags: osmocli.FlagDesc{RequiredFlags: []*flag.FlagSet{FlagSetMultihopSwapRoutes()}}, + QueryFnName: "EstimateSwapExactAmountOut", + CustomFlagOverrides: customRouterFlagOverride, }, &types.QuerySwapExactAmountOutRequest{} }