feat: add a event for unset

This commit is contained in:
Josh Stevens
2022-02-25 14:11:27 +00:00
parent f0196c1f09
commit 8ab8446b30
2 changed files with 14 additions and 1 deletions

View File

@@ -965,7 +965,7 @@ contract LensHub is ILensHub, LensNFTBase, VersionedInitializable, LensMultiStat
_defaultProfileByAddress[profileId] = address(0);
_addressByDefaultProfile[owner] = 0;
emit Events.DefaultProfileSet(0, address(0), block.timestamp);
emit Events.DefaultProfileUnset(profileId, owner, block.timestamp);
}
function _createComment(DataTypes.CommentData memory vars) internal {

View File

@@ -147,6 +147,19 @@ library Events {
*/
event DefaultProfileSet(uint256 indexed profileId, address indexed wallet, uint256 timestamp);
/**
* @dev Emitted when a default profile is unset for a wallet as its main identity
*
* @param unsetProfileId The token ID of the profile for which the default profile is being unset from.
* @param wallet The wallet which owns this profile
* @param timestamp The current block timestamp.
*/
event DefaultProfileUnset(
uint256 indexed unsetProfileId,
address indexed wallet,
uint256 timestamp
);
/**
* @dev Emitted when a dispatcher is set for a specific profile.
*