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

[contracts] Remove unnecessary checks #16

Open
Willgg opened this issue May 20, 2022 · 0 comments
Open

[contracts] Remove unnecessary checks #16

Willgg opened this issue May 20, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Willgg
Copy link
Contributor

Willgg commented May 20, 2022

if (IERC20(deal.token1).balanceOf(address(this)) >= deal.amount1) {

No need to check for balanceOf() before transfer() because it is already check in the original ERC20 contracts. Using if/else statement introduce new use case to handle and test. This is useless and must be removed.

@Willgg Willgg added the enhancement New feature or request label May 20, 2022
@Willgg Willgg self-assigned this May 20, 2022
@Willgg Willgg changed the title Remove unnecessary checks [contracts] Remove unnecessary checks May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant