aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/currency-display/currency-display.container.js
diff options
context:
space:
mode:
authorHackyMiner <hackyminer@gmail.com>2018-10-30 19:15:38 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-10-30 19:15:38 +0800
commitac079365e6b4cf8b19db127e6971fa694fa54fff (patch)
tree306ce43b3a1b7ccb08d364d371cbffc630ba4bfc /ui/app/components/currency-display/currency-display.container.js
parent73eeeda2157e8a7ef61ff1f1fd0f4b94821f2e6f (diff)
downloadtangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.tar
tangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.tar.gz
tangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.tar.bz2
tangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.tar.lz
tangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.tar.xz
tangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.tar.zst
tangerine-wallet-browser-ac079365e6b4cf8b19db127e6971fa694fa54fff.zip
fixed currency-display (#5619)
* call getValueFromWeiHex() with fromCurrency=nativeCurrency
Diffstat (limited to 'ui/app/components/currency-display/currency-display.container.js')
-rw-r--r--ui/app/components/currency-display/currency-display.container.js7
1 files changed, 4 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 1b3fe74da..6ddf07172 100644
--- a/ui/app/components/currency-display/currency-display.container.js
+++ b/ui/app/components/currency-display/currency-display.container.js
@@ -3,16 +3,17 @@ import CurrencyDisplay from './currency-display.component'
import { getValueFromWeiHex, formatCurrency } from '../../helpers/confirm-transaction/util'
const mapStateToProps = state => {
- const { metamask: { currentCurrency, conversionRate } } = state
+ const { metamask: { nativeCurrency, currentCurrency, conversionRate } } = state
return {
currentCurrency,
conversionRate,
+ nativeCurrency,
}
}
const mergeProps = (stateProps, dispatchProps, ownProps) => {
- const { currentCurrency, conversionRate, ...restStateProps } = stateProps
+ const { nativeCurrency, currentCurrency, conversionRate, ...restStateProps } = stateProps
const {
value,
numberOfDecimals = 2,
@@ -24,7 +25,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
const toCurrency = currency || currentCurrency
const convertedValue = getValueFromWeiHex({
- value, toCurrency, conversionRate, numberOfDecimals, toDenomination: denomination,
+ value, fromCurrency: nativeCurrency, toCurrency, conversionRate, numberOfDecimals, toDenomination: denomination,
})
const displayValue = formatCurrency(convertedValue, toCurrency)
const suffix = hideLabel ? undefined : toCurrency.toUpperCase()