From 217b3d402cee6b8b138bbb8d4459380e7f8dbfe8 Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Fri, 25 Jun 2021 01:29:19 +0530 Subject: [PATCH] Reverted change in old connector --- contracts/mainnet/connectors_old/1inch.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/mainnet/connectors_old/1inch.sol b/contracts/mainnet/connectors_old/1inch.sol index 796c909e..fc4b728d 100644 --- a/contracts/mainnet/connectors_old/1inch.sol +++ b/contracts/mainnet/connectors_old/1inch.sol @@ -155,7 +155,7 @@ abstract contract OneProtoResolver is OneHelpers { if (address(_sellAddr) == ethAddr) { ethAmt = _sellAmt; } else { - approve(_sellAddr, address(oneProtoContract), _sellAmt); + _sellAddr.approve(address(oneProtoContract), _sellAmt); } @@ -197,7 +197,7 @@ abstract contract OneProtoResolver is OneHelpers { if (address(_sellAddr) == ethAddr) { ethAmt = _sellAmt; } else { - approve(_sellAddr, address(oneSplitContract), _sellAmt); + _sellAddr.approve(address(oneSplitContract), _sellAmt); } uint initalBal = getTokenBal(_buyAddr); @@ -442,7 +442,7 @@ abstract contract OneInchResolverHelpers is OneProtoResolverHelpers { if (address(_sellAddr) == ethAddr) { ethAmt = oneInchData._sellAmt; } else { - approve(TokenInterface(_sellAddr), getOneInchAddress(), oneInchData._sellAmt); + TokenInterface(_sellAddr).approve(getOneInchAddress(), oneInchData._sellAmt); } require(checkOneInchSig(oneInchData.callData), "Not-swap-function");