misc: Comment refactor for consistency

This commit is contained in:
donosonaumczuk
2023-01-30 16:22:09 -03:00
parent 5133cfd424
commit ea220eac37

View File

@@ -105,21 +105,23 @@ contract FollowNFT is HubRestricted, LensNFTBase, ERC2981CollectionRoyalties, IF
}
address followTokenOwner = _unsafeOwnerOf(followTokenId);
if (followTokenOwner == address(0)) {
// Follow token is: Unwrapped
// Unfollowing and allowing recovery
// Follow token is unwrapped.
// Unfollowing and allowing recovery.
_unfollow({unfollower: unfollowerProfileId, followTokenId: followTokenId});
_followDataByFollowTokenId[followTokenId]
.profileIdAllowedToRecover = unfollowerProfileId;
} else {
// Follow token is: Wrapped
// Follow token is wrapped.
address unfollowerProfileOwner = IERC721(HUB).ownerOf(unfollowerProfileId);
// Follower Profile or DE should hold a token or be ApprovedForAll
// Follower profile owner or its approved delegated executor must hold the token or be approved-for-all.
if (
(followTokenOwner != unfollowerProfileOwner) &&
(followTokenOwner != executor) &&
!isApprovedForAll(followTokenOwner, executor) &&
!isApprovedForAll(followTokenOwner, unfollowerProfileOwner)
) revert DoesNotHavePermissions();
) {
revert DoesNotHavePermissions();
}
_unfollow({unfollower: unfollowerProfileId, followTokenId: followTokenId});
}
}