Skip to content
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: token dropdown balances should use 4 sigfigs #45

Merged
merged 4 commits into from
Jun 30, 2022

Conversation

kristiehuang
Copy link
Contributor

@kristiehuang kristiehuang commented Jun 28, 2022

Previously, token dropdown only used 2 sigfigs (i.e. token balance of 1234 would get displayed as 1200)
Use 4 sigfigs to standardize with interface.

Screen Shot 2022-06-30 at 4 07 18 PM

@vercel
Copy link

vercel bot commented Jun 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
widgets ✅ Ready (Inspect) Visit Preview Jun 30, 2022 at 8:07PM (UTC)

@kristiehuang kristiehuang marked this pull request as ready for review June 28, 2022 18:02
@vercel vercel bot temporarily deployed to Preview June 28, 2022 18:03 Inactive
@vercel vercel bot temporarily deployed to Preview June 28, 2022 21:12 Inactive
@@ -111,7 +108,7 @@ function TokenOption({ index, value, style }: TokenOptionProps) {
</Column>
</Row>
<TokenBalance isLoading={Boolean(account) && !balance}>
{balance?.greaterThan(0) && formatCurrencyAmount(balance, 2, i18n.locale)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should just be updated to 4 in the formatCurrencyAmount call. We use this same function for currency amount formatting throughout the codebase, and switching single numbers to use other formatting methods will lead to inconsistency.

@vercel vercel bot temporarily deployed to Preview June 30, 2022 20:07 Inactive
@kristiehuang kristiehuang merged commit 95c368c into main Jun 30, 2022
@kristiehuang kristiehuang deleted the fix/token-dropdown-balances-sigfigs branch June 30, 2022 20:08
@github-actions
Copy link

github-actions bot commented Aug 9, 2022

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants