mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
updated logic, name string
This commit is contained in:
parent
dc3f042eb6
commit
8be787aa88
|
@ -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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user