Skip to content

Commit

Permalink
fix: sanitize gov v1 proposal in e2e tests for compatibility with 0.52
Browse files Browse the repository at this point in the history
  • Loading branch information
gjermundgaraba committed Jan 20, 2025
1 parent 1830675 commit b400592
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions e2e/testsuite/sanitize/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ var (
"v8.1",
},
}
govv1ProposalProposalType = semverutil.FeatureReleases{
MajorVersion: "v10",
}
)

// Messages removes any fields that are not supported by the chain version.
Expand All @@ -49,6 +52,9 @@ func removeUnknownFields(tag string, msg sdk.Msg) sdk.Msg {
msg.Title = ""
msg.Summary = ""
}
if !govv1ProposalProposalType.IsSupported(tag) {
msg.ProposalType = govtypesv1.ProposalType_PROPOSAL_TYPE_UNSPECIFIED
}
// sanitize messages contained in the x/gov proposal
msgs, err := msg.GetMsgs()
if err != nil {
Expand Down

0 comments on commit b400592

Please sign in to comment.