feat: Remove router_address from TychoEncoder

Make the router address mandatory for the Solution attribute instead

--- don't change below this line ---
ENG-4088 Took 30 minutes
This commit is contained in:
Diana Carvalho
2025-02-07 14:58:09 +00:00
parent d7f20aa74f
commit a234ff701f
8 changed files with 42 additions and 93 deletions

View File

@@ -4,11 +4,7 @@ use crate::encoding::{errors::EncodingError, models::Solution, swap_encoder::Swa
/// Encodes a solution using a specific strategy.
pub trait StrategyEncoder {
fn encode_strategy(
&self,
to_encode: Solution,
router_address: Bytes,
) -> Result<(Vec<u8>, Bytes), EncodingError>;
fn encode_strategy(&self, to_encode: Solution) -> Result<(Vec<u8>, Bytes), EncodingError>;
#[allow(clippy::borrowed_box)]
fn get_swap_encoder(&self, protocol_system: &str) -> Option<&Box<dyn SwapEncoder>>;