chore: After rebase with master fixes
Took 2 minutes
This commit is contained in:
@@ -498,8 +498,10 @@ mod tests {
|
||||
token_out: dai.clone(),
|
||||
split: 0f64,
|
||||
};
|
||||
|
||||
let encoder = SplitSwapStrategyEncoder::new(private_key, Chain::Ethereum).unwrap();
|
||||
let swap_encoder_registry = get_swap_encoder_registry();
|
||||
let encoder =
|
||||
SplitSwapStrategyEncoder::new(private_key, Chain::Ethereum, swap_encoder_registry)
|
||||
.unwrap();
|
||||
let solution = Solution {
|
||||
exact_out: false,
|
||||
given_token: NATIVE_ADDRESS.clone(),
|
||||
@@ -545,8 +547,10 @@ mod tests {
|
||||
token_out: WETH_ADDRESS.clone(),
|
||||
split: 0f64,
|
||||
};
|
||||
|
||||
let encoder = SplitSwapStrategyEncoder::new(private_key, Chain::Ethereum).unwrap();
|
||||
let swap_encoder_registry = get_swap_encoder_registry();
|
||||
let encoder =
|
||||
SplitSwapStrategyEncoder::new(private_key, Chain::Ethereum, swap_encoder_registry)
|
||||
.unwrap();
|
||||
let solution = Solution {
|
||||
exact_out: false,
|
||||
given_token: dai,
|
||||
|
||||
@@ -24,7 +24,7 @@ impl<S: StrategyEncoderRegistry> EVMTychoEncoder<S> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: StrategySelector> EVMTychoEncoder<S> {
|
||||
impl<S: StrategyEncoderRegistry> EVMTychoEncoder<S> {
|
||||
fn validate_solution(&self, solution: &Solution) -> Result<(), EncodingError> {
|
||||
if solution.exact_out {
|
||||
return Err(EncodingError::FatalError(
|
||||
@@ -104,13 +104,12 @@ impl<S: StrategyEncoderRegistry> TychoEncoder<S> for EVMTychoEncoder<S> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use tycho_core::models::Chain;
|
||||
|
||||
use tycho_core::dto::ProtocolComponent;
|
||||
use tycho_core::{dto::ProtocolComponent, models::Chain};
|
||||
|
||||
use super::*;
|
||||
use crate::encoding::{strategy_encoder::StrategyEncoder, swap_encoder::SwapEncoder};
|
||||
use crate::encoding::{models::Swap, strategy_encoder::StrategyEncoder};
|
||||
use crate::encoding::{
|
||||
models::Swap, strategy_encoder::StrategyEncoder, swap_encoder::SwapEncoder,
|
||||
};
|
||||
|
||||
struct MockStrategyRegistry {
|
||||
strategy: Box<dyn StrategyEncoder>,
|
||||
|
||||
Reference in New Issue
Block a user