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.
39 lines
958 B
39 lines
958 B
import ConnectionsTab from './connections-tab.component'
|
|
import { compose } from 'recompose'
|
|
import { connect } from 'react-redux'
|
|
import { withRouter } from 'react-router-dom'
|
|
import {
|
|
approveProviderRequestByOrigin,
|
|
rejectProviderRequestByOrigin,
|
|
showModal,
|
|
} from '../../../store/actions'
|
|
|
|
export const mapStateToProps = state => {
|
|
const {
|
|
activeTab,
|
|
metamask,
|
|
} = state
|
|
const {
|
|
approvedOrigins,
|
|
} = metamask
|
|
|
|
return {
|
|
activeTab,
|
|
approvedOrigins,
|
|
}
|
|
}
|
|
|
|
export const mapDispatchToProps = dispatch => {
|
|
return {
|
|
approveProviderRequestByOrigin: (origin) => dispatch(approveProviderRequestByOrigin(origin)),
|
|
rejectProviderRequestByOrigin: (origin) => dispatch(rejectProviderRequestByOrigin(origin)),
|
|
showClearApprovalModal: () => dispatch(showModal({
|
|
name: 'CLEAR_APPROVED_ORIGINS',
|
|
})),
|
|
}
|
|
}
|
|
|
|
export default compose(
|
|
withRouter,
|
|
connect(mapStateToProps, mapDispatchToProps)
|
|
)(ConnectionsTab)
|
|
|