mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-23 04:58:03 +00:00
28b991d61d
* Add documentation on GH pages * Expand classes for doc generation * Update docs * .nojekyll * Update Identicon.tsx * Update Demo.tsx * Update KeyPair.tsx * Export specific icons * Convert tests to TypeScript
404 B
404 B
@polkadot/ui-util
Various utility and formatting functions
formatBalance
const props = await api.rpc.system.properties();
formatBalance.setDefaults({
decimals: props.tokenDecimals,
unit: props.tokenSymbol
});
formatBalance('12345'); // 12.345z DOT
calcSi
// calculates the SI unit applicable
formatBalance.calcSi('12345'); // { power: 3, value: 'k', text: 'Kilo' }