Skip to content

Commit

Permalink
Merge pull request #736 from lukso-network/DEV-5240
Browse files Browse the repository at this point in the history
perf: remove double `_exist` check in LSP8Core
  • Loading branch information
CJ42 authored Oct 10, 2023
2 parents 624c4a6 + 49e3f6a commit 1b92517
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 1b92517

Please sign in to comment.