diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-21 09:26:18 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-21 09:26:18 +0800 |
commit | 8f3b762461ada222f82089e686a61183dd167428 (patch) | |
tree | 1efbdbc2f91c7b7468dda469de53e0cccf8e9ac4 /ui/app/components/token-cell.js | |
parent | 5eb3cf43bfab3728dde151bc84439993b1a93184 (diff) | |
download | tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.tar tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.tar.gz tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.tar.bz2 tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.tar.lz tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.tar.xz tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.tar.zst tangerine-wallet-browser-8f3b762461ada222f82089e686a61183dd167428.zip |
Fix Conversions bugs; Fiat value bugs
Diffstat (limited to 'ui/app/components/token-cell.js')
-rw-r--r-- | ui/app/components/token-cell.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/components/token-cell.js b/ui/app/components/token-cell.js index ad431df69..6bb42204e 100644 --- a/ui/app/components/token-cell.js +++ b/ui/app/components/token-cell.js @@ -13,6 +13,7 @@ const TokenMenuDropdown = require('./dropdowns/token-menu-dropdown.js') function mapStateToProps (state) { return { network: state.metamask.network, + currentCurrency: state.metamask.currentCurrency, selectedTokenAddress: state.metamask.selectedTokenAddress, userAddress: selectors.getSelectedAddress(state), tokenExchangeRates: state.metamask.tokenExchangeRates, @@ -63,18 +64,19 @@ TokenCell.prototype.render = function () { ethToUSDRate, hideSidebar, sidebarOpen, + currentCurrency, // userAddress, } = props const pair = `${symbol.toLowerCase()}_eth`; let currentTokenToEthRate; - let currentTokenInUSD; + let currentTokenInFiat; let formattedUSD = '' if (tokenExchangeRates[pair]) { currentTokenToEthRate = tokenExchangeRates[pair].rate; - currentTokenInUSD = conversionUtil(string, { + currentTokenInFiat = conversionUtil(string, { fromNumericBase: 'dec', fromCurrency: symbol, toCurrency: 'USD', @@ -82,7 +84,7 @@ TokenCell.prototype.render = function () { conversionRate: currentTokenToEthRate, ethToUSDRate, }) - formattedUSD = `$${currentTokenInUSD} USD`; + formattedUSD = `${currentTokenInFiat} ${currentCurrency.toUpperCase()}`; } return ( |