Skip to content

Commit

Permalink
fix: adjust keeper init sequence of gov & farm
Browse files Browse the repository at this point in the history
  • Loading branch information
taramakage committed Sep 27, 2023
1 parent 9439b1c commit 3de5405
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,18 @@ func NewIrisApp(
app.ServiceKeeper,
)

govConfig := govtypes.DefaultConfig()
app.GovKeeper = govkeeper.NewKeeper(
appCodec,
keys[govtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.MsgServiceRouter(),
govConfig,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

app.FarmKeeper = farmkeeper.NewKeeper(appCodec,
keys[farmtypes.StoreKey],
app.BankKeeper,
Expand All @@ -618,18 +630,6 @@ func NewIrisApp(
AddRoute(tibchost.RouterKey, tibccli.NewProposalHandler(app.TIBCKeeper)).
AddRoute(farmtypes.RouterKey, farm.NewCommunityPoolCreateFarmProposalHandler(app.FarmKeeper))

govConfig := govtypes.DefaultConfig()
app.GovKeeper = govkeeper.NewKeeper(
appCodec,
keys[govtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
app.MsgServiceRouter(),
govConfig,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

app.GovKeeper.SetHooks(govtypes.NewMultiGovHooks(
farmkeeper.NewGovHook(app.FarmKeeper),
))
Expand Down

0 comments on commit 3de5405

Please sign in to comment.