Skip to content

Conversation

@braianj
Copy link
Collaborator

@braianj braianj commented Jan 22, 2026

No description provided.

@braianj braianj self-assigned this Jan 22, 2026
@braianj braianj added the bug Something isn't working label Jan 22, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 22, 2026

Deploying ui2 with  Cloudflare Pages  Cloudflare Pages

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

View logs

renderProfile?.(senderAddress) ??
`${senderAddress.slice(0, 6)}${senderAddress.slice(-4)}`
const manaAmount = formatMana(notification.metadata.manaAmount)
const manaAmount = Number(notification.metadata.amount).toString()
Copy link
Member

@aleortega aleortega Jan 22, 2026

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?

Copy link
Collaborator Author

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()
Copy link
Member

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?

Copy link
Member

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

@braianj braianj requested a review from aleortega January 22, 2026 16:53
@braianj braianj force-pushed the fix/tip-notification-amount branch from b606e97 to ad56f82 Compare January 22, 2026 17:37
@braianj braianj merged commit c55df48 into master Jan 22, 2026
4 checks passed
@braianj braianj deleted the fix/tip-notification-amount branch January 22, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants