Skip to content

Commit

Permalink
remove privateKey from constructor, keep initialization in Start
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidOrchard committed Sep 11, 2024
1 parent 5e0ae26 commit d4e0068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions core/capabilities/gateway_connector/service_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d4e0068

Please sign in to comment.