diff --git a/src/components/CounterValue/index.js b/src/components/CounterValue/index.js index d180a2bc..c375b076 100644 --- a/src/components/CounterValue/index.js +++ b/src/components/CounterValue/index.js @@ -3,6 +3,7 @@ import React, { PureComponent } from 'react' import { connect } from 'react-redux' import moment from 'moment' +import { getFiatUnit } from '@ledgerhq/currencies' import type { Unit, Currency } from '@ledgerhq/currencies' import { getCounterValueCode } from 'reducers/settings' @@ -43,10 +44,8 @@ export class CounterValue extends PureComponent { getCounterValue, ...props } = this.props - - const date = moment(time).format('YYYY-MM-DD') - const v = getCounterValue(currency, counterValueCode)(value, date) - + const date = new Date(moment(time).format('YYYY-MM-DD')) + const v = getCounterValue(currency, getFiatUnit(counterValueCode))(value, date) return formatValue ? ( ) : (