https://github.com/code-423n4/2024-07-traitforge/blob/279b2887e3d38bc219a05d332cbcb0655b2dc644/contracts/TraitForgeNft/TraitForgeNft.sol#L378-L394
In the TraitForgeNft contract, the _beforeTokenTransfer function is overridden to include additional constraints, such as canceling the listing information of a token upon transfer. However, the current implementation does not account for self-transfers (where the from and to addresses are the same). This could lead to accidental clearing of listing information.
The condition from != to is considered for updating the transfer timestamp lastTokenTransferredTimestamp, but not for canceling the listing. This oversight allows a self-transfer (where from == to) to inadvertently clear the listing information.
To prevent accidental clearing of listing information during self-transfers, modify the _beforeTokenTransfer function to only cancel the listing if from!=to.
