Skip to content

Commit

Permalink
remove todos
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Aug 30, 2024
1 parent 950da7d commit 17bf7d4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions x/ccv/provider/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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) != "" {
Expand Down

0 comments on commit 17bf7d4

Please sign in to comment.