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

fix(oracle): update helper function to use correct conversion maths #2602

Merged
merged 1 commit into from Sep 16, 2023

Conversation

0xfourzerofour
Copy link
Contributor

When converting between gwei and U256 it was rounding to the nearest whole number based on the decimal. For example if you added 2.49, the result would be 20000000 which is not idea

Solution

Multiplied the f64 before the rounding occurs

PR Checklist

  • [ yes] Added Tests
  • [no ] Added Documentation
  • [no ] Breaking changes

@0xfourzerofour 0xfourzerofour changed the title fix(oracle): update helper function to use correct converion maths fix(oracle): update helper function to use correct conversion maths Sep 15, 2023
@0xfourzerofour
Copy link
Contributor Author

@FrankieIsLost

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DaniPopes DaniPopes merged commit 4ac0058 into gakonst:master Sep 16, 2023
19 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.

None yet

3 participants