mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
minor bug fix
This commit is contained in:
parent
e986095fce
commit
1fe6ef75c4
|
@ -124,8 +124,10 @@ abstract contract Helpers is Stores, DSMath, Variables {
|
||||||
castData[k+1] = abi.encodeWithSignature("deposit(address,uint256,uint256,uint256)", data.token, splitAmt, 0, 0);
|
castData[k+1] = abi.encodeWithSignature("deposit(address,uint256,uint256,uint256)", data.token, splitAmt, 0, 0);
|
||||||
if (j == 0) {
|
if (j == 0) {
|
||||||
skip = 1;
|
skip = 1;
|
||||||
targets[k+1] = "AAVE-V2-A";
|
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 {
|
} else {
|
||||||
targets[k] = "AAVE-V2-A";
|
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
|
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));
|
AccountInterface(dsa).castMigrate(targets, castData, address(this));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user