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

feat: add support for non-18 decimal native tokens #1829

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

brtkx
Copy link
Contributor

@brtkx brtkx commented Aug 7, 2024

No description provided.

Copy link

vercel bot commented Aug 7, 2024

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

Name Status Preview Updated (UTC)
arbitrum-token-bridge ✅ Ready (Inspect) Visit Preview Sep 16, 2024 1:08pm

@@ -43,7 +43,7 @@ export function TokenBalance({
<span className="font-light">{prefix}</span>
<span aria-label={`${tokenSymbol} balance amount on ${on}`}>
{formatAmount(balance, {
decimals: forToken.decimals
decimals: isParentChain ? forToken.decimals : 18
Copy link
Member

Choose a reason for hiding this comment

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

forToken.decimals will be different when it's source vs destination, so this will require some conditional adjustments even outside of this file

my understanding here is that i have 8,999.9998 TN, but when it's at destination network box, we used the source chain's number of decimals to format it

see how the amount is different because the number of decimals even though the only thing i did was to toggle the source and destination chains:
image
image

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

Successfully merging this pull request may close these issues.

2 participants