updated logic, name string

This commit is contained in:
Richa-iitr 2022-05-05 23:30:21 +05:30
parent dc3f042eb6
commit 8be787aa88
2 changed files with 4 additions and 3 deletions

View File

@ -260,7 +260,7 @@ contract AaveHelpers is Helper {
address userAccount address userAccount
) internal { ) internal {
for (uint256 i = 0; i < _length; i++) { for (uint256 i = 0; i < _length; i++) {
if (amts[i] > 0 && colEnable[i]) { if (amts[i] > 0) {
uint256 _amt = amts[i]; uint256 _amt = amts[i];
require( require(
atokenContracts[i].transferFrom( atokenContracts[i].transferFrom(
@ -272,7 +272,7 @@ contract AaveHelpers is Helper {
); );
if (!getIsColl(tokens[i], address(this))) { if (!getIsColl(tokens[i], address(this))) {
aave.setUserUseReserveAsCollateral(tokens[i], true); aave.setUserUseReserveAsCollateral(tokens[i], colEnable[i]);
} }
} }
} }

View File

@ -102,6 +102,7 @@ contract AaveV3ImportResolver is AaveHelpers {
); );
require(inputData.supplyTokens.length > 0, "0-length-not-allowed"); require(inputData.supplyTokens.length > 0, "0-length-not-allowed");
require(enableCollateral.length == inputData.supplyTokens.length, "lengths-not-same");
ImportData memory data; ImportData memory data;
@ -205,5 +206,5 @@ contract AaveV3ImportResolver is AaveHelpers {
} }
contract ConnectV2AaveV3ImportPolygon is AaveV3ImportResolver { contract ConnectV2AaveV3ImportPolygon is AaveV3ImportResolver {
string public constant name = "Aave-v3-import-v1"; string public constant name = "Aave-v3-import-v1.1";
} }