-
Notifications
You must be signed in to change notification settings - Fork 194
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -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 |
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.
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:
No description provided.