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

This is the quasi-standard and fixes the error below: ``` $ go get -u github.com/planetmint/planetmint-go@v0.1.0 go: github.com/planetmint/planetmint-go@v0.1.0: parsing go.mod: module declares its path as: planetmint-go but was required as: github.com/planetmint/planetmint-go ``` Signed-off-by: Julian Strobl <jmastr@mailbox.org>
20 lines
509 B
Go
20 lines
509 B
Go
package keeper
|
|
|
|
import (
|
|
"context"
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/planetmint/planetmint-go/x/asset/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
|
|
}
|