mirror of
https://github.com/lens-protocol/core.git
synced 2026-04-22 03:02:03 -04:00
fix: Make ProfileMigrated event to only have a single profileId param T-16783
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user