@@ -353,21 +353,35 @@ impl ExternalNodeBuilder {
353
353
}
354
354
355
355
let da_client_secrets = da_client_secrets. context ( "DA client secrets are missing" ) ?;
356
- match ( da_client_config, da_client_secrets) {
357
- ( DAClientConfig :: Avail ( config) , DataAvailabilitySecrets :: Avail ( secret) ) => {
358
- self . node . add_layer ( AvailWiringLayer :: new ( config, secret) ) ;
356
+ match da_client_config {
357
+ DAClientConfig :: Avail ( config) => {
358
+ if let DataAvailabilitySecrets :: Avail ( secret) = da_client_secrets {
359
+ self . node . add_layer ( AvailWiringLayer :: new ( config, secret) ) ;
360
+ } else {
361
+ bail ! ( "Avail client selected, missing Avail in secrets" )
362
+ }
359
363
}
360
364
361
- ( DAClientConfig :: Celestia ( config) , DataAvailabilitySecrets :: Celestia ( secret) ) => {
362
- self . node
363
- . add_layer ( CelestiaWiringLayer :: new ( config, secret) ) ;
365
+ DAClientConfig :: Celestia ( config) => {
366
+ if let DataAvailabilitySecrets :: Celestia ( secret) = da_client_secrets {
367
+ self . node
368
+ . add_layer ( CelestiaWiringLayer :: new ( config, secret) ) ;
369
+ } else {
370
+ bail ! ( "Celestia client selected, missing Celestia in secrets" )
371
+ }
364
372
}
365
373
366
- ( DAClientConfig :: Eigen ( config) , DataAvailabilitySecrets :: Eigen ( secret) ) => {
367
- self . node . add_layer ( EigenWiringLayer :: new ( config, secret) ) ;
374
+ DAClientConfig :: Eigen ( config) => {
375
+ if config. eigenda_eth_rpc . is_none ( ) {
376
+ if let DataAvailabilitySecrets :: Eigen ( secret) = da_client_secrets {
377
+ self . node . add_layer ( EigenWiringLayer :: new ( config, secret) ) ;
378
+ } else {
379
+ bail ! ( "Eigen client selected, missing Eigen in secrets" )
380
+ }
381
+ }
368
382
}
369
383
370
- ( DAClientConfig :: ObjectStore ( config) , _ ) => {
384
+ DAClientConfig :: ObjectStore ( config) => {
371
385
self . node
372
386
. add_layer ( ObjectStorageClientWiringLayer :: new ( config) ) ;
373
387
}
0 commit comments