In the function _handleERC20Received, the fee was incorrectly charged
In the function _handleERC20Received, the fee was incorrectly charged.\\nIn the contract, when external swap occurs, a portion of the fee will be charged. However, in function _handleERC20Received, the fee is also charged in internal swap.\\n```\\n} else {\\n    // Deduct the external swap fee\\n    uint256 fee = (bridgedAmount * dstExternalFeeRate) / FEE_BASE;\\n    bridgedAmount -= fee;  // @@audit: fee should not be applied to internal swap \\n\\n    TransferHelper.safeApprove(bridgedToken, address(wooRouter), bridgedAmount);\\n    if (dst1inch.swapRouter != address(0)) {\\n        try\\n            wooRouter.externalSwap(\\n```\\n\\nAt the same time, when the internal swap fails, this part of the fee will not be returned to the user.
Apply fee calculation only to external swaps.\\n```\\nfunction _handleERC20Received(\\n    uint256 refId,\\n    address to,\\n    address toToken,\\n    address bridgedToken,\\n    uint256 bridgedAmount,\\n    uint256 minToAmount,\\n    Dst1inch memory dst1inch\\n) internal {\\n    address msgSender = _msgSender();\\n\\n    // // rest of code\\n\\n    } else {\\n        if (dst1inch.swapRouter != address(0)) {\\n            // Deduct the external swap fee\\n            uint256 fee = (bridgedAmount * dstExternalFeeRate) / FEE_BASE;\\n            bridgedAmount -= fee;  \\n\\n            TransferHelper.safeApprove(bridgedToken, address(wooRouter), bridgedAmount);\\n            try\\n                wooRouter.externalSwap(\\n                    // // rest of code\\n                )\\n            returns (uint256 realToAmount) {\\n                emit WooCrossSwapOnDstChain(\\n                    // // rest of code\\n                );\\n            } catch {\\n                bridgedAmount += fee;\\n                TransferHelper.safeTransfer(bridgedToken, to, bridgedAmount);\\n                emit WooCrossSwapOnDstChain(\\n                    // // rest of code\\n                );\\n            }\\n        } else {\\n            TransferHelper.safeApprove(bridgedToken, address(wooRouter), bridgedAmount);\\n            try wooRouter.swap(bridgedToken, toToken, bridgedAmount, minToAmount, payable(to), to) returns (\\n                uint256 realToAmount\\n            ) {\\n               // // rest of code\\n            } catch {\\n                // // rest of code\\n            }\\n        }\\n    }\\n}\\n```\\n
Internal swaps are incorrectly charged, and fees are not refunded when internal swap fail.
```\\n} else {\\n    // Deduct the external swap fee\\n    uint256 fee = (bridgedAmount * dstExternalFeeRate) / FEE_BASE;\\n    bridgedAmount -= fee;  // @@audit: fee should not be applied to internal swap \\n\\n    TransferHelper.safeApprove(bridgedToken, address(wooRouter), bridgedAmount);\\n    if (dst1inch.swapRouter != address(0)) {\\n        try\\n            wooRouter.externalSwap(\\n```\\n