diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-10-05 10:26:41 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-10-05 10:26:41 +0800 |
commit | 50d91f998d0dc228c1d5dac7966df89d6c3fe6c4 (patch) | |
tree | ebef0d63c5010a92b2032c6b9b2c69fcbdfaa4cb /ui/app/selectors | |
parent | b2939e86277a548ea05c83147ca913b8bcf0be65 (diff) | |
download | tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.tar tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.tar.gz tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.tar.bz2 tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.tar.lz tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.tar.xz tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.tar.zst tangerine-wallet-browser-50d91f998d0dc228c1d5dac7966df89d6c3fe6c4.zip |
Translate method names in the transaction list only when applicable
Diffstat (limited to 'ui/app/selectors')
-rw-r--r-- | ui/app/selectors/confirm-transaction.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/app/selectors/confirm-transaction.js b/ui/app/selectors/confirm-transaction.js index 6e760c429..86b10bac3 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/app/selectors/confirm-transaction.js @@ -126,7 +126,8 @@ const TOKEN_PARAM_VALUE = '_value' export const tokenAmountAndToAddressSelector = createSelector( tokenDataParamsSelector, - params => { + tokenDecimalsSelector, + (params, tokenDecimals) => { let toAddress = '' let tokenAmount = 0 @@ -136,6 +137,10 @@ export const tokenAmountAndToAddressSelector = createSelector( toAddress = toParam ? toParam.value : params[0].value const value = valueParam ? Number(valueParam.value) : Number(params[1].value) tokenAmount = roundExponential(value) + + if (tokenDecimals) { + tokenAmount = calcTokenAmount(value, tokenDecimals) + } } return { |