-
Notifications
You must be signed in to change notification settings - Fork 4
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
Stats page - total system surplus #605
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -324,7 +333,7 @@ const Analytics = () => { | |||
analyticsData.globalDebt, | |||
analyticsData.globalDebtCeiling | |||
), | |||
surplusInTreasury: formatDataNumber(analyticsData.surplusInTreasury, 18, 0, true), | |||
surplusInTreasury: `${formatDataNumber(analyticsData.surplusInTreasury, 18, 0)} OD`, |
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.
Formatting with "OD" should only be added downstream, where it is displayed
minimumDecimals >= formatDecimal && formatDecimal !== 0 | ||
? Math.min(minimumDecimals, formatDecimal) + 1 | ||
: formatDecimal, |
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.
Please verify throughout the app that this doesn't create unintended effects. After testing, please request Jacobs review
NotesTestingI added few checks for formatDataNumber function (run How did I test function changesI checked function with this piece of code checking that new result not causing unexpecting changes.
|
@pi0neerpat we don't use this function on vaults creation. |
closes #585
Question
Why we add 1 if min decimals <= then format decimals? If we put format decimals, don't we want to be exact this number?
I changed the logic so it doesn't work if format decimals === 0, but let me know if we should change it (hope it breaks nothing else)
Before
After
Screenshot