diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-07-18 04:43:15 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-07-18 05:06:30 +0800 |
commit | 301ae305b88d0a7e3a3cbca9a500f4b39753dc52 (patch) | |
tree | c81242106d9e6c718e54ab338e99b5e10c665089 | |
parent | 279bdfc2e7e1ca6ad69e449af4eedcfa079496bf (diff) | |
download | tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.tar tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.tar.gz tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.tar.bz2 tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.tar.lz tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.tar.xz tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.tar.zst tangerine-wallet-browser-301ae305b88d0a7e3a3cbca9a500f4b39753dc52.zip |
Use Number constructor for number conversion. Use existing noConversionRateAvailable message
3 files changed, 4 insertions, 7 deletions
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index a87753274..6da058786 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -581,9 +581,6 @@ "noAddressForName": { "message": "No address has been set for this name." }, - "noConversionRate": { - "message": "No Conversion Rate" - }, "noDeposits": { "message": "No deposits received" }, diff --git a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js b/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js index 618ff123c..365ae216e 100644 --- a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js +++ b/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js @@ -39,7 +39,7 @@ export default class ConfirmTokenTransactionBase extends Component { const { currentCurrency, contractExchangeRate } = this.props if (typeof contractExchangeRate === 'undefined') { - return this.context.t('noConversionRate') + return this.context.t('noConversionRateAvailable') } else { const fiatTransactionAmount = this.getFiatTransactionAmount() return formatCurrency(fiatTransactionAmount, currentCurrency) diff --git a/ui/app/selectors/confirm-transaction.js b/ui/app/selectors/confirm-transaction.js index 5f1ae225c..54016a30e 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/app/selectors/confirm-transaction.js @@ -105,7 +105,7 @@ export const tokenAmountAndToAddressSelector = createSelector( const toParam = params.find(param => param.name === TOKEN_PARAM_TO) const valueParam = params.find(param => param.name === TOKEN_PARAM_VALUE) toAddress = toParam ? toParam.value : params[0].value - tokenAmount = valueParam ? +valueParam.value : +params[1].value + tokenAmount = valueParam ? Number(valueParam.value) : Number(params[1].value) } return { @@ -123,7 +123,7 @@ export const approveTokenAmountAndToAddressSelector = createSelector( if (params && params.length) { toAddress = params.find(param => param.name === TOKEN_PARAM_SPENDER).value - tokenAmount = +params.find(param => param.name === TOKEN_PARAM_VALUE).value + tokenAmount = Number(params.find(param => param.name === TOKEN_PARAM_VALUE).value) } return { @@ -142,7 +142,7 @@ export const sendTokenTokenAmountAndToAddressSelector = createSelector( if (params && params.length) { toAddress = params.find(param => param.name === TOKEN_PARAM_TO).value - tokenAmount = +params.find(param => param.name === TOKEN_PARAM_VALUE).value + tokenAmount = Number(params.find(param => param.name === TOKEN_PARAM_VALUE).value) if (tokenDecimals) { tokenAmount = calcTokenAmount(tokenAmount, tokenDecimals) |