Skip to content

Commit

Permalink
fix(template): seal the capability keeper (#2837)
Browse files Browse the repository at this point in the history
* fix: seal the capability keeper

* docs: changelog

* fix: move capability keeper seal call after keeper definition paceholder

Seal must me called after the keeper definitions because custom ones
might use scoping.

Co-authored-by: jeronimoalbi <[email protected]>
  • Loading branch information
fadeev and jeronimoalbi authored Sep 20, 2022
1 parent f5fe088 commit e6c6cee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixes

- Fix cli action org in templates.
- Seal the capability keeper in the `app.go` template

## [`v0.24.0`](https://github.com/ignite/cli/releases/tag/v0.24.0)

Expand Down
5 changes: 4 additions & 1 deletion ignite/templates/app/stargate/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ func New(

// this line is used by starport scaffolding # stargate/app/keeperDefinition

// Sealing prevents other modules from creating scoped sub-keepers
app.CapabilityKeeper.Seal()

// Create static IBC router, add transfer route, then set and seal it
ibcRouter := ibcporttypes.NewRouter()
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
Expand Down Expand Up @@ -841,4 +844,4 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
// SimulationManager implements the SimulationApp interface
func (app *App) SimulationManager() *module.SimulationManager {
return app.sm
}
}

0 comments on commit e6c6cee

Please sign in to comment.