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

Chore: Design comments #453

Merged
merged 1 commit into from
Nov 2, 2022
Merged

Chore: Design comments #453

merged 1 commit into from
Nov 2, 2022

Conversation

roxdanila
Copy link
Contributor

@roxdanila roxdanila commented Oct 27, 2022

Context

Fixes part of the items in #324

Changes proposed in this pull request

  • Use getEthForAsset in MCR. To avoid reimplementing existing logic, the calculations at MCR.sol#L104 should be replaced with priceFeed.getEthForAsset(...):
  • Use Math.min: The ternary expression at Pool.sol#L644 can be replaced with Math.min to improve readability.
  • Spelling and grammatical errors:
  • Unused SafeMath: The SafeMath library is included at Governance.sol#L15 but none of its functions are used and thus it can be removed. This is actually used in multiple places (see .add() occurrences)

Test plan

Made sure existing tests run.

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

  • 🍰 = Nice to have but not essential.
  • 💡 = Suggestion or a comment based on personal opinion
  • 🔨 = I believe this should be changed.
  • 🤔 = I don’t understand something, do you mind giving me more context?
  • 🚀 = Feedback

@roxdanila roxdanila linked an issue Oct 27, 2022 that may be closed by this pull request
10 tasks
@roxdanila roxdanila changed the base branch from master to nexus-v2 October 27, 2022 14:03
@shark0der shark0der merged commit f58de92 into nexus-v2 Nov 2, 2022
@shark0der shark0der deleted the chore/design-comments branch November 2, 2022 10:18
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.

Audit - 3.4.8 Design comments
2 participants