code refactor.

This commit is contained in:
Thrilok Kumar 2019-11-20 16:54:44 +05:30
parent a887b9009b
commit 217293cec5

View File

@ -34,8 +34,8 @@ contract ImportResolver is DSMath {
// transfer tokens to InstaDApp smart wallet from user wallet // transfer tokens to InstaDApp smart wallet from user wallet
for (uint i = 0; i < tokenAddrArr.length; i++) { for (uint i = 0; i < tokenAddrArr.length; i++) {
address cErc20 = tokenAddrArr[i]; address crc20 = tokenAddrArr[i];
ERC20Interface tknContract = ERC20Interface(cErc20); ERC20Interface tknContract = ERC20Interface(crc20);
uint tokenBal = tknContract.balanceOf(msg.sender); uint tokenBal = tknContract.balanceOf(msg.sender);
tokenBal = toConvert < 10**18 ? wmul(tokenBal, toConvert) : tokenBal; tokenBal = toConvert < 10**18 ? wmul(tokenBal, toConvert) : tokenBal;
if (tokenBal > 0) { if (tokenBal > 0) {