aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/first-time-flow/first-time-flow.container.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pages/first-time-flow/first-time-flow.container.js')
-rw-r--r--ui/app/components/pages/first-time-flow/first-time-flow.container.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/ui/app/components/pages/first-time-flow/first-time-flow.container.js b/ui/app/components/pages/first-time-flow/first-time-flow.container.js
new file mode 100644
index 000000000..782eddb74
--- /dev/null
+++ b/ui/app/components/pages/first-time-flow/first-time-flow.container.js
@@ -0,0 +1,30 @@
+import { connect } from 'react-redux'
+import FirstTimeFlow from './first-time-flow.component'
+import {
+ createNewVaultAndGetSeedPhrase,
+ createNewVaultAndRestore,
+ unlockAndGetSeedPhrase,
+} from '../../../actions'
+
+const mapStateToProps = state => {
+ const { metamask: { completedOnboarding, isInitialized, isUnlocked, noActiveNotices } } = state
+
+ return {
+ completedOnboarding,
+ isInitialized,
+ isUnlocked,
+ noActiveNotices,
+ }
+}
+
+const mapDispatchToProps = dispatch => {
+ return {
+ createNewAccount: password => dispatch(createNewVaultAndGetSeedPhrase(password)),
+ createNewAccountFromSeed: (password, seedPhrase) => {
+ return dispatch(createNewVaultAndRestore(password, seedPhrase))
+ },
+ unlockAccount: password => dispatch(unlockAndGetSeedPhrase(password)),
+ }
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(FirstTimeFlow)