minor bug fix

This commit is contained in:
Samyak Jain 2021-04-16 04:43:43 +05:30
parent e986095fce
commit 1fe6ef75c4

View File

@ -125,7 +125,9 @@ abstract contract Helpers is Stores, DSMath, Variables {
if (j == 0) {
skip = 1;
targets[k+1] = "AAVE-V2-A";
castData[k+1] = abi.encodeWithSignature("enableCollateral(address[])", data.token, splitAmt, 0, 0);
address[] memory tokenArr = new address[](1);
tokenArr[i] = data.token;
castData[k+1] = abi.encodeWithSignature("enableCollateral(address[])", tokenArr);
}
} else {
targets[k] = "AAVE-V2-A";
@ -135,7 +137,7 @@ abstract contract Helpers is Stores, DSMath, Variables {
}
}
targets[spellsAmt - 1] = "BASIC-A"; // TODO: right spell?
targets[spellsAmt - 1] = "BASIC-A";
castData[spellsAmt - 1] = abi.encodeWithSignature("withdraw(address,uint256,address,uint256,uint256)", data.atoken, data.borrowAmt, address(this), 0, 0); // encode the data of atoken withdrawal
AccountInterface(dsa).castMigrate(targets, castData, address(this));
}