Skip to content

Commit

Permalink
Ensure future tokens add decimals as numbers while supporting numbers…
Browse files Browse the repository at this point in the history
… and strings in send-asset-row
  • Loading branch information
danjm committed Apr 17, 2019
1 parent 8c075b7 commit 8a82e62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const mapStateToProps = ({ metamask }) => {

const mapDispatchToProps = dispatch => {
return {
addToken: ({address, symbol, decimals, image}) => dispatch(addToken(address, symbol, decimals, image)),
addToken: ({address, symbol, decimals, image}) => dispatch(addToken(address, symbol, Number(decimals), image)),
removeSuggestedTokens: () => dispatch(removeSuggestedTokens()),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class SendAssetRow extends Component {
tokens: PropTypes.arrayOf(
PropTypes.shape({
address: PropTypes.string,
decimals: PropTypes.number,
decimals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
symbol: PropTypes.string,
})
).isRequired,
Expand Down

0 comments on commit 8a82e62

Please sign in to comment.