fix: chain.into()

This commit is contained in:
royvardhan
2025-02-06 22:28:02 +05:30
parent 8d69d748d1
commit 520bee5a5d

View File

@@ -52,10 +52,12 @@ fn encode_swaps(
private_key: Option<String>, private_key: Option<String>,
) -> Result<Value, Box<dyn std::error::Error>> { ) -> Result<Value, Box<dyn std::error::Error>> {
let solution: Solution = serde_json::from_str(input)?; let solution: Solution = serde_json::from_str(input)?;
let chain = Chain::Ethereum;
let strategy_selector = let strategy_selector =
EVMStrategyEncoderRegistry::new(Chain::Ethereum, config_path, private_key)?; EVMStrategyEncoderRegistry::new(chain.into(), config_path, private_key)?;
let encoder = EVMTychoEncoder::new(strategy_selector, router_address.to_string())?; let encoder =
EVMTychoEncoder::new(strategy_selector, router_address.to_string(), chain.into())?;
let transactions = encoder.encode_router_calldata(vec![solution])?; let transactions = encoder.encode_router_calldata(vec![solution])?;
Ok(serde_json::json!({ Ok(serde_json::json!({