From 92be5654213c26e3530d84733127052ad8883816 Mon Sep 17 00:00:00 2001 From: MaxMustermann2 <82761650+MaxMustermann2@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:14:59 +0000 Subject: [PATCH] refactor(dogfood): merge `query_params.go` --- x/dogfood/keeper/query.go | 18 ++++++++++++++++++ x/dogfood/keeper/query_params.go | 19 ------------------- 2 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 x/dogfood/keeper/query_params.go diff --git a/x/dogfood/keeper/query.go b/x/dogfood/keeper/query.go index dfee6251a..34ed99320 100644 --- a/x/dogfood/keeper/query.go +++ b/x/dogfood/keeper/query.go @@ -1,7 +1,25 @@ package keeper import ( + "context" + "github.com/ExocoreNetwork/exocore/x/dogfood/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + sdk "github.com/cosmos/cosmos-sdk/types" ) var _ types.QueryServer = Keeper{} + +func (k Keeper) Params( + goCtx context.Context, + req *types.QueryParamsRequest, +) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil +} diff --git a/x/dogfood/keeper/query_params.go b/x/dogfood/keeper/query_params.go deleted file mode 100644 index 2f0e76b04..000000000 --- a/x/dogfood/keeper/query_params.go +++ /dev/null @@ -1,19 +0,0 @@ -package keeper - -import ( - "context" - - "github.com/ExocoreNetwork/exocore/x/dogfood/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(goCtx) - - return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil -}