diff --git a/src/components/swap-form.tsx b/src/components/swap-form.tsx index a6ab3ad..f908904 100644 --- a/src/components/swap-form.tsx +++ b/src/components/swap-form.tsx @@ -111,11 +111,8 @@ export function SwapForm() { return; } - // Calculate maxAmountIn by subtracting fees from user's input - // User's input is the total amount they want to spend (including fees) - // So we subtract the fee to get the actual amount to swap - const userInputInWei = parseUnits(fromAmount, selectedFromToken.decimals); - const maxAmountIn = userInputInWei - bestRoute.fee; + // Use the user's input directly as maxAmountIn + const maxAmountIn = parseUnits(fromAmount, selectedFromToken.decimals); // Execute the swap await executeSwap(