Skip to content

Documentation / js-sdk-core / formatWeiAmount

Function: formatWeiAmount()

formatWeiAmount(__namedParameters): string

Converts a wei value into a native currency price, given the token symbol of the native currency. Returns a string with the native currency price of the wei value, rounded to 3 decimals.

Parameters

__namedParameters: Object

__namedParameters.precision?: number= 3

__namedParameters.wei: bigint

Returns

string