diff --git a/modules/moduledeps/deps.go b/modules/moduledeps/deps.go index ec582a66bf0..d85cc3c6161 100644 --- a/modules/moduledeps/deps.go +++ b/modules/moduledeps/deps.go @@ -11,8 +11,8 @@ import ( // ModuleDeps provides dependencies that custom modules may need for hooks execution. // Additional dependencies can be added here if modules need something more. type ModuleDeps struct { - HTTPClient *http.Client - RateConvertor *currency.RateConverter - MetricsCfg *config.Metrics - MetricsRegistry metricsCfg.MetricsRegistry + HTTPClient *http.Client + MetricsCfg *config.Metrics + MetricsRegistry metricsCfg.MetricsRegistry + CurrencyConversion currency.Conversions } diff --git a/router/router.go b/router/router.go index 49f0fd9c4dc..aaa0e8f6188 100644 --- a/router/router.go +++ b/router/router.go @@ -204,7 +204,7 @@ func New(cfg *config.Configuration, rateConvertor *currency.RateConverter) (r *R } metricsRegistry := metricsConf.NewMetricsRegistry() - moduleDeps := moduledeps.ModuleDeps{HTTPClient: generalHttpClient, MetricsCfg: &cfg.Metrics, MetricsRegistry: metricsRegistry, RateConvertor: rateConvertor} + moduleDeps := moduledeps.ModuleDeps{HTTPClient: generalHttpClient, MetricsCfg: &cfg.Metrics, MetricsRegistry: metricsRegistry, CurrencyConversion: rateConvertor.Rates()} repo, moduleStageNames, err := modules.NewBuilder().Build(cfg.Hooks.Modules, moduleDeps) if err != nil { glog.Fatalf("Failed to init hook modules: %v", err)