The function _swapUniswapV2
can be rewritten as it only expects one token swap
The _swapUniswapV2
function in uniswapV2Dest is used to swap one token for another using Uniswap V2 pools. The current implementation of this function is almost identical to the _swapUniswapV2
defined in uniswapV2.
While the function in uniswapV2 was designed to swap multiple tokens, the function in uniswapV2Dest is just expected to swap one. Though there are no security concerns here, we suggest to simplify the current implementation of _swapUniswapV2
in uniswapV2Dest to avoid complexity.
This issue has been acknowledged by Y2K Finance, and a fix was implemented in commit 859022b↗.