aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/currency-display/currency-display.container.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@users.noreply.github.com>2018-09-13 11:07:59 +0800
committerGitHub <noreply@github.com>2018-09-13 11:07:59 +0800
commit16d6cd5eb90e9720799f9a69e9c4e7d66d2fa89b (patch)
treef497f9f7d991b290f48cf7e5120a2f2e95d8f81f /ui/app/components/currency-display/currency-display.container.js
parent014240b066585f5983a4e6d65d6223f235044380 (diff)
parentf1a309e0cc110060cc56252ec5f7626ca6403fab (diff)
downloadtangerine-wallet-browser-16d6cd5eb90e9720799f9a69e9c4e7d66d2fa89b.tar.gz
tangerine-wallet-browser-16d6cd5eb90e9720799f9a69e9c4e7d66d2fa89b.tar.zst
tangerine-wallet-browser-16d6cd5eb90e9720799f9a69e9c4e7d66d2fa89b.zip
Merge pull request #5182 from MetaMask/tx-activity
Add Transaction Details to the Transaction List view
Diffstat (limited to 'ui/app/components/currency-display/currency-display.container.js')
-rw-r--r--ui/app/components/currency-display/currency-display.container.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/components/currency-display/currency-display.container.js b/ui/app/components/currency-display/currency-display.container.js
index b8a738c65..6644a1099 100644
--- a/ui/app/components/currency-display/currency-display.container.js
+++ b/ui/app/components/currency-display/currency-display.container.js
@@ -3,13 +3,15 @@ import CurrencyDisplay from './currency-display.component'
import { getValueFromWeiHex, formatCurrency } from '../../helpers/confirm-transaction/util'
const mapStateToProps = (state, ownProps) => {
- const { value, numberOfDecimals = 2, currency } = ownProps
+ const { value, numberOfDecimals = 2, currency, denomination, hideLabel } = ownProps
const { metamask: { currentCurrency, conversionRate } } = state
const toCurrency = currency || currentCurrency
- const convertedValue = getValueFromWeiHex({ value, toCurrency, conversionRate, numberOfDecimals })
+ const convertedValue = getValueFromWeiHex({
+ value, toCurrency, conversionRate, numberOfDecimals, toDenomination: denomination,
+ })
const formattedValue = formatCurrency(convertedValue, toCurrency)
- const displayValue = `${formattedValue} ${toCurrency.toUpperCase()}`
+ const displayValue = hideLabel ? formattedValue : `${formattedValue} ${toCurrency.toUpperCase()}`
return {
displayValue,