Skip to content

Commit

Permalink
chore(bridge-ui-v2): update renderBalance (#14533)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodino committed Aug 18, 2023
1 parent 95a6f2c commit d3439f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/bridge-ui-v2/src/components/Bridge/Amount.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
function renderBalance(balance: Maybe<FetchBalanceResult>) {
if (!balance) return '0.00';
return `${truncateString(balance.formatted, 6)} ${balance.symbol}`;
let maxlength = Number(balance.formatted) < 0.000001 ? balance.decimals : 6;
return `${truncateString(balance.formatted, maxlength, '')} ${balance.symbol}`;
}
// Will trigger on input events. We update the entered amount
Expand Down

1 comment on commit d3439f3

@vercel
Copy link

@vercel vercel bot commented on d3439f3 Aug 18, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

bridge-ui-v2 – ./packages/bridge-ui-v2

taiko-mono-bridge-ui-v2.vercel.app
bridge-ui-v2-git-main-taikoxyz.vercel.app
bridge-ui-v2-taikoxyz.vercel.app

Please sign in to comment.