-
Notifications
You must be signed in to change notification settings - Fork 2
fix: set tip notification amount #380
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
Conversation
Deploying ui2 with
|
| Latest commit: |
ad56f82
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://81516bac.ui2-423.pages.dev |
| Branch Preview URL: | https://fix-tip-notification-amount.ui2-423.pages.dev |
| renderProfile?.(senderAddress) ?? | ||
| `${senderAddress.slice(0, 6)}…${senderAddress.slice(-4)}` | ||
| const manaAmount = formatMana(notification.metadata.manaAmount) | ||
| const manaAmount = Number(notification.metadata.amount).toString() |
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.
Shall we fix precision to two decimals here? just to prevent notifications stating:
1.587892
Or you do think we need that?
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.
good one!
| maximumFractionDigits = MAXIMUM_FRACTION_DIGITS | ||
| ): string { | ||
| return (Number(mana) / 1e18).toFixed(maximumFractionDigits).toLocaleString() | ||
| return (Number(mana) / 1e18).toFixed(maximumFractionDigits).toString() |
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.
are we still using this format mana function somewhere else?
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.
maybe we could enhance it to support WEI, GWEI and decimals so we don't deal with precision again
b606e97 to
ad56f82
Compare
No description provided.