fix: Pass proper native address when encoding router call
- We were using the wrapped address here instead of the proper native address, so the value was being set to the in amount when it should have been zero.
This commit is contained in:
@@ -117,13 +117,10 @@ pub fn encode_swap(
|
||||
.wrap_err("Failed to encode solution")?[0]
|
||||
.clone();
|
||||
|
||||
let transaction = encode_tycho_router_call(
|
||||
encoded_solution,
|
||||
&solution,
|
||||
&chain.wrapped_native_token().address,
|
||||
)
|
||||
.into_diagnostic()
|
||||
.wrap_err("Failed to encode router calldata")?;
|
||||
let transaction =
|
||||
encode_tycho_router_call(encoded_solution, &solution, &chain.native_token().address)
|
||||
.into_diagnostic()
|
||||
.wrap_err("Failed to encode router calldata")?;
|
||||
Ok((transaction, solution))
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ impl Args {
|
||||
fn main() -> miette::Result<()> {
|
||||
// Load .env file before setting up logging
|
||||
dotenv().ok();
|
||||
|
||||
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(EnvFilter::from_default_env())
|
||||
.with_target(false)
|
||||
|
||||
Reference in New Issue
Block a user