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

Redundant require() checks #50

Open
azat-hafizov opened this issue Feb 23, 2024 · 0 comments
Open

Redundant require() checks #50

azat-hafizov opened this issue Feb 23, 2024 · 0 comments
Assignees
Milestone

Comments

@azat-hafizov
Copy link
Collaborator

The issue is identified in the initialize function of the StableAsset contract.

Within this function, there exist two checks that exhibit redundant logic:

require(
    _precisions[i] != 0 && _precisions[i] == 10 ** (18 - _decimals[i]),
    "precision not set"
);
require(_precisions[i] != 0, "precision not set");

Given the conditions set by the first require statement, the second require is always satisfied if the first check passes.

Recommend removing the redundant require check.

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