1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 23:06:37 +01:00
metamask-extension/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js

26 lines
746 B
JavaScript
Raw Normal View History

2018-05-20 08:04:19 +02:00
import { connect } from 'react-redux'
import ConfirmAddToken from './confirm-add-token.component'
2018-06-19 00:33:50 +02:00
const extend = require('xtend')
2018-08-04 01:24:12 +02:00
const { addTokens, clearPendingTokens, removeSuggestedTokens } = require('../../../actions')
2018-05-20 08:04:19 +02:00
const mapStateToProps = ({ metamask }) => {
2018-06-19 00:33:50 +02:00
const { pendingTokens, suggestedTokens } = metamask
const params = extend(pendingTokens, suggestedTokens)
2018-05-20 08:04:19 +02:00
return {
2018-06-19 00:33:50 +02:00
pendingTokens: params,
2018-05-20 08:04:19 +02:00
}
}
const mapDispatchToProps = dispatch => {
return {
addTokens: tokens => dispatch(addTokens(tokens)),
clearPendingTokens: () => dispatch(clearPendingTokens()),
2018-08-04 01:24:12 +02:00
removeSuggestedTokens: () => dispatch(removeSuggestedTokens()),
2018-05-20 08:04:19 +02:00
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ConfirmAddToken)