Skip to content

Commit

Permalink
fix panic when handlePassedV1Beta1Proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
zenzenless committed Jan 6, 2025
1 parent 868bbd5 commit 518b3d9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/gov/utils_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"strings"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
Expand Down Expand Up @@ -286,8 +285,7 @@ func getParamChangeSubspace(msg sdk.Msg) (string, bool) {
func (m *Module) handlePassedV1Beta1Proposal(proposal *govtypesv1.Proposal, msg *govtypesv1.MsgExecLegacyContent, height int64) error {
// Unpack proposal
var content govtypesv1beta1.Content
var protoCodec codec.ProtoCodec
err := protoCodec.UnpackAny(msg.Content, &content)
err := m.cdc.UnpackAny(msg.Content, &content)
if err != nil {
return fmt.Errorf("error while handling ParamChangeProposal: %s", err)
}
Expand Down

0 comments on commit 518b3d9

Please sign in to comment.