1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js
2018-08-06 20:03:49 -04:00

26 lines
774 B
JavaScript

import { connect } from 'react-redux'
import ConfirmAddSuggestedToken from './confirm-add-suggested-token.component'
const extend = require('xtend')
const { addTokens, clearPendingTokens, removeSuggestedTokens } = 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()),
removeSuggestedTokens: () => dispatch(removeSuggestedTokens()),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ConfirmAddSuggestedToken)