Skip to content

fromPicoWay

fromPicoWay(input, decimals, options): string

Converts the given [[BalanceNumber]] to a human readable number with metric prefix and Unit. This function uses the polkadot formatBalance function, it’s output can therefore be formatted via the polkadot formatting options.

Parameters

input: Exclude<AnyNumber, Uint8Array>

[[BalanceNumber]] to convert from Pico WAY.

decimals: number= 4

Set the minimum decimal places in the formatted localized output, default is 4.

options: BalanceOptions= {}

[[BalanceOptions]] for internationalization and formatting.

Returns

string

String representation of the given [[BalanceNumber]] with unit und metric prefix.

Source

utils/src/Balance.ts:138