diff --git a/app/block_address.go b/app/block_address.go index 76e41ce8d8..c12063f79e 100644 --- a/app/block_address.go +++ b/app/block_address.go @@ -39,12 +39,12 @@ func (bad BlockAddressesDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula } } } - admin := bad.getParams(ctx).CronosAdmin - for _, msg := range tx.GetMsgs() { - if blocklistMsg, ok := msg.(*types.MsgStoreBlockList); ok { - if admin != blocklistMsg.From { - return ctx, errors.Wrap(sdkerrors.ErrUnauthorized, "msg sender is not authorized") - } + } + admin := bad.getParams(ctx).CronosAdmin + for _, msg := range tx.GetMsgs() { + if blocklistMsg, ok := msg.(*types.MsgStoreBlockList); ok { + if admin != blocklistMsg.From { + return ctx, errors.Wrap(sdkerrors.ErrUnauthorized, "msg sender is not authorized") } } }