From 3947855418cc2ff9875d4139cff3ac41e814a45d Mon Sep 17 00:00:00 2001 From: Samyak Jain Date: Sat, 7 Sep 2019 21:53:58 -0700 Subject: [PATCH] small no so imp edit --- contracts/bridges/LiquidityContract.sol | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contracts/bridges/LiquidityContract.sol b/contracts/bridges/LiquidityContract.sol index e768306..fc86dc9 100644 --- a/contracts/bridges/LiquidityContract.sol +++ b/contracts/bridges/LiquidityContract.sol @@ -324,12 +324,10 @@ contract AdminStuff is AccessLiquidity { } } - function enterMarket(address cErc20) internal { + function enterMarket(address[] memory cTknAddrArr) internal { require(msg.sender == adminOne || msg.sender == adminTwo, "Not admin address"); ComptrollerInterface troller = ComptrollerInterface(comptrollerAddr); - address[] memory toEnter = new address[](1); - toEnter[0] = cErc20; - troller.enterMarkets(toEnter); + troller.enterMarkets(cTknAddrArr); } function exitMarket(address cErc20) internal { @@ -347,6 +345,11 @@ contract InstaLiquidity is AdminStuff { * @dev setting up all required token approvals */ constructor() public { + address[] memory enterMarketArr = new address[](3); + enterMarketArr[0] = cEth; + enterMarketArr[0] = cDai; + enterMarketArr[0] = cUsdc; + enterMarket(enterMarketArr); setApproval(daiAddr, 2**255, cDai); setApproval(usdcAddr, 2**255, cUsdc); setApproval(cDai, 2**255, cDai);