Skip to content

Commit

Permalink
cherry pick: d6115f3
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Dec 18, 2023
1 parent a2c4205 commit 23bcf14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x/authz/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ func (k Keeper) ExecCompat(goCtx context.Context, msg *authz.MsgExecCompat) (*au
subMsgs[idx] = iMsg
}

if err := validateMsgs(subMsgs); err != nil {
return nil, err
}

results, err := k.DispatchActions(ctx, grantee, subMsgs)
if err != nil {
return nil, fmt.Errorf("dispatch err: %w", err)
Expand All @@ -166,7 +170,7 @@ func validateMsgs(msgs []sdk.Msg) error {
}

if err := m.ValidateBasic(); err != nil {
return errorsmod.Wrapf(err, "msg %d", i)
return errorsmod.Wrapf(err, "validate message at index %d error", i)
}
}

Expand Down

0 comments on commit 23bcf14

Please sign in to comment.