fix routeProxy && add avax

This commit is contained in:
owen05
2021-12-21 12:38:29 +08:00
parent 8f2e3ab280
commit fc4bd7ff6f
3 changed files with 15 additions and 20 deletions

View File

@@ -516,6 +516,7 @@ contract DODOV2Proxy02 is IDODOV2Proxy01, ReentrancyGuard, InitializableOwnable
) 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);
}