From c964ff497ae7b9429530ab41c430c82c45949fbf Mon Sep 17 00:00:00 2001 From: Samyak Jain Date: Wed, 26 Jun 2019 23:43:29 +0530 Subject: [PATCH] bug resolved --- contracts/ProxyLogics/SplitSwap/SplitSwap.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contracts/ProxyLogics/SplitSwap/SplitSwap.sol b/contracts/ProxyLogics/SplitSwap/SplitSwap.sol index dc400f4..6258f52 100644 --- a/contracts/ProxyLogics/SplitSwap/SplitSwap.sol +++ b/contracts/ProxyLogics/SplitSwap/SplitSwap.sol @@ -147,7 +147,7 @@ contract AdminStuffs is Helper { } -contract SplitHelper is Helper { +contract SplitHelper is AdminStuffs { function getBest(address src, address dest, uint srcAmt) public view returns (uint bestExchange, uint destAmt) { uint finalSrcAmt = srcAmt; @@ -252,6 +252,9 @@ contract SplitResolver is SplitHelper { } else { destAmt += swapUniswap(daiAddr, ethAddr, srcAmt); } + TokenInterface wethContract = TokenInterface(wethAddr); + uint balanceWeth = wethContract.balanceOf(address(this)); + wethContract.withdraw(balanceWeth); } else { TokenInterface wethContract = TokenInterface(wethAddr); uint balanceWeth = wethContract.balanceOf(address(this)); @@ -280,7 +283,7 @@ contract SplitResolver is SplitHelper { address(this), 2**255, 0, - admin + adminOne ); }