From b4005928a70eb9338c8c26033ce7602d6ae1dce7 Mon Sep 17 00:00:00 2001 From: Gjermund Garaba Date: Mon, 20 Jan 2025 16:40:56 +0100 Subject: [PATCH] fix: sanitize gov v1 proposal in e2e tests for compatibility with 0.52 --- e2e/testsuite/sanitize/messages.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/e2e/testsuite/sanitize/messages.go b/e2e/testsuite/sanitize/messages.go index b52c2b3a8bd..6a2a218374b 100644 --- a/e2e/testsuite/sanitize/messages.go +++ b/e2e/testsuite/sanitize/messages.go @@ -28,6 +28,9 @@ var ( "v8.1", }, } + govv1ProposalProposalType = semverutil.FeatureReleases{ + MajorVersion: "v10", + } ) // Messages removes any fields that are not supported by the chain version. @@ -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 {