Directly Remove Approval on ERC721

I'm trying to remove an approval on a ERC721 price listing when a user removes their listing from a selling contract. I see that the ERC721 contract explicitly calls delete _tokenApprovals[tokenId] on token transfers, which I'm looking to do in my removeListing function but I can't access _tokenApprovals directly because it's private. Are there any suggestion about how to delete the approval as an extending contract?

1 Like

You can mimic delete _tokenApprovals[tokenId] by calling _approve(address(0), tokenId).

2 Likes