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

functions safeTransferFrom and transferFrom are too similar #34

Open
code423n4 opened this issue Jun 14, 2021 · 2 comments
Open

functions safeTransferFrom and transferFrom are too similar #34

code423n4 opened this issue Jun 14, 2021 · 2 comments

Comments

@code423n4
Copy link
Contributor

Handle

pauliax

Vulnerability details

Impact

function safeTransferFrom is almost identical to function transferFrom. It would be better to reduce code duplication by re-using the code.

Recommended Mitigation Steps

function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
transferFrom(from, to, tokenId);
_data;
}

@code423n4 code423n4 added 0 (Non-critical) bug Something isn't working labels Jun 14, 2021
code423n4 added a commit that referenced this issue Jun 14, 2021
@Splidge
Copy link
Collaborator

Splidge commented Jun 21, 2021

implemented here
Although I've since noted another issue which will probably require undoing this as they will become dissimilar again.

@Splidge
Copy link
Collaborator

Splidge commented Jun 21, 2021

Due to issue #118 we have changed to using the _beforeTokenTransfer hook, which means these overrides were no longer required. They were removed in this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants