Skip to content

Commit

Permalink
perf: remove double _exist check in LSP8Core
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Oct 9, 2023
1 parent 0d43077 commit 216c86c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
) internal virtual {
bool isRemoved = _operators[tokenId].remove(operator);
if (!isRemoved) revert LSP8NonExistingOperator(operator, tokenId);

emit RevokedOperator(
operator,
tokenOwner,
Expand Down Expand Up @@ -368,10 +369,6 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
revert LSP8CannotSendToAddressZero();
}

if (_exists(tokenId)) {
revert LSP8TokenIdAlreadyMinted(tokenId);
}

_beforeTokenTransfer(address(0), to, tokenId);

// Check that `tokenId` was not minted inside the `_beforeTokenTransfer` hook
Expand Down

0 comments on commit 216c86c

Please sign in to comment.