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.
27 lines
544 B
27 lines
544 B
4 years ago
|
import { compose } from 'redux';
|
||
|
import { connect } from 'react-redux';
|
||
|
import { withRouter } from 'react-router-dom';
|
||
|
import { lockMetamask } from '../../store/actions';
|
||
|
import Lock from './lock.component';
|
||
4 years ago
|
|
||
|
const mapStateToProps = (state) => {
|
||
|
const {
|
||
|
metamask: { isUnlocked },
|
||
4 years ago
|
} = state;
|
||
4 years ago
|
|
||
|
return {
|
||
|
isUnlocked,
|
||
4 years ago
|
};
|
||
|
};
|
||
4 years ago
|
|
||
|
const mapDispatchToProps = (dispatch) => {
|
||
|
return {
|
||
|
lockMetamask: () => dispatch(lockMetamask()),
|
||
4 years ago
|
};
|
||
|
};
|
||
4 years ago
|
|
||
|
export default compose(
|
||
|
withRouter,
|
||
|
connect(mapStateToProps, mapDispatchToProps),
|
||
4 years ago
|
)(Lock);
|