diff --git a/x/upgrade/client/cli/query.go b/x/upgrade/client/cli/query.go index a64987ffa..23190eece 100644 --- a/x/upgrade/client/cli/query.go +++ b/x/upgrade/client/cli/query.go @@ -54,7 +54,7 @@ func GetAppliedHeightCmd(storeName string, cdc *codec.Codec) *cobra.Command { clientCtx := client.NewContext().WithCodec(cdc).WithJSONMarshaler(cdc) name := args[0] - params := types.NewQueryAppliedParams(name) + params := types.NewQueryAppliedPlanRequest(name) bz, err := clientCtx.JSONMarshaler.MarshalJSON(params) if err != nil { return err diff --git a/x/upgrade/client/rest/query.go b/x/upgrade/client/rest/query.go index 16cd14f91..02f0303a4 100644 --- a/x/upgrade/client/rest/query.go +++ b/x/upgrade/client/rest/query.go @@ -45,7 +45,7 @@ func getDonePlanHandler(clientCtx client.Context) func(http.ResponseWriter, *htt return func(w http.ResponseWriter, r *http.Request) { name := mux.Vars(r)["name"] - params := types.NewQueryAppliedParams(name) + params := types.NewQueryAppliedPlanRequest(name) bz, err := clientCtx.JSONMarshaler.MarshalJSON(params) if rest.CheckBadRequestError(w, err) { return diff --git a/x/upgrade/keeper/querier.go b/x/upgrade/keeper/querier.go index fa1cd01a4..568a44d53 100644 --- a/x/upgrade/keeper/querier.go +++ b/x/upgrade/keeper/querier.go @@ -43,7 +43,7 @@ func queryCurrent(ctx sdk.Context, _ abci.RequestQuery, k Keeper) ([]byte, error } func queryApplied(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, error) { - var params types.QueryAppliedParams + var params types.QueryAppliedPlanRequest err := k.cdc.UnmarshalJSON(req.Data, ¶ms) if err != nil { diff --git a/x/upgrade/types/querier.go b/x/upgrade/types/querier.go index de2e0e909..b6b6457ca 100644 --- a/x/upgrade/types/querier.go +++ b/x/upgrade/types/querier.go @@ -15,14 +15,3 @@ func NewQueryCurrentPlanRequest() *QueryCurrentPlanRequest { func NewQueryAppliedPlanRequest(name string) *QueryAppliedPlanRequest { return &QueryAppliedPlanRequest{Name: name} } - -// QueryAppliedParams is passed as data with QueryApplied -type QueryAppliedParams struct { - Name string -} - -// NewQueryAppliedParams creates a new instance to query -// if a named plan was applied -func NewQueryAppliedParams(name string) QueryAppliedParams { - return QueryAppliedParams{Name: name} -}