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

[audit] 13. Unneeded code #870

Merged
merged 2 commits into from
Aug 11, 2024
Merged

[audit] 13. Unneeded code #870

merged 2 commits into from
Aug 11, 2024

Conversation

NoahSaso
Copy link
Member

@NoahSaso NoahSaso commented Aug 2, 2024

From Oak:

In contracts/voting/dao-voting-onft-staked/src/contract.rs:178-180, the execute_confirm_stake function removes the PREPARED_ONFTS state based on the supplied token IDs. This is unneeded because the register_staked_nfts function already removed them in contracts/voting/dao-voting-onft-staked/src/state.rs:73.

This fix removes the unnecessary code.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.65%. Comparing base (75272b9) to head (07ffdd5).

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #870   +/-   ##
============================================
  Coverage        96.64%   96.65%           
============================================
  Files              240      240           
  Lines            65294    65292    -2     
============================================
- Hits             63106    63105    -1     
+ Misses            2188     2187    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bekauz bekauz merged commit 5b785d9 into development Aug 11, 2024
9 checks passed
@bekauz bekauz deleted the noah/rewards-audit-fix-13 branch August 11, 2024 19:49
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