A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token...

31 lines
942 B

import { connect } from 'react-redux'
6 years ago
import { compose } from 'recompose'
import ConfirmAddSuggestedToken from './confirm-add-suggested-token.component'
6 years ago
import { withRouter } from 'react-router-dom'
const extend = require('xtend')
const { addToken, clearPendingTokens, removeSuggestedTokens } = require('../../../actions')
const mapStateToProps = ({ metamask }) => {
const { pendingTokens, suggestedTokens } = metamask
const params = extend(pendingTokens, suggestedTokens)
return {
pendingTokens: params,
}
}
const mapDispatchToProps = dispatch => {
return {
addToken: ({address, symbol, decimals, imageUrl}) => dispatch(addToken(address, symbol, decimals, imageUrl)),
clearPendingTokens: () => dispatch(clearPendingTokens()),
removeSuggestedTokens: () => dispatch(removeSuggestedTokens()),
}
}
6 years ago
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(ConfirmAddSuggestedToken)