Fix token `decimal` type (#8670)

The `decimals` property of tokens was being set as a string instead of
a Number for any tokens added via `getTokenParams`. It's now cast to a
Number instead.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 145edbe99d
commit e89540fd94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ui/app/store/actions.js

@ -2216,7 +2216,7 @@ export function getTokenParams (tokenAddress) {
return fetchSymbolAndDecimals(tokenAddress, existingTokens)
.then(({ symbol, decimals }) => {
dispatch(addToken(tokenAddress, symbol, decimals))
dispatch(addToken(tokenAddress, symbol, Number(decimals)))
dispatch(loadingTokenParamsFinished())
})
}

Loading…
Cancel
Save