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

Test: it("should checkSufficientBalances and return false" unclear outcome on expect #9

Closed
1 of 3 tasks
petrovska-petro opened this issue Sep 9, 2024 · 3 comments
Closed
1 of 3 tasks

Comments

@petrovska-petro
Copy link
Collaborator

petrovska-petro commented Sep 9, 2024

Severity: potentially unexpected returned value in getBalanceDelta or miswording in test suite

Context: it seems that the test would like to signal that actually there is sufficient balances in the injector to cover the actual period. But it is checking for being negative or equal to zero, by the Natspec comments seems that negative value signals that there is an actual deficit. Is this behaviour desired?

Recommendation: to ensure that getBalanceDelta is returning the expected values we will advise to cover 3 scenarios in the suite:

  1. deficit
  2. exact balance
  3. surplus

Also, it seems worth to give a reconsideration on wording in the Natspec comments or the test suite description, as while reviewing intention was not 100% clear.

Review stage

Balancer Maxis:

  • Acknowledge
  • Fixed

Onchainification Labs:

  • Acknowledge correction/mitigation
@Tritium-VLK
Copy link
Contributor

@Hyferion Can you please take a look/respond to this one?

@petrovska-petro
Copy link
Collaborator Author

@Hyferion could you please provide feedback on this issue to decide in which state is?

@petrovska-petro
Copy link
Collaborator Author

the three cases requested were covered in #45 and showed proper behaviour in the calculations. it is safe to closed.

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