refactor(mint): audit (backport #16760) (#16787)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Facundo Medica <facundomedica@gmail.com>
This commit is contained in:
mergify[bot] 2023-06-30 09:25:20 +00:00 committed by GitHub
parent cf2dca60cf
commit a1507450b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,6 @@ import (
"cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/mint/types"
)
@ -25,7 +24,7 @@ func NewMsgServerImpl(k Keeper) types.MsgServer {
}
// UpdateParams updates the params.
func (ms msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
if ms.authority != msg.Authority {
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority)
}
@ -34,7 +33,6 @@ func (ms msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdatePara
return nil, err
}
ctx := sdk.UnwrapSDKContext(goCtx)
if err := ms.Params.Set(ctx, msg.Params); err != nil {
return nil, err
}