refactor(mint): audit (#16760)

This commit is contained in:
Facundo Medica
2023-06-30 08:57:54 +00:00
committed by GitHub
parent b93081de05
commit ec789b7396
+1 -3
View File
@@ -5,7 +5,6 @@ import (
"cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/mint/types"
)
@@ -24,7 +23,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(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority)
}
@@ -33,7 +32,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
}