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

Develop into refactor branch #35

Merged
merged 13 commits into from
Jun 20, 2024
Merged

Conversation

SergeyPoslavskiy
Copy link
Contributor

No description provided.

Comment on lines +196 to +202
function claimFee() external nonReentrant onlyAdmin {
uint256 penaltyAmount = pool.totalPenalties;
if (penaltyAmount == 0) revert NothingToClaim();
pool.totalPenalties = 0;
IERC20(pool.rewardToken).safeTransfer(pool.adminWallet, penaltyAmount);
emit FeeClaim(penaltyAmount);
}

Check warning

Code scanning / Slither

Dangerous strict equalities Medium

ERC721PenaltyFeePool.claimFee() uses a dangerous strict equality:
- penaltyAmount == 0
Comment on lines +196 to +202
function claimFee() external nonReentrant onlyAdmin {
uint256 penaltyAmount = pool.totalPenalties;
if (penaltyAmount == 0) revert NothingToClaim();
pool.totalPenalties = 0;
IERC20(pool.rewardToken).safeTransfer(pool.adminWallet, penaltyAmount);
emit FeeClaim(penaltyAmount);
}

Check notice

Code scanning / Slither

Block timestamp Low

ERC721PenaltyFeePool.claimFee() uses timestamp for comparisons
Dangerous comparisons:
- penaltyAmount == 0
@SergeyPoslavskiy SergeyPoslavskiy merged commit 1cac55c into feature/code_refactor Jun 20, 2024
5 checks passed
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.

2 participants