Revert "minor modification"

This reverts commit 394211a36f.
This commit is contained in:
Richa-iitr 2022-05-31 20:39:52 +05:30
parent 394211a36f
commit 11f73e0acb
2 changed files with 6 additions and 19 deletions

View File

@ -199,9 +199,6 @@ contract AaveHelpers is Helper {
uint256 rateMode, uint256 rateMode,
address user address user
) private { ) private {
if (instaList.accountID(user) != 0) {
user = address(this);
}
aave.repay(token, amt, rateMode, user); aave.repay(token, amt, rateMode, user);
} }
@ -266,11 +263,10 @@ contract AaveHelpers is Helper {
); );
for (uint256 i = 0; i < _length; i++) { for (uint256 i = 0; i < _length; i++) {
uint256 _amt = amts[i];
address _token = tokens[i];
_targets[i] = "BASIC-A";
if (amts[i] > 0) { if (amts[i] > 0) {
uint256 _amt = amts[i];
address _token = tokens[i];
_targets[i] = "BASIC-A";
_data[i] = abi.encodeWithSelector( _data[i] = abi.encodeWithSelector(
basicWithdraw, basicWithdraw,
_token, _token,
@ -279,7 +275,7 @@ contract AaveHelpers is Helper {
0, 0,
0 0
); );
if (!getIsColl(_token, userAccount)) { if (!getIsColl(_token, address(this))) {
aave.setUserUseReserveAsCollateral(_token, true); aave.setUserUseReserveAsCollateral(_token, true);
} }
} }

View File

@ -32,17 +32,8 @@ contract AaveV3ImportResolver is AaveHelpers {
AaveInterface aave = AaveInterface(aaveProvider.getPool()); AaveInterface aave = AaveInterface(aaveProvider.getPool());
if ( data = getBorrowAmounts(userAccount, aave, inputData, data);
ListInterface(0x839c2D3aDe63DF5b0b8F3E57D5e145057Ab41556).accountID( data = getSupplyAmounts(userAccount, inputData, data);
userAccount
) == 0
) {
data = getBorrowAmounts(userAccount, aave, inputData, data);
data = getSupplyAmounts(userAccount, inputData, data);
} else {
data = getBorrowAmounts(address(this), aave, inputData, data);
data = getSupplyAmounts(address(this), inputData, data);
}
// payback borrowed amount; // payback borrowed amount;
_PaybackStable( _PaybackStable(