Skip to content

Commit

Permalink
register legacy router
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Oct 3, 2024
1 parent 4f3ebbe commit 56b4698
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ func New(
govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper))

govConfig := govtypes.DefaultConfig()
govKeeper := govkeeper.NewKeeper(
appCodec,
Expand All @@ -618,11 +619,14 @@ func New(
govConfig,
authAddr,
)

app.GovKeeper = *govKeeper.SetHooks(
govtypes.NewMultiGovHooks(
// register governance hooks
),
)
// Set legacy router for backwards compatibility with gov v1beta1
app.GovKeeper.SetLegacyRouter(govRouter)

// Create evidence Keeper for to register the IBC light client misbehaviour evidence route
evidenceKeeper := evidencekeeper.NewKeeper(
Expand Down
14 changes: 7 additions & 7 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ func simulationModules(
app.GetSubspace(authtypes.ModuleName),
),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
//gov.NewAppModule(
// appCodec,
// &app.GovKeeper,
// app.AccountKeeper,
// app.BankKeeper,
// app.GetSubspace(govtypes.ModuleName),
//),
gov.NewAppModule(
appCodec,
&app.GovKeeper,
app.AccountKeeper,
app.BankKeeper,
app.GetSubspace(govtypes.ModuleName),
),
staking.NewAppModule(
appCodec,
app.StakingKeeper,
Expand Down

0 comments on commit 56b4698

Please sign in to comment.