From d4e0068db52f0f6588f64ac2f76f1c7fd27a085d Mon Sep 17 00:00:00 2001 From: David Orchard Date: Tue, 10 Sep 2024 20:44:24 -0700 Subject: [PATCH] remove privateKey from constructor, keep initialization in Start --- .../capabilities/gateway_connector/service_wrapper.go | 11 +++++------ .../gateway_connector/service_wrapper_test.go | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/capabilities/gateway_connector/service_wrapper.go b/core/capabilities/gateway_connector/service_wrapper.go index 2fd35e899b9..d0280a72ba0 100644 --- a/core/capabilities/gateway_connector/service_wrapper.go +++ b/core/capabilities/gateway_connector/service_wrapper.go @@ -50,13 +50,12 @@ func translateConfigs(f config.GatewayConnector) connector.ConnectorConfig { } // NOTE: this wrapper is needed to make sure that our services are started after Keystore. -func NewGatewayConnectorServiceWrapper(config config.GatewayConnector, signerKey *ecdsa.PrivateKey, keystore keystore.Eth, clock clockwork.Clock, lggr logger.Logger) *ServiceWrapper { +func NewGatewayConnectorServiceWrapper(config config.GatewayConnector, keystore keystore.Eth, clock clockwork.Clock, lggr logger.Logger) *ServiceWrapper { return &ServiceWrapper{ - config: config, - signerKey: signerKey, - keystore: keystore, - clock: clock, - lggr: lggr, + config: config, + keystore: keystore, + clock: clock, + lggr: lggr, } } diff --git a/core/capabilities/gateway_connector/service_wrapper_test.go b/core/capabilities/gateway_connector/service_wrapper_test.go index ba723bc0d49..ecbb896a8ec 100644 --- a/core/capabilities/gateway_connector/service_wrapper_test.go +++ b/core/capabilities/gateway_connector/service_wrapper_test.go @@ -43,7 +43,7 @@ func generateWrapper(t *testing.T, privateKey *ecdsa.PrivateKey, keystoreKey *ec ethKeystore := ksmocks.NewEth(t) ethKeystore.On("EnabledKeysForChain", mock.Anything, mock.Anything).Return([]ethkey.KeyV2{keystoreKeyV2}, nil) gc := config.Capabilities().GatewayConnector() - wrapper := NewGatewayConnectorServiceWrapper(gc, privateKey, ethKeystore, clockwork.NewFakeClock(), logger) + wrapper := NewGatewayConnectorServiceWrapper(gc, ethKeystore, clockwork.NewFakeClock(), logger) require.NoError(t, err) return wrapper, err }