mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00

* aggregating error messages * removed duplicate err msgs * removed obsolete test (two times equal behaviour ) * added global error msg module * refactored test utils to have sample types and sample objects by keepers separated * excluded auto-generated code from sonarcube analysis Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
21 lines
561 B
Go
21 lines
561 B
Go
package keeper
|
|
|
|
import (
|
|
"context"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/planetmint/planetmint-go/errormsg"
|
|
"github.com/planetmint/planetmint-go/x/dao/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, errormsg.InvalidRequest)
|
|
}
|
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
|
|
|
return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil
|
|
}
|