blob: 500b406bb2d6b3df4781084772f8086a26867e08 (
plain) (
tree)
|
|
import { connect } from 'react-redux'
import ConfirmAddToken from './confirm-add-token.component'
const extend = require('xtend')
const { addTokens, clearPendingTokens } = require('../../../actions')
const mapStateToProps = ({ metamask }) => {
const { pendingTokens, suggestedTokens } = metamask
const params = extend(pendingTokens, suggestedTokens)
return {
pendingTokens: params,
}
}
const mapDispatchToProps = dispatch => {
return {
addTokens: tokens => dispatch(addTokens(tokens)),
clearPendingTokens: () => dispatch(clearPendingTokens()),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ConfirmAddToken)
|