From 4d5fdc23bf2e73346e75d9d8e90704063b564887 Mon Sep 17 00:00:00 2001 From: Samarendra Gouda Date: Mon, 15 Apr 2024 15:32:31 +0530 Subject: [PATCH] fix: remove-approval --- contracts/mainnet/connectors/eeth/main.sol | 3 --- test/mainnet/eeth/eeth.test.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/contracts/mainnet/connectors/eeth/main.sol b/contracts/mainnet/connectors/eeth/main.sol index 5193281..3cec2fd 100644 --- a/contracts/mainnet/connectors/eeth/main.sol +++ b/contracts/mainnet/connectors/eeth/main.sol @@ -24,10 +24,7 @@ contract EETHContract is Helpers, Basic, Events { : _amount; uint256 _ethBeforeBalance = address(this).balance; - - WETH_CONTRACT.approve(address(WETH_CONTRACT), _amount); WETH_CONTRACT.withdraw(_amount); - uint256 _ethAfterBalance = address(this).balance; uint256 _ethAmount = sub(_ethAfterBalance, _ethBeforeBalance); diff --git a/test/mainnet/eeth/eeth.test.ts b/test/mainnet/eeth/eeth.test.ts index 30f4bb2..8380c76 100644 --- a/test/mainnet/eeth/eeth.test.ts +++ b/test/mainnet/eeth/eeth.test.ts @@ -142,7 +142,7 @@ describe("eETH Staking", function () { }); it("Should deposit wETH into eETH", async function () { - const amount = ethers.utils.parseEther("1"); + const amount = ethers.utils.parseEther("10"); const eETHTAddress = "0x35fA164735182de50811E8e2E824cFb9B6118ac2"; const IERC20ABI = [ "function approve(address spender, uint256 amount) external returns (bool)",