1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Ensure future tokens add decimals as numbers while supporting numbers and strings in send-asset-row

This commit is contained in:
Dan Miller 2019-04-17 21:26:25 -02:30
parent 8c075b7158
commit 8a82e629bf
2 changed files with 2 additions and 2 deletions

View File

@ -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()),
}
}

View File

@ -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,