-
Notifications
You must be signed in to change notification settings - Fork 5
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
Using PreciseNumber for underlaying calculations #2
Conversation
core/src/precise_numbers.rs
Outdated
pub fn token_supply_to_precise_number( | ||
token_supply: u64, | ||
) -> Result<PreciseNumber, TipRouterError> { | ||
let value = Self::from_token_supply(token_supply)?; | ||
|
||
value.number.to_precise_number() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method is slightly different than the PreciseWeight
version of it -- can we keep it standard so these wrappers are more intuitive to interact with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make into PodPreciseNumber
use from and into
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once tests are passing
All arithmetic should be done using PreciseNumber