diff --git a/packages/ui-app/src/util/formatBalance.ts b/packages/ui-app/src/util/formatBalance.ts index c448853966..1519916ec4 100644 --- a/packages/ui-app/src/util/formatBalance.ts +++ b/packages/ui-app/src/util/formatBalance.ts @@ -46,7 +46,7 @@ const SI_MID = 8; let defaultDecimals = 0; export function calcSi (text: string, decimals: number = defaultDecimals): SiDef { - return SI[(SI_MID - 1) + Math.ceil((text.length - decimals) / 3)]; + return SI[(SI_MID - 1) + Math.ceil((text.length - decimals) / 3)] || SI[SI.length - 1]; } // Formats a string/number with . notation