@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​
Name | Type |
---|---|
value | string | number |
decimals? | number |
Returns​
string
formatCurrencyValue​
â–¸ Const
formatCurrencyValue(value
, format?
): string
format currency value to readable format
formatCurrencyValue(value, '0,0.[00000]' )
Parameters​
Name | Type |
---|---|
value | string | number |
format? | string |
Returns​
string
wait​
â–¸ Const
wait(timeToWait
): Promise
<unknown
>
Parameters​
Name | Type |
---|---|
timeToWait | number |
Returns​
Promise
<unknown
>
weiToCurrencyValue​
â–¸ Const
weiToCurrencyValue(value
, decimals?
): string
wei value
to crypto (ethereum coin or token) depends on decimals
amount (default 18)
Parameters​
Name | Type |
---|---|
value | string | number |
decimals? | number |
Returns​
string