fix: Fix after merge with main

Mostly had to delete some tests (because they were moved) and fix others

Took 17 minutes

Took 8 seconds

Took 17 seconds
This commit is contained in:
Diana Carvalho
2025-04-10 10:15:24 +01:00
parent 35441456ac
commit fff8ef0d87
4 changed files with 46 additions and 46 deletions

View File

@@ -2194,7 +2194,7 @@ mod tests {
eth_chain(),
swap_encoder_registry,
None,
Some(Bytes::from_str("0x3Ede3eCa2a72B3aeCC820E955B36f38437D01395").unwrap()),
Bytes::from_str("0x3Ede3eCa2a72B3aeCC820E955B36f38437D01395").unwrap(),
)
.unwrap();
@@ -2256,7 +2256,7 @@ mod tests {
eth_chain(),
swap_encoder_registry,
None,
Some(Bytes::from_str("0x3Ede3eCa2a72B3aeCC820E955B36f38437D01395").unwrap()),
Bytes::from_str("0x3Ede3eCa2a72B3aeCC820E955B36f38437D01395").unwrap(),
)
.unwrap();

View File

@@ -139,6 +139,19 @@ pub fn get_runtime() -> Result<(Handle, Option<Arc<Runtime>>), EncodingError> {
}
}
/// Gets the client used for interacting with the EVM-compatible network.
pub async fn get_client() -> Result<Arc<RootProvider<BoxTransport>>, EncodingError> {
dotenv::dotenv().ok();
let eth_rpc_url = env::var("RPC_URL")
.map_err(|_| EncodingError::FatalError("Missing RPC_URL in environment".to_string()))?;
let client = ProviderBuilder::new()
.on_builtin(&eth_rpc_url)
.await
.map_err(|_| EncodingError::FatalError("Failed to build provider".to_string()))?;
Ok(Arc::new(client))
}
/// Uses prefix-length encoding to efficient encode action data.
///
/// Prefix-length encoding is a data encoding method where the beginning of a data segment
@@ -154,19 +167,6 @@ pub fn ple_encode(action_data_array: Vec<Vec<u8>>) -> Vec<u8> {
encoded_action_data
}
/// Gets the client used for interacting with the EVM-compatible network.
pub async fn get_client() -> Result<Arc<RootProvider<BoxTransport>>, EncodingError> {
dotenv::dotenv().ok();
let eth_rpc_url = env::var("RPC_URL")
.map_err(|_| EncodingError::FatalError("Missing RPC_URL in environment".to_string()))?;
let client = ProviderBuilder::new()
.on_builtin(&eth_rpc_url)
.await
.map_err(|_| EncodingError::FatalError("Failed to build provider".to_string()))?;
Ok(Arc::new(client))
}
#[cfg(test)]
mod tests {
use num_bigint::BigUint;