mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
minor fixes
This commit is contained in:
parent
3732f562bd
commit
03e2fd7c9d
|
@ -76,7 +76,7 @@ abstract contract Helpers is DSMath, Stores, Variables {
|
|||
}
|
||||
}
|
||||
|
||||
function _getAtokens(address dsa, AaveInterface aave, address[] memory supplyTokens, uint[] memory supplyAmts) internal returns (uint[] memory finalAmts) {
|
||||
function _getAtokens(address dsa, address[] memory supplyTokens, uint[] memory supplyAmts) internal returns (uint[] memory finalAmts) {
|
||||
for (uint i = 0; i < supplyTokens.length; i++) {
|
||||
require(isSupportedToken[supplyTokens[i]], "token-not-enabled");
|
||||
(address _aToken, ,) = aaveData.getReserveTokensAddresses(supplyTokens[i]);
|
||||
|
|
|
@ -195,13 +195,12 @@ contract MigrateResolver is LiquidityResolver {
|
|||
_PaybackStable(_data.borrowTokens.length, aave, _data.borrowTokens, stableBorrows, sourceDsa);
|
||||
_PaybackVariable(_data.borrowTokens.length, aave, _data.borrowTokens, variableBorrows, sourceDsa);
|
||||
|
||||
(uint[] memory totalSupplies) = _getAtokens(sourceDsa, aave, _data.supplyTokens, _data.supplyAmts);
|
||||
(uint[] memory totalSupplies) = _getAtokens(sourceDsa, _data.supplyTokens, _data.supplyAmts);
|
||||
|
||||
// Aave on Polygon doesn't have stable borrowing so we'll borrow all the debt in variable
|
||||
AaveData memory data;
|
||||
|
||||
data.borrowTokens = _data.borrowTokens;
|
||||
data.borrowAmts = _data.stableBorrowAmts;
|
||||
data.supplyAmts = totalSupplies;
|
||||
data.supplyTokens = _data.supplyTokens;
|
||||
data.targetDsa = _data.targetDsa;
|
||||
|
|
Loading…
Reference in New Issue
Block a user