-
Notifications
You must be signed in to change notification settings - Fork 621
[Pay] Fix: fix fiat value to 2 decimals #6243
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
[Pay] Fix: fix fiat value to 2 decimals #6243
Conversation
🦋 Changeset detectedLatest commit: e89b560 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
size-limit report 📦
|
| return cryptoToFiatQuery.data?.result ? ( | ||
| <Text {...props}>${formatNumber(cryptoToFiatQuery.data.result, 2)}</Text> | ||
| <Text {...props}> | ||
| ${formatNumber(cryptoToFiatQuery.data.result, 2).toFixed(2)} |
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.
Doesn't the 2 param inside formatNumber already does it?
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.
It doesn't, format number just rounds it but leaves off trailing zeros (it returns a number)
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.
Ah I see
PR-Codex overview
This PR focuses on fixing the display of fiat values in the
PayEmbedcomponent by ensuring they are formatted to two decimal places.Detailed summary
FiatValue.tsxfile..toFixed(2)for consistent two decimal place display.