File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,20 +109,17 @@ impl StartSignerConfig {
109109
110110 let jwts = load_jwt_secrets ( ) ?;
111111
112- // Load the server endpoint first from the env var, then the config, and finally
113- // the defaults
112+ let signer_config = config. signer . ok_or_eyre ( "Signer config is missing" ) ?;
113+
114+ // Load the server endpoint first from the env var if present, otherwise the
115+ // config
114116 let endpoint = if let Some ( endpoint) = load_optional_env_var ( SIGNER_ENDPOINT_ENV ) {
115117 endpoint. parse ( ) ?
116118 } else {
117- match config. signer {
118- Some ( ref signer) => SocketAddr :: from ( ( signer. host , signer. port ) ) ,
119- None => SocketAddr :: from ( ( default_host ( ) , DEFAULT_SIGNER_PORT ) ) ,
120- }
119+ SocketAddr :: from ( ( signer_config. host , signer_config. port ) )
121120 } ;
122121
123- let signer = config. signer . ok_or_eyre ( "Signer config is missing" ) ?. inner ;
124-
125- match signer {
122+ match signer_config. inner {
126123 SignerType :: Local { loader, store, .. } => Ok ( StartSignerConfig {
127124 chain : config. chain ,
128125 loader : Some ( loader) ,
You can’t perform that action at this time.
0 commit comments