aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/currency-display/currency-display.container.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-08-24 07:44:38 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-08-24 07:45:28 +0800
commit342522c6cf23670f931e69ba822eedfd2d6ee252 (patch)
tree7aac360f85308b3022d6f673a5c572385854e690 /ui/app/components/currency-display/currency-display.container.js
parent2d76ee754b1dd2473d744ce2dba2a3501c9a149c (diff)
downloadtangerine-wallet-browser-342522c6cf23670f931e69ba822eedfd2d6ee252.tar.gz
tangerine-wallet-browser-342522c6cf23670f931e69ba822eedfd2d6ee252.tar.zst
tangerine-wallet-browser-342522c6cf23670f931e69ba822eedfd2d6ee252.zip
Fix naming, add eth.getCode check for actions, fix translations for statuses
Diffstat (limited to 'ui/app/components/currency-display/currency-display.container.js')
-rw-r--r--ui/app/components/currency-display/currency-display.container.js3
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()}`