Skip to content

Conversation

@coachchucksol
Copy link
Collaborator

All arithmetic should be done using PreciseNumber

Comment on lines 95 to 101
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()
}
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Copy link
Collaborator

@ebatsell ebatsell left a 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

@coachchucksol coachchucksol merged commit a16f795 into master Nov 8, 2024
4 of 5 checks passed
@coachchucksol coachchucksol deleted the ck/weight_table branch November 8, 2024 16:28
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.

3 participants