This commit is contained in:
owen05
2021-12-19 12:33:17 +08:00
parent 891a3db5cf
commit 28bae5945c
5 changed files with 66 additions and 57 deletions

View File

@@ -71,6 +71,7 @@ contract DODOStarterProxy is ReentrancyGuard {
) internal {
if (isETH) {
if (amount > 0) {
require(msg.value == amount, "ETH_VALUE_WRONG");
IWETH(_WETH_).deposit{value: amount}();
if (to != address(this)) SafeERC20.safeTransfer(IERC20(_WETH_), to, amount);
}