diff options
Diffstat (limited to 'ui/app/selectors/confirm-transaction.js')
-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 { |