diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-09 03:40:04 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-09 03:40:04 +0800 |
commit | 656afeefad6ed5f41171ca839815931ed0702396 (patch) | |
tree | b01771ef996bac0b80fbc5a729731de07930d851 /ui | |
parent | f269021dc3ea78c6359b9db50db30fdd549020b7 (diff) | |
parent | 1d4ee6bf765f0b7fc80fa7f95618e8de3844488d (diff) | |
download | tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar.gz tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar.bz2 tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar.lz tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar.xz tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar.zst tangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.zip |
fix merge conflicts
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/selectors/confirm-transaction.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/app/selectors/confirm-transaction.js b/ui/app/selectors/confirm-transaction.js index 9548cf75e..aa1fc5404 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/app/selectors/confirm-transaction.js @@ -147,14 +147,20 @@ export const tokenAmountAndToAddressSelector = createSelector( export const approveTokenAmountAndToAddressSelector = createSelector( tokenDataParamsSelector, - params => { + tokenDecimalsSelector, + (params, tokenDecimals) => { let toAddress = '' let tokenAmount = 0 if (params && params.length) { toAddress = params.find(param => param.name === TOKEN_PARAM_SPENDER).value const value = Number(params.find(param => param.name === TOKEN_PARAM_VALUE).value) - tokenAmount = roundExponential(value) + + if (tokenDecimals) { + tokenAmount = calcTokenAmount(value, tokenDecimals) + } + + tokenAmount = roundExponential(tokenAmount) } return { |