2019-01-23 16:25:34 +01:00
|
|
|
import Lock from './lock.component'
|
2020-02-24 23:58:26 +01:00
|
|
|
import { compose } from 'redux'
|
2019-01-23 16:25:34 +01:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import { withRouter } from 'react-router-dom'
|
2019-03-22 00:03:30 +01:00
|
|
|
import { lockMetamask } from '../../store/actions'
|
2019-01-23 16:25:34 +01:00
|
|
|
|
2020-02-15 21:34:12 +01:00
|
|
|
const mapStateToProps = (state) => {
|
2019-01-23 16:25:34 +01:00
|
|
|
const { metamask: { isUnlocked } } = state
|
|
|
|
|
|
|
|
return {
|
|
|
|
isUnlocked,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-15 21:34:12 +01:00
|
|
|
const mapDispatchToProps = (dispatch) => {
|
2019-01-23 16:25:34 +01:00
|
|
|
return {
|
|
|
|
lockMetamask: () => dispatch(lockMetamask()),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default compose(
|
|
|
|
withRouter,
|
|
|
|
connect(mapStateToProps, mapDispatchToProps)
|
|
|
|
)(Lock)
|