Fix double migration issue

This commit is contained in:
Mubaris NK 2021-04-04 18:59:26 +05:30
parent 62cd2ea563
commit 834d43eb38
No known key found for this signature in database
GPG Key ID: 9AC09AD0F8D68561

View File

@ -68,6 +68,8 @@ contract AaveV2Migrator is MigrateResolver {
function _migratePosition(address owner) internal {
AaveData storage data = positions[owner];
require(!data.isFinal, "already-migrated");
for (uint i = 0; i < data.supplyTokens.length; i++) {
IERC20(data.supplyTokens[i]).safeTransfer(data.targetDsa, data.supplyAmts[i]);
}