|
|
|
@ -113,7 +113,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { |
|
|
|
|
address owner = ERC721.ownerOf(tokenId); |
|
|
|
|
require(to != owner, "ERC721: approval to current owner"); |
|
|
|
|
|
|
|
|
|
require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()), |
|
|
|
|
require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), |
|
|
|
|
"ERC721: approve caller is not owner nor approved for all" |
|
|
|
|
); |
|
|
|
|
|
|
|
|
@ -216,7 +216,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { |
|
|
|
|
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { |
|
|
|
|
require(_exists(tokenId), "ERC721: operator query for nonexistent token"); |
|
|
|
|
address owner = ERC721.ownerOf(tokenId); |
|
|
|
|
return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender)); |
|
|
|
|
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|