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

replace safeApprove with forceApprove #239

Merged
merged 2 commits into from
May 13, 2024
Merged

replace safeApprove with forceApprove #239

merged 2 commits into from
May 13, 2024

Conversation

ItsNickBarry
Copy link
Member

The existing safeApprove function is redundant at best (for reasons explained in the @dev natspec tag) and confusing at worst. This branch removes the zero-balance check and renames the function to forceApprove to prevent silent failure for users who update Solidstate. The name may be reverted to safeApprove in a future update, for consistency with the other SafeERC20 functions.

The SafeERC20 library does not have any tests, so thorough review is required.

@ItsNickBarry
Copy link
Member Author

@startswithaj

@ItsNickBarry
Copy link
Member Author

There's really nothing new here to test, so merging directly.

@ItsNickBarry ItsNickBarry merged commit 3d1f5f3 into master May 13, 2024
@ItsNickBarry ItsNickBarry deleted the force-approve branch May 13, 2024 22:07
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.

1 participant