aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages/home/home.container.js
blob: 96a45a69b2377102b3b55a27b645b1d4d7b90a33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Home from './home.component'
import { compose } from 'recompose'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'

const mapStateToProps = state => {
  const { metamask, appState } = state
  const {
    unapprovedTxs = {},
    unapprovedMsgCount = 0,
    unapprovedPersonalMsgCount = 0,
    unapprovedTypedMessagesCount = 0,
    noActiveNotices,
    lostAccounts,
    seedWords,
  } = metamask
  const { forgottenPassword } = appState

  return {
    unapprovedTxs,
    unapprovedMsgCount,
    unapprovedPersonalMsgCount,
    unapprovedTypedMessagesCount,
    noActiveNotices,
    lostAccounts,
    forgottenPassword,
    seedWords,
  }
}

export default compose(
  withRouter,
  connect(mapStateToProps)
)(Home)