-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Staking epic patches #6035
Staking epic patches #6035
Conversation
Reduce precision and add approximation indicator
Gatsby Cloud Build Reportethereum-org-website-dev 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 12m PerformanceLighthouse report
|
@@ -96,7 +96,7 @@ const StatsBoxGrid = () => { | |||
const valueCurrentApr = formatPercentage(currentAprDecimal) | |||
setTotalEth(valueTotalEth) | |||
setTotalValidators(valueTotalValidators) | |||
setCurrentApr(valueCurrentApr) | |||
setCurrentApr(`~${valueCurrentApr}`) |
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.
Not a huge deal until we migrate to TypeScript, but we're doing an implicit type conversion from int to string here
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.
The formatPercentage
helper function returns a string already before this is passed to the state setter. This doesn't actually add any implicit conversion, but yeah... TS will soon help make all of this more clear.
Description
Fixes a few initial bugs noted on recently merged staking epic PR.
Preview: https://ethereumorgwebsitedev01-stakingpatches.gtsb.io/en/staking