updated transaferATokensWithCollateral

This commit is contained in:
Richa-iitr 2022-06-02 11:51:54 +05:30
parent d4a67f816f
commit 22aa323ff5
2 changed files with 17 additions and 5 deletions

View File

@ -355,7 +355,7 @@ contract AaveHelpers is Helper {
0,
0
);
_tokens[_cntr] = _token;
_tokens[_cntr] = tokens[i];
_cntr++;
}
}

View File

@ -21,6 +21,11 @@ contract AaveV3ImportResolver is AaveHelpers {
AccountInterface(address(this)).isAuth(userAccount),
"user-account-not-auth"
);
} else {
require(
AccountInterface(userAccount).isAuth(address(this)),
"user-account-not-auth"
);
}
require(inputData.supplyTokens.length > 0, "0-length-not-allowed");
@ -98,10 +103,17 @@ contract AaveV3ImportResolver is AaveHelpers {
ImportInputData memory inputData,
bool[] memory enableCollateral
) internal returns (string memory _eventName, bytes memory _eventParam) {
require(
AccountInterface(address(this)).isAuth(userAccount),
"user-account-not-auth"
);
if (instaList.accountID(userAccount) == 0) {
require(
AccountInterface(address(this)).isAuth(userAccount),
"user-account-not-auth"
);
} else {
require(
AccountInterface(userAccount).isAuth(address(this)),
"user-account-not-auth"
);
}
require(inputData.supplyTokens.length > 0, "0-length-not-allowed");
require(