Skip to content

Commit

Permalink
Fix format balance issue (#10908)
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul authored Sep 10, 2024
1 parent 44b0683 commit 3f002df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-query/src/FormatBalance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function splitFormat (value: string, label?: LabelPost, isShort?: boolean): Reac
}

function applyFormat (value: Compact<any> | BN | string | number, [decimals, token]: [number, string], withCurrency = true, withSi?: boolean, _isShort?: boolean, labelPost?: LabelPost, useTicker?: boolean): React.ReactNode {
const [prefix, postfix, ticker] = formatBalance(value, { decimals }).split(/[.\s]+/);
const [prefix, postfix, ticker] = formatBalance(value, { decimals, forceUnit: '-', withSi: false }).split('.');
const isShort = _isShort || (withSi && prefix.length >= K_LENGTH);
const unitPost = withCurrency ? token : '';

Expand Down

0 comments on commit 3f002df

Please sign in to comment.