```\n    // Check if enough balance present to swap, else swap entire balance\n        uint256 amountIn = (inputTokenBalance < params.amountToSwap) ? \n          inputTokenBalance : params.amountToSwap;\n```\n