From 932e08c80bdc2e9fb963b9a5e384435c90088357 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 2 Dec 2022 20:00:16 +0000 Subject: [PATCH] fix: runtime: fix (*App).RegisterMoodules inconsistency in checking/memoizing appModule (#14128) (#14129) --- runtime/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/app.go b/runtime/app.go index 26b4fa555f0e..75e412744b01 100644 --- a/runtime/app.go +++ b/runtime/app.go @@ -59,12 +59,12 @@ func (a *App) RegisterModules(modules ...module.AppModule) error { if _, ok := a.ModuleManager.Modules[name]; ok { return fmt.Errorf("AppModule named %q already exists", name) } - a.ModuleManager.Modules[name] = appModule if _, ok := a.basicManager[name]; ok { return fmt.Errorf("AppModuleBasic named %q already exists", name) } + a.ModuleManager.Modules[name] = appModule a.basicManager[name] = appModule appModule.RegisterInterfaces(a.interfaceRegistry) appModule.RegisterLegacyAminoCodec(a.amino)