diff options
Diffstat (limited to 'ui/app/components/currency-display/currency-display.container.js')
-rw-r--r-- | ui/app/components/currency-display/currency-display.container.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/app/components/currency-display/currency-display.container.js b/ui/app/components/currency-display/currency-display.container.js index b36bba52a..b8a738c65 100644 --- a/ui/app/components/currency-display/currency-display.container.js +++ b/ui/app/components/currency-display/currency-display.container.js @@ -1,13 +1,12 @@ import { connect } from 'react-redux' import CurrencyDisplay from './currency-display.component' import { getValueFromWeiHex, formatCurrency } from '../../helpers/confirm-transaction/util' -import { ETH } from '../../constants/common' const mapStateToProps = (state, ownProps) => { const { value, numberOfDecimals = 2, currency } = ownProps const { metamask: { currentCurrency, conversionRate } } = state - const toCurrency = currency === ETH ? ETH : currentCurrency + const toCurrency = currency || currentCurrency const convertedValue = getValueFromWeiHex({ value, toCurrency, conversionRate, numberOfDecimals }) const formattedValue = formatCurrency(convertedValue, toCurrency) const displayValue = `${formattedValue} ${toCurrency.toUpperCase()}` |