diff --git a/runtime/v2/builder.go b/runtime/v2/builder.go index 39031bbc830d..578cd9934a6e 100644 --- a/runtime/v2/builder.go +++ b/runtime/v2/builder.go @@ -176,7 +176,7 @@ func (a *AppBuilder[T]) Build(opts ...AppBuilderOption[T]) (*App[T], error) { return nil }, ExportGenesis: func(ctx context.Context, version uint64) ([]byte, error) { - genesisJson, err := a.app.moduleManager.ExportGenesisForModules(ctx) // TODO: add option to export certain modules? + genesisJson, err := a.app.moduleManager.ExportGenesisForModules(ctx) if err != nil { return nil, fmt.Errorf("failed to export genesis: %w", err) } diff --git a/runtime/v2/manager.go b/runtime/v2/manager.go index 289357b24e92..b3f95a6c9be4 100644 --- a/runtime/v2/manager.go +++ b/runtime/v2/manager.go @@ -193,11 +193,9 @@ func (m *MM[T]) InitGenesisJSON( // ExportGenesisForModules performs export genesis functionality for modules func (m *MM[T]) ExportGenesisForModules( ctx context.Context, - modulesToExport ...string, ) (map[string]json.RawMessage, error) { - if len(modulesToExport) == 0 { - modulesToExport = m.config.ExportGenesis - } + modulesToExport := m.config.ExportGenesis + // verify modules exists in app, so that we don't panic in the middle of an export if err := m.checkModulesExists(modulesToExport); err != nil { return nil, err