Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clearing of ownedTokensIndex and allTokensIndex in ERC721Token.sol #912

Conversation

michald
Copy link

@michald michald commented Apr 23, 2018

Fixes #839

πŸš€ Description

  • πŸ“˜ I've reviewed the OpenZeppelin Contributor Guidelines
  • βœ… I've added tests where applicable to test my new functionality.
  • πŸ“– I've made sure that my contracts are well-documented.
  • 🎨 I've run the JS/Solidity linters and fixed any issues (npm run lint:all:fix).

@michald michald changed the title Fix clearing of owned tokens index and all tokens index Fix clearing of ownedTokensIndex and allTokensIndex in ERC721Token.sol Apr 23, 2018
@michald michald force-pushed the fix-clearing-of-ownedTokensIndex-and-allTokensIndex branch 2 times, most recently from 9eb5eba to 53426fd Compare April 23, 2018 12:12
@michald michald force-pushed the fix-clearing-of-ownedTokensIndex-and-allTokensIndex branch from 53426fd to 60de783 Compare April 23, 2018 13:51
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @michald!

I wouldn't modify the tests for this because it's testing the implementation (evidenced by having to add a getter for an internal data structure). It's true that we try to add a test for every bug we fix, but I would argue that there was no bug here to begin with, because the value left over in storage didn't have any visible effect.

@frangio frangio added this to the v2.1 milestone Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal ownedTokensIndex not properly cleared when removing a token from its owner in ERC721
3 participants