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

What is the purpose of this function on L911? #477

Closed
Lruquaf opened this issue Sep 2, 2023 · 2 comments
Closed

What is the purpose of this function on L911? #477

Lruquaf opened this issue Sep 2, 2023 · 2 comments

Comments

@Lruquaf
Copy link

Lruquaf commented Sep 2, 2023

Is this a redundant function? When it is implemented, is there a security issue?

/**
 * @dev Equivalent to `_approve(to, tokenId, false)`.
*/
    function _approve(address to, uint256 tokenId) internal virtual {
        _approve(to, tokenId, false);
    }

When we enter the core _approve function with false as approvalCheck, it's so dangerous. Why is there so implementation in contract?

@Vectorized
Copy link
Collaborator

Note that this function is internal.

It is for devs who may want to do their on custom checks instead of using the default check.

@Lruquaf
Copy link
Author

Lruquaf commented Sep 9, 2023

Thanks, i'll close it.

@Lruquaf Lruquaf closed this as completed Sep 9, 2023
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

No branches or pull requests

2 participants