diff --git a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js index a9f1556a8..d835a884e 100644 --- a/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js +++ b/ui/app/pages/confirm-token-transaction-base/confirm-token-transaction-base.container.js @@ -44,7 +44,7 @@ const mapStateToProps = (state, ownProps) => { const tokenData = getTokenData(data) const tokenValue = getTokenValueParam(tokenData) const toAddress = getTokenAddressParam(tokenData) - const tokenAmount = tokenData && calcTokenAmount(tokenValue, decimals).toString() + const tokenAmount = tokenData && calcTokenAmount(tokenValue, decimals).toFixed() const contractExchangeRate = contractExchangeRateSelector(state) return { diff --git a/ui/app/selectors/confirm-transaction.js b/ui/app/selectors/confirm-transaction.js index 31927063e..145893750 100644 --- a/ui/app/selectors/confirm-transaction.js +++ b/ui/app/selectors/confirm-transaction.js @@ -160,12 +160,15 @@ export const sendTokenTokenAmountAndToAddressSelector = createSelector( let toAddress = '' let tokenAmount = '0' + // Token params here are ethers BigNumbers, which have a different + // interface than bignumber.js if (args && args.length) { toAddress = args[TOKEN_PARAM_TO] let value = args[TOKEN_PARAM_VALUE].toString() if (tokenDecimals) { - value = calcTokenAmount(value, tokenDecimals).toString() + // bignumber.js return value + value = calcTokenAmount(value, tokenDecimals).toFixed() } tokenAmount = roundExponential(value)