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:
parent
8c075b7158
commit
8a82e629bf
@ -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()),
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user