Skip to content

Commit

Permalink
remove type url check
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Oct 2, 2023
1 parent c7cda12 commit 6bf0f39
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions x/ccv/provider/keeper/gov_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ func (gh GovHooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64) {
panic(fmt.Errorf("failed to unmarshal proposal content in gov hook: %w", err))
}

// if the proposal is not ConsumerAdditionProposal, continue
if msgLegacyContent.Content.TypeUrl != "/interchain_security.ccv.provider.v1.ConsumerAdditionProposal" {
continue
}
// if the consumer addition proposal cannot be unmarshaled, continue
var consAdditionProp types.ConsumerAdditionProposal
if err := proto.Unmarshal(msgLegacyContent.Content.Value, &consAdditionProp); err != nil {
Expand Down Expand Up @@ -79,9 +75,6 @@ func (gh GovHooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID ui
panic(fmt.Errorf("failed to unmarshal proposal content in gov hook: %w", err))
}

if msgLegacyContent.Content.TypeUrl != "/interchain_security.ccv.provider.v1.ConsumerAdditionProposal" {
continue
}
var consAdditionProp types.ConsumerAdditionProposal
// if the proposal is not ConsumerAdditionProposal, return
if err := proto.Unmarshal(msgLegacyContent.Content.Value, &consAdditionProp); err != nil {
Expand Down

0 comments on commit 6bf0f39

Please sign in to comment.