@exodus/fiat-rate-converter
v4.1.2
Published
Converts crypto amounts to fiat amounts.
Downloads
7,989
Readme
@exodus/fiat-rate-converter
Usage
To use this feature, provide it to the container and specify it as a dependency in any consumer that needs to use it.
import fiatRateConverter from '@exodus/fiat-rate-converter'
exodus.use(fiatRateConverter({ defaultCurrency: 'USD' }))
// convert to default fiat currency
fiatRatesConverter.toFiatCurrency({
amount,
assetName,
})
// convert to specific fiat currency
fiatRatesConverter.toFiatCurrency({
amount,
assetName,
currency,
})