openzeppelin-contracts
openzeppelin-contracts copied to clipboard
Moved owner check from public to internal function in ERC721 contract…
… - resolves issue #4136
Updated ERC721._approve function to include a check for the owner before approval is granted. This ensures that the owner is not accidentally approved and prevents unnecessary sload calls. Moved the check from the public ERC721.approve function to the internal ERC721._approve function. Resolves issue #4136.
Fixes #????
PR Checklist
- [ ] Tests
- [ ] Documentation
- [ ] Changeset entry (run
npx changeset add
)
⚠️ No Changeset found
Latest commit: f097c8d2c1a5c379294f2b716abee4418cf8a077
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
For reference, there's also another PR for this. 👍🏻 to @Amxx comments.
I'd also suggest adding a Changelog entry, it's technically breaking and I think it's valuable to have an entry