mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
32 lines
744 B
JavaScript
32 lines
744 B
JavaScript
|
import { connect } from 'react-redux'
|
||
|
import { withRouter } from 'react-router-dom'
|
||
|
import { compose } from 'recompose'
|
||
|
|
||
|
const {
|
||
|
tryUnlockMetamask,
|
||
|
forgotPassword,
|
||
|
markPasswordForgotten,
|
||
|
} = require('../../../actions')
|
||
|
|
||
|
import UnlockPage from './unlock-page.component'
|
||
|
|
||
|
const mapStateToProps = state => {
|
||
|
const { metamask: { isUnlocked } } = state
|
||
|
return {
|
||
|
isUnlocked,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const mapDispatchToProps = dispatch => {
|
||
|
return {
|
||
|
forgotPassword: () => dispatch(forgotPassword()),
|
||
|
tryUnlockMetamask: password => dispatch(tryUnlockMetamask(password)),
|
||
|
markPasswordForgotten: () => dispatch(markPasswordForgotten()),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default compose(
|
||
|
withRouter,
|
||
|
connect(mapStateToProps, mapDispatchToProps)
|
||
|
)(UnlockPage)
|