From 507871cbddb03e28bf6d9ba0aea5ba5bfde1cb2b Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Wed, 21 Apr 2021 21:54:21 +0530 Subject: [PATCH] Revert WETH fix on receiver --- contracts/receivers/aave-v2-receiver/interfaces.sol | 7 +------ contracts/receivers/aave-v2-receiver/main.sol | 9 +-------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/contracts/receivers/aave-v2-receiver/interfaces.sol b/contracts/receivers/aave-v2-receiver/interfaces.sol index de752af..5ff7f9a 100644 --- a/contracts/receivers/aave-v2-receiver/interfaces.sol +++ b/contracts/receivers/aave-v2-receiver/interfaces.sol @@ -100,9 +100,4 @@ interface AaveInterface { interface InstaListInterface { function accountID(address) external view returns (uint); -} - - -interface WETHTokenInterface { - function deposit(address user, bytes memory depositData) external payable; -} +} \ No newline at end of file diff --git a/contracts/receivers/aave-v2-receiver/main.sol b/contracts/receivers/aave-v2-receiver/main.sol index 62db294..caff527 100644 --- a/contracts/receivers/aave-v2-receiver/main.sol +++ b/contracts/receivers/aave-v2-receiver/main.sol @@ -4,7 +4,7 @@ pragma experimental ABIEncoderV2; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { TokenInterface } from "../../common/interfaces.sol"; -import { AccountInterface, AaveData, AaveInterface, IndexInterface, WETHTokenInterface } from "./interfaces.sol"; +import { AccountInterface, AaveData, AaveInterface, IndexInterface } from "./interfaces.sol"; import { Events } from "./events.sol"; import { Helpers } from "./helpers.sol"; @@ -57,13 +57,6 @@ contract MigrateResolver is Helpers, Events { } } - if (_token == wethAddr) { - TokenInterface wethPosContract = TokenInterface(wethPosAddr); - if (wethPosContract.balanceOf(address(this)) > 0) { - WETHTokenInterface(wethAddr).deposit(address(this), abi.encode(wethPosContract.balanceOf(address(this)))); - } - } - IERC20 _tokenContract = IERC20(_token); uint _tokenBal = _tokenContract.balanceOf(address(this)); if (_tokenBal > 0) {