fix: amountConsumed check in _swapChecked for cyclic swap

This commit is contained in:
royvardhan
2025-03-10 23:32:30 +05:30
parent 38cdf28e7e
commit 91f36fe328

View File

@@ -266,7 +266,7 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
uint256 amountConsumed = initialBalance - currentBalance; uint256 amountConsumed = initialBalance - currentBalance;
if (amountConsumed != amountIn) { if (tokenIn != tokenOut && amountConsumed != amountIn) {
revert TychoRouter__AmountInDiffersFromConsumed( revert TychoRouter__AmountInDiffersFromConsumed(
amountIn, amountConsumed amountIn, amountConsumed
); );