Change logic

This commit is contained in:
Mubaris NK 2021-04-02 11:46:28 +05:30
parent 33c5c8e0fd
commit 6b719fecd9
No known key found for this signature in database
GPG Key ID: 9AC09AD0F8D68561

View File

@ -64,7 +64,8 @@ contract AaveImportResolver is AaveResolver {
address[] borrowTokens;
}
mapping (address => AaveData) public positions;
// TODO - Move state syncing to Migrator
// mapping (address => AaveData) public positions;
function migrate(
address targetDsa,
@ -115,15 +116,18 @@ contract AaveImportResolver is AaveResolver {
}
}
// TODO - Request liquidity from Migrator
_PaybackStable(borrowTokens.length, aave, data.borrowTokens, data.stableBorrowAmts, address(this));
_PaybackVariable(borrowTokens.length, aave, data.borrowTokens, data.variableBorrowAmts, address(this));
}
_Withdraw(supplyTokens.length, aave, data.supplyTokens, data.supplyAmts);
positions[msg.sender] = data;
bytes memory positionData = abi.encode(msg.sender, data);
stateSender.syncState(polygonReceiver, positionData);
// TODO - Move state syncing to Migrator
// positions[msg.sender] = data;
// bytes memory positionData = abi.encode(msg.sender, data);
// stateSender.syncState(polygonReceiver, positionData);
_eventName = "LogAaveV2Migrate(address,address[],address[],uint256[],uint256[],uint256[])";
_eventParam = abi.encode(