mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #6481 from MetaMask/address-prop-types-errors
Address prop types errors
This commit is contained in:
commit
4fa9576cc1
@ -18,7 +18,7 @@ const mapStateToProps = ({ metamask }) => {
|
|||||||
|
|
||||||
const mapDispatchToProps = dispatch => {
|
const mapDispatchToProps = dispatch => {
|
||||||
return {
|
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()),
|
removeSuggestedTokens: () => dispatch(removeSuggestedTokens()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ export default class SendAssetRow extends Component {
|
|||||||
tokens: PropTypes.arrayOf(
|
tokens: PropTypes.arrayOf(
|
||||||
PropTypes.shape({
|
PropTypes.shape({
|
||||||
address: PropTypes.string,
|
address: PropTypes.string,
|
||||||
decimals: PropTypes.number,
|
decimals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||||
symbol: PropTypes.string,
|
symbol: PropTypes.string,
|
||||||
})
|
})
|
||||||
).isRequired,
|
).isRequired,
|
||||||
|
@ -91,7 +91,8 @@ function getAccountType (state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getSelectedAsset (state) {
|
function getSelectedAsset (state) {
|
||||||
return getSelectedToken(state) || 'ETH'
|
const selectedToken = getSelectedToken(state)
|
||||||
|
return selectedToken && selectedToken.symbol || 'ETH'
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCurrentNetworkId (state) {
|
function getCurrentNetworkId (state) {
|
||||||
|
Loading…
Reference in New Issue
Block a user