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)