Skip to content

Commit

Permalink
Update x/cronos/keeper/msg_server.go
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang authored Sep 30, 2021
1 parent c5a4a11 commit db29c6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/cronos/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func (k msgServer) TransferTokens(goCtx context.Context, msg *types.MsgTransferT
func (k msgServer) UpdateTokenMapping(goCtx context.Context, msg *types.MsgUpdateTokenMapping) (*types.MsgUpdateTokenMappingResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
admin := k.Keeper.GetParams(ctx).CronosAdmin
if len(admin) > 0 && admin != msg.Sender {
// if admin is empty, no sender could be equal to it
if admin != msg.Sender {
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "msg sender is authorized")
}
// msg is already validated
Expand Down

0 comments on commit db29c6d

Please sign in to comment.