From 17bf7d4623c7b0de328fe7f8dd8e36abb6169306 Mon Sep 17 00:00:00 2001 From: mpoke Date: Fri, 30 Aug 2024 08:45:46 +0200 Subject: [PATCH] remove todos --- x/ccv/provider/keeper/msg_server.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/x/ccv/provider/keeper/msg_server.go b/x/ccv/provider/keeper/msg_server.go index 8f80076422..962575e00d 100644 --- a/x/ccv/provider/keeper/msg_server.go +++ b/x/ccv/provider/keeper/msg_server.go @@ -103,8 +103,6 @@ func (k msgServer) RemoveConsumer(goCtx context.Context, msg *types.MsgRemoveCon return &resp, errorsmod.Wrapf(types.ErrUnauthorized, "expected owner address %s, got %s", ownerAddress, msg.Signer) } - // TODO (PERMISSIONLESS) -- ValidateBasic is not called automatically for messages from gov proposals - phase := k.Keeper.GetConsumerPhase(ctx, consumerId) if phase != types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { return nil, errorsmod.Wrapf(types.ErrInvalidPhase, @@ -136,11 +134,6 @@ func (k msgServer) ChangeRewardDenoms(goCtx context.Context, msg *types.MsgChang return nil, errorsmod.Wrapf(types.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Authority) } - // ValidateBasic is not called automatically for messages from gov proposals - if err := msg.ValidateBasic(); err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidChangeRewardDenoms, "error: %s", err.Error()) - } - eventAttributes := k.Keeper.ChangeRewardDenoms(ctx, msg.DenomsToAdd, msg.DenomsToRemove) ctx.EventManager().EmitEvent( @@ -412,8 +405,6 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon return &resp, errorsmod.Wrapf(types.ErrUnauthorized, "expected owner address %s, got %s", ownerAddress, msg.Signer) } - // TODO (PERMISSIONLESS) -- ValidateBasic is not called automatically for messages from gov proposals - // The new owner address can be empty, in which case the consumer chain does not change its owner. // However, if the new owner address is not empty, we verify that it's a valid account address. if strings.TrimSpace(msg.NewOwnerAddress) != "" {