Skip to content

Move to != owner check from ERC721.approval to ERC721._approval #4136

Closed
@Amxx

Description

@Amxx

In ERC721.approve (public) we do

require(to != owner, "ERC721: approval to current owner");

we don't do it in ERC721._approve (internal)

That means its not ok to approve the owner, unless you do it internally ? IMO the check should move from the public to the internal function. (note that there is already a call to ERC721.ownerOf inside the internal version, so its not like we are saving an sload anyway)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueLow hanging fruit for new contributors to get involved!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions