diff options
author | Thomas <thomas.b.huang@gmail.com> | 2018-05-17 13:47:07 +0800 |
---|---|---|
committer | Thomas <thomas.b.huang@gmail.com> | 2018-05-17 13:47:07 +0800 |
commit | 5e80bc4cb93277c8b3952345a6cb4cc055248b94 (patch) | |
tree | a173db7caddd63a055dcf3eff4c8b66ba954eb27 /ui/app/components/pages/unlock-page/unlock-page.container.js | |
parent | d9be7f989a86e3fdfd83e4c632fd08cefd8309e5 (diff) | |
parent | 6e79225dbff512ab9bcae2731bcfc4ce33e98664 (diff) | |
download | tangerine-wallet-browser-5e80bc4cb93277c8b3952345a6cb4cc055248b94.tar.gz tangerine-wallet-browser-5e80bc4cb93277c8b3952345a6cb4cc055248b94.tar.zst tangerine-wallet-browser-5e80bc4cb93277c8b3952345a6cb4cc055248b94.zip |
Merge branch 'develop' into testing
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) |