Skip to content

Commit

Permalink
took into account comments
Browse files Browse the repository at this point in the history
  • Loading branch information
insumity committed Sep 10, 2024
1 parent 9cfbe36 commit d55c248
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions x/ccv/provider/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,10 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon
}
k.SetConsumerPhase(ctx, consumerId, types.CONSUMER_PHASE_REGISTERED)
}
} else {
// add SpawnTime event attribute
eventAttributes = append(eventAttributes,
sdk.NewAttribute(types.AttributeConsumerSpawnTime, msg.InitializationParameters.SpawnTime.String()))
}
// add SpawnTime event attribute
eventAttributes = append(eventAttributes,
sdk.NewAttribute(types.AttributeConsumerSpawnTime, msg.InitializationParameters.SpawnTime.String()))

if err = k.Keeper.SetConsumerInitializationParameters(ctx, msg.ConsumerId, *msg.InitializationParameters); err != nil {
return &resp, errorsmod.Wrapf(types.ErrInvalidConsumerInitializationParameters,
Expand Down Expand Up @@ -587,10 +586,6 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon
return &resp, errorsmod.Wrapf(ccvtypes.ErrInvalidConsumerState,
"cannot prepare chain with consumer id (%s) for launch", consumerId)
}

// add SpawnTime event attribute
eventAttributes = append(eventAttributes,
sdk.NewAttribute(types.AttributeConsumerSpawnTime, msg.InitializationParameters.SpawnTime.String()))
}

// add Owner event attribute
Expand Down

0 comments on commit d55c248

Please sign in to comment.