diff --git a/packages/bridge-ui-v2/src/libs/util/balance.ts b/packages/bridge-ui-v2/src/libs/util/balance.ts index cdeb74d9bbd..47d8d304f5a 100644 --- a/packages/bridge-ui-v2/src/libs/util/balance.ts +++ b/packages/bridge-ui-v2/src/libs/util/balance.ts @@ -12,12 +12,7 @@ export function renderBalance(balance: Maybe) { } export function renderEthBalance(balance: bigint, maxlength = 8): string { - let stringBalance = formatEther(balance).toString(); - if (stringBalance.length > maxlength) { - stringBalance = stringBalance.slice(0, maxlength) + '...'; - } - - return `${truncateString(stringBalance, stringBalance.length, '')} ETH`; + return `${truncateString(formatEther(balance).toString(), maxlength, '')} ETH`; } export const refreshUserBalance = async () => {