From 77d53c786a5017d2f06482505bae7b61e8a843a3 Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Thu, 6 Feb 2025 11:52:43 -0500 Subject: [PATCH] docs: Explain wrap/unwrap process in validate_swap_path --- src/encoding/evm/strategy_encoder/strategy_encoders.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/encoding/evm/strategy_encoder/strategy_encoders.rs b/src/encoding/evm/strategy_encoder/strategy_encoders.rs index f1e81df..af032a7 100644 --- a/src/encoding/evm/strategy_encoder/strategy_encoders.rs +++ b/src/encoding/evm/strategy_encoder/strategy_encoders.rs @@ -181,6 +181,10 @@ impl SplitSwapStrategyEncoder { /// A path is considered valid if all the following conditions are met: /// * The checked token is reachable from the given token through the swap path /// * There are no tokens which are unconnected from the main path + /// + /// If the given token is the native token and the native action is WRAP, it will be converted + /// to the wrapped token before validating the swap path. The same principle applies for the + /// checked token and the UNWRAP action. fn validate_swap_path( &self, swaps: &[Swap],