fix: unsupported protocols for chained swaps are always unsupported

not only when the previous swap if of the same protocol!
Improve docs and naming

--- don't change below this line ---
ENG-4314 Took 15 minutes
This commit is contained in:
Diana Carvalho
2025-04-17 09:33:52 +01:00
parent efe12cfcd6
commit 8aa5b08b41
3 changed files with 10 additions and 9 deletions

View File

@@ -30,7 +30,6 @@ pub trait TransferOptimization {
} else if (swap.token_in == wrapped_token) && wrap {
// Wrapping already happened in the router so we can just use a normal transfer.
TransferType::TransferToProtocol
// first swap
} else if is_first_swap {
if in_transfer_optimizable {
if permit2 {