diff --git a/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js b/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js index 723b4d37..2fba07aa 100644 --- a/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js +++ b/src/views/Wallet/views/Account/Summary/ripple/components/Balance/index.js @@ -6,6 +6,7 @@ import { Icon, Tooltip, colors, icons as ICONS } from 'trezor-ui-components'; import { FormattedMessage, FormattedNumber } from 'react-intl'; import { FONT_SIZE, FONT_WEIGHT } from 'config/variables'; import type { Network, State as ReducersState } from 'flowtype'; +import { toFiatCurrency } from 'utils/fiatConverter'; import l10nMessages from '../../../components/Balance/index.messages'; type Props = { @@ -129,13 +130,11 @@ class AccountBalance extends PureComponent { render() { const { network, localCurrency } = this.props; const fiatRates = this.props.fiat.find(f => f.network === network.shortcut); - let accountBalance = ''; let fiatRateValue = ''; let fiat = ''; if (fiatRates) { - accountBalance = new BigNumber(this.props.balance); fiatRateValue = new BigNumber(fiatRates.rates[localCurrency]).toFixed(2); - fiat = accountBalance.times(fiatRateValue).toFixed(2); + fiat = toFiatCurrency(this.props.balance, localCurrency, fiatRates); } const NoRatesTooltip = (