diff --git a/halo/app/app.go b/halo/app/app.go index 114eafb4b..d9fd682b1 100644 --- a/halo/app/app.go +++ b/halo/app/app.go @@ -108,7 +108,7 @@ func newApp( ) (*App, error) { depCfg := depinject.Configs( appConfig(ctx, network), - depinject.Provide(diProviders...), + depinject.Provide(diProviders(ctx)...), depinject.Supply( logger, engineCl, diff --git a/halo/app/app_config.go b/halo/app/app_config.go index e72df9e5f..fa500df9d 100644 --- a/halo/app/app_config.go +++ b/halo/app/app_config.go @@ -238,11 +238,19 @@ var ( // diProviders defines a list of depinject provider functions. // These are non-cosmos module constructors used in halo's app wiring. - diProviders = []any{ - evmslashing.DIProvide, - // TODO(christian): remove later, but seems like it can stay here even if feature is enabled - evmstaking.DIProvide, - evmupgrade.DIProvide, + diProviders = func(ctx context.Context) []any { + if feature.FlagEVMStakingModule.Enabled(ctx) { + return []any{ + evmslashing.DIProvide, + evmupgrade.DIProvide, + } + } + + return []any{ + evmslashing.DIProvide, + evmstaking.DIProvide, + evmupgrade.DIProvide, + } } )