Skip to content

Commit

Permalink
refactor(mint): audit (backport #16760) (#16787)
Browse files Browse the repository at this point in the history
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Facundo Medica <facundomedica@gmail.com>
  • Loading branch information
3 people authored Jun 30, 2023
1 parent cf2dca6 commit a150745
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions x/mint/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)
}
Expand All @@ -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
}
Expand Down

0 comments on commit a150745

Please sign in to comment.