2970aae670
* fix: included origin of token, moved formatters * fix: removed title attr, not needed * fix: added distinction between wallet and contract if they have the same key * fix: included origin of token, moved formatters * fix: removed title attr, not needed * fix: added distinction between wallet and contract if they have the same key
10 lines
297 B
TypeScript
10 lines
297 B
TypeScript
import type { BigNumber } from './bignumber';
|
|
import { formatNumber as format } from '@vegaprotocol/react-helpers';
|
|
|
|
export const formatNumber = (value: BigNumber, decimals?: number) => {
|
|
return format(
|
|
value,
|
|
typeof decimals === 'undefined' ? Math.max(value.dp(), 2) : decimals
|
|
);
|
|
};
|