aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-08-09 03:40:04 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-08-09 03:40:04 +0800
commit656afeefad6ed5f41171ca839815931ed0702396 (patch)
treeb01771ef996bac0b80fbc5a729731de07930d851 /ui
parentf269021dc3ea78c6359b9db50db30fdd549020b7 (diff)
parent1d4ee6bf765f0b7fc80fa7f95618e8de3844488d (diff)
downloadtangerine-wallet-browser-656afeefad6ed5f41171ca839815931ed0702396.tar.gz
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.js10
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 {