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.
26 lines
774 B
26 lines
774 B
6 years ago
|
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)
|