diff options
author | Chen Wei <chenwei@byzantine-lab.io> | 2019-07-02 16:41:01 +0800 |
---|---|---|
committer | Chen Wei <chenwei@byzantine-lab.io> | 2019-07-02 16:41:01 +0800 |
commit | dd139452d053496d79816c881dbb59ee4aded81b (patch) | |
tree | 40c1d0b6ac7a0c794285abc64286503059a64485 /ui/app/helpers/utils | |
parent | 852df543036aac5d0d24d3a31a24818ac4c114bd (diff) | |
download | tangerine-wallet-browser-dd139452d053496d79816c881dbb59ee4aded81b.tar.gz tangerine-wallet-browser-dd139452d053496d79816c881dbb59ee4aded81b.tar.zst tangerine-wallet-browser-dd139452d053496d79816c881dbb59ee4aded81b.zip |
part of replacing 'ETH'
Diffstat (limited to 'ui/app/helpers/utils')
-rw-r--r-- | ui/app/helpers/utils/confirm-tx.util.js | 8 | ||||
-rw-r--r-- | ui/app/helpers/utils/conversions.util.js | 2 | ||||
-rw-r--r-- | ui/app/helpers/utils/util.js | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/ui/app/helpers/utils/confirm-tx.util.js b/ui/app/helpers/utils/confirm-tx.util.js index 853427b31..0751247c0 100644 --- a/ui/app/helpers/utils/confirm-tx.util.js +++ b/ui/app/helpers/utils/confirm-tx.util.js @@ -2,7 +2,7 @@ import currencyFormatter from 'currency-formatter' import currencies from 'currency-formatter/currencies' import ethUtil from 'ethereumjs-util' import BigNumber from 'bignumber.js' - +import { ETH } from '../constants/common' import { conversionUtil, addCurrencies, @@ -55,7 +55,7 @@ export function addFiat (...args) { export function getValueFromWeiHex ({ value, - fromCurrency = 'ETH', + fromCurrency = ETH, toCurrency, conversionRate, numberOfDecimals, @@ -75,7 +75,7 @@ export function getValueFromWeiHex ({ export function getTransactionFee ({ value, - fromCurrency = 'ETH', + fromCurrency = ETH, toCurrency, conversionRate, numberOfDecimals, @@ -101,7 +101,7 @@ export function formatCurrency (value, currencyCode) { export function convertTokenToFiat ({ value, - fromCurrency = 'ETH', + fromCurrency = ETH, toCurrency, conversionRate, contractExchangeRate, diff --git a/ui/app/helpers/utils/conversions.util.js b/ui/app/helpers/utils/conversions.util.js index 5e1c21ff7..030c57b87 100644 --- a/ui/app/helpers/utils/conversions.util.js +++ b/ui/app/helpers/utils/conversions.util.js @@ -105,7 +105,7 @@ export function decEthToConvertedCurrency (ethTotal, convertedCurrency, conversi return conversionUtil(ethTotal, { fromNumericBase: 'dec', toNumericBase: 'dec', - fromCurrency: 'ETH', + fromCurrency: ETH, toCurrency: convertedCurrency, numberOfDecimals: 2, conversionRate, diff --git a/ui/app/helpers/utils/util.js b/ui/app/helpers/utils/util.js index 94fa9ad42..5f9856965 100644 --- a/ui/app/helpers/utils/util.js +++ b/ui/app/helpers/utils/util.js @@ -137,7 +137,7 @@ function parseBalance (balance) { // Takes wei hex, returns an object with three properties. // Its "formatted" property is what we generally use to render values. -function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'ETH') { +function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'TAN') { var parsed = needsParse ? parseBalance(balance) : balance.split('.') var beforeDecimal = parsed[0] var afterDecimal = parsed[1] |