From 28060abb2da1aec279973ae342ee335c17e0ae32 Mon Sep 17 00:00:00 2001 From: Samyak Jain Date: Mon, 3 Jun 2019 17:25:51 +0530 Subject: [PATCH] bug fixing --- contracts/ProxyLogics/InstaCompound.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/ProxyLogics/InstaCompound.sol b/contracts/ProxyLogics/InstaCompound.sol index 66cd847..ca95a24 100644 --- a/contracts/ProxyLogics/InstaCompound.sol +++ b/contracts/ProxyLogics/InstaCompound.sol @@ -167,7 +167,7 @@ contract CompoundResolver is Helpers { setApproval(cErc20, toBurn, cErc20); require(cToken.redeem(toBurn) == 0, "something went wrong"); transferToken(erc20); - uint tokenReturned = wmul(cToken.balanceOf(address(this)), cToken.exchangeRateCurrent()); + uint tokenReturned = wmul(toBurn, cToken.exchangeRateCurrent()); emit LogRedeem( erc20, cErc20, @@ -206,7 +206,7 @@ contract CompoundResolver is Helpers { } } if (!isEntered) { - address[] memory toEnter; + address[] memory toEnter = new address[](1); toEnter[0] = cErc20; troller.enterMarkets(toEnter); }