diff --git a/contracts/libraries/MigrationLib.sol b/contracts/libraries/MigrationLib.sol index 516f870..d771345 100644 --- a/contracts/libraries/MigrationLib.sol +++ b/contracts/libraries/MigrationLib.sol @@ -26,7 +26,7 @@ library MigrationLib { // Profiles Handles Migration: - event ProfileMigrated(uint256 profileId, address profileDestination, string handle, uint256 handleId); + event ProfileMigrated(uint256 profileId); /** * @notice Migrates an array of profiles from V1 to V2. This function can be callable by anyone. @@ -83,7 +83,7 @@ library MigrationLib { uint256 handleId = lensHandles.migrateHandle(profileOwner, handle); // We link it to the profile in the TokenHandleRegistry contract. tokenHandleRegistry.migrationLink(handleId, profileId); - emit ProfileMigrated(profileId, profileOwner, handle, handleId); + emit ProfileMigrated(profileId); delete StorageLib.getProfile(profileId).__DEPRECATED__handle; delete StorageLib.getProfile(profileId).__DEPRECATED__followNFTURI; delete StorageLib.profileIdByHandleHash()[handleHash]; diff --git a/test/migrations/Migrations.t.sol b/test/migrations/Migrations.t.sol index dd9c3ec..f337b86 100644 --- a/test/migrations/Migrations.t.sol +++ b/test/migrations/Migrations.t.sol @@ -22,9 +22,10 @@ contract MigrationsTest is BaseTest { uint256 followTokenIdV1; function beforeUpgrade() internal override { - firstAccount = _loadAccountAs('FIRST_ACCOUNT', forkVersion == 2); + console.log('beforeUpgrade setup'); + firstAccount = _loadAccountAs('FIRST_ACCOUNT'); - secondAccount = _loadAccountAs('SECOND_ACCOUNT', forkVersion == 2); + secondAccount = _loadAccountAs('SECOND_ACCOUNT'); vm.prank(firstAccount.owner); // TODO: What if already following...? @@ -39,17 +40,11 @@ contract MigrationsTest is BaseTest { } if (firstAccount.profileId == 0) { - firstAccount = _loadAccountAs('FIRST_ACCOUNT', forkVersion == 2); + firstAccount = _loadAccountAs('FIRST_ACCOUNT'); } if (secondAccount.profileId == 0) { - secondAccount = _loadAccountAs('SECOND_ACCOUNT', forkVersion == 2); - } - - // On V2 nobody follows nobody before migrations... - if (forkVersion != 2) { - bool isFollowing = hub.isFollowing(firstAccount.profileId, secondAccount.profileId); - assertTrue(isFollowing, 'First account is required to be following second account'); + secondAccount = _loadAccountAs('SECOND_ACCOUNT'); } if (forkVersion == 2) {