-
Notifications
You must be signed in to change notification settings - Fork 163
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 hard coded return_per_1000 #1015
base: devnet-ready
Are you sure you want to change the base?
Conversation
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.
looks good to me.
what about to add a test?
|
@@ -64,7 +64,8 @@ impl<T: Config> Pallet<T> { | |||
|
|||
let return_per_1000: U64F64 = if total_stake > U64F64::from_num(0) { | |||
emissions_per_day | |||
.saturating_mul(U64F64::from_num(0.82)) | |||
.saturating_mul(U64F64::from_num(u16::MAX.saturating_sub(take.0))) |
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.
Can we use .into()
here to be more idiomatic?
Description
To fix the issue #992
Related Issue(s)
Type of Change
Breaking Change
If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.