diff options
author | Dan <danjm.com@gmail.com> | 2018-05-14 21:30:50 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-05-14 22:14:50 +0800 |
commit | 6bc8cc819a16118acc010d0efdec90afbda14590 (patch) | |
tree | 2d2c35604af2e6a44c5f3ecb5c901a52980710d8 /ui/app/components/pages/unlock-page/unlock-page.container.js | |
parent | 0739618a61cfc383498e466f4fdeb5a25324598f (diff) | |
download | tangerine-wallet-browser-6bc8cc819a16118acc010d0efdec90afbda14590.tar.gz tangerine-wallet-browser-6bc8cc819a16118acc010d0efdec90afbda14590.tar.zst tangerine-wallet-browser-6bc8cc819a16118acc010d0efdec90afbda14590.zip |
Merge branch 'develop' into i3725-refactor-send-component-
Diffstat (limited to 'ui/app/components/pages/unlock-page/unlock-page.container.js')
-rw-r--r-- | ui/app/components/pages/unlock-page/unlock-page.container.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui/app/components/pages/unlock-page/unlock-page.container.js b/ui/app/components/pages/unlock-page/unlock-page.container.js new file mode 100644 index 000000000..9788a18ea --- /dev/null +++ b/ui/app/components/pages/unlock-page/unlock-page.container.js @@ -0,0 +1,33 @@ +import { connect } from 'react-redux' +import { withRouter } from 'react-router-dom' +import { compose } from 'recompose' + +const { + tryUnlockMetamask, + forgotPassword, + markPasswordForgotten, + setNetworkEndpoints, +} = 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()), + setNetworkEndpoints: type => dispatch(setNetworkEndpoints(type)), + } +} + +export default compose( + withRouter, + connect(mapStateToProps, mapDispatchToProps) +)(UnlockPage) |