fix: Don't have a DEFAULT_CONFIG_PATH in bin
This is unnecessary since we already have the executor address loaded at build time --- don't change below this line --- ENG-4088 Took 8 minutes Took 7 seconds
This commit is contained in:
@@ -22,7 +22,7 @@ pub struct EVMStrategyEncoderRegistry {
|
||||
impl StrategyEncoderRegistry for EVMStrategyEncoderRegistry {
|
||||
fn new(
|
||||
chain: tycho_core::dto::Chain,
|
||||
executors_file_path: Option<&str>,
|
||||
executors_file_path: Option<String>,
|
||||
signer_pk: Option<String>,
|
||||
) -> Result<Self, EncodingError> {
|
||||
let chain = Chain::from(chain);
|
||||
|
||||
@@ -18,10 +18,10 @@ impl SwapEncoderRegistry {
|
||||
/// Populates the registry with the `SwapEncoders` for the given blockchain by parsing the
|
||||
/// executors' addresses in the file at the given path.
|
||||
pub fn new(
|
||||
executors_file_path: Option<&str>,
|
||||
executors_file_path: Option<String>,
|
||||
blockchain: Chain,
|
||||
) -> Result<Self, EncodingError> {
|
||||
let config_str = if let Some(path) = executors_file_path {
|
||||
let config_str = if let Some(ref path) = executors_file_path {
|
||||
fs::read_to_string(path).map_err(|e| {
|
||||
EncodingError::FatalError(format!(
|
||||
"Error reading executors file from {:?}: {}",
|
||||
|
||||
@@ -167,7 +167,7 @@ mod tests {
|
||||
impl StrategyEncoderRegistry for MockStrategyRegistry {
|
||||
fn new(
|
||||
_chain: tycho_core::dto::Chain,
|
||||
_executors_file_path: Option<&str>,
|
||||
_executors_file_path: Option<String>,
|
||||
_signer_pk: Option<String>,
|
||||
) -> Result<MockStrategyRegistry, EncodingError> {
|
||||
Ok(Self { strategy: Box::new(MockStrategy) })
|
||||
|
||||
@@ -20,7 +20,7 @@ pub trait StrategyEncoder {
|
||||
pub trait StrategyEncoderRegistry {
|
||||
fn new(
|
||||
chain: Chain,
|
||||
executors_file_path: Option<&str>,
|
||||
executors_file_path: Option<String>,
|
||||
signer_pk: Option<String>,
|
||||
) -> Result<Self, EncodingError>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user