Skip to main content

@kiroboio/web3-react-native-safe-transfer

Namespaces​

Functions​

currencyValueToWei​

â–¸ Const currencyValueToWei(value, decimals?): string

convert crypto value(ethereum coin or token) to wei depends on decimals amount (default 18)

const { currency } = useAccount()
currencyValueToWei(value, currency.decimals)

Parameters​

NameType
valuestring | number
decimals?number

Returns​

string


formatCurrencyValue​

â–¸ Const formatCurrencyValue(value, format?): string

format currency value to readable format

formatCurrencyValue(value, '0,0.[00000]' )

Parameters​

NameType
valuestring | number
format?string

Returns​

string


wait​

â–¸ Const wait(timeToWait): Promise<unknown>

Parameters​

NameType
timeToWaitnumber

Returns​

Promise<unknown>


weiToCurrencyValue​

â–¸ Const weiToCurrencyValue(value, decimals?): string

wei value to crypto (ethereum coin or token) depends on decimals amount (default 18)

Parameters​

NameType
valuestring | number
decimals?number

Returns​

string