From e6c6cee33d52ff3b89cf77bbe349ab4211224def Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 20 Sep 2022 20:24:26 +0400 Subject: [PATCH] fix(template): seal the capability keeper (#2837) * 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 --- changelog.md | 1 + ignite/templates/app/stargate/app/app.go.plush | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 16f6834611..06f585d28d 100644 --- a/changelog.md +++ b/changelog.md @@ -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) diff --git a/ignite/templates/app/stargate/app/app.go.plush b/ignite/templates/app/stargate/app/app.go.plush index 51bdcb5359..4736f95b9d 100644 --- a/ignite/templates/app/stargate/app/app.go.plush +++ b/ignite/templates/app/stargate/app/app.go.plush @@ -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). @@ -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 -} \ No newline at end of file +}