From da12496fa893cf36b7e2974cee97eb298bd35384 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 29 Mar 2018 16:41:38 +0200 Subject: [PATCH] Fix CounterValue component (fixes OperationsList) --- src/components/CounterValue/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ? ( ) : (