feat: Add EncodingError
Change method signatures to expect it and raise it where it makes sense --- don't change below this line --- ENG-4076 <#DTT#>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use anyhow::Error;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
models::{Solution, Transaction},
|
||||
strategy_encoder::StrategySelector,
|
||||
user_approvals_manager::UserApprovalsManager,
|
||||
@@ -8,6 +7,9 @@ use crate::encoding::{
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub trait RouterEncoder<S: StrategySelector, A: UserApprovalsManager> {
|
||||
fn encode_router_calldata(&self, solutions: Vec<Solution>) -> Result<Vec<Transaction>, Error>;
|
||||
fn handle_approvals(&self, solutions: &[Solution]) -> Result<Vec<Vec<u8>>, Error>;
|
||||
fn encode_router_calldata(
|
||||
&self,
|
||||
solutions: Vec<Solution>,
|
||||
) -> Result<Vec<Transaction>, EncodingError>;
|
||||
fn handle_approvals(&self, solutions: &[Solution]) -> Result<Vec<Vec<u8>>, EncodingError>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user