2019-11-24 18:16:25 +01:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import { displayWarning, requestRevealSeedWords, fetchInfoToSync } from '../../store/actions'
|
|
|
|
import MobileSyncPage from './mobile-sync.component'
|
2020-06-01 19:54:32 +02:00
|
|
|
import { getMostRecentOverviewPage } from '../../ducks/history/history'
|
2019-11-24 18:16:25 +01:00
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
|
|
return {
|
2020-02-15 21:34:12 +01:00
|
|
|
requestRevealSeedWords: (password) => dispatch(requestRevealSeedWords(password)),
|
2019-11-24 18:16:25 +01:00
|
|
|
fetchInfoToSync: () => dispatch(fetchInfoToSync()),
|
|
|
|
displayWarning: (message) => dispatch(displayWarning(message || null)),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-15 21:34:12 +01:00
|
|
|
const mapStateToProps = (state) => {
|
2019-11-24 18:16:25 +01:00
|
|
|
const {
|
|
|
|
metamask: {
|
|
|
|
selectedAddress,
|
|
|
|
},
|
|
|
|
} = state
|
|
|
|
|
|
|
|
return {
|
2020-06-01 19:54:32 +02:00
|
|
|
mostRecentOverviewpage: getMostRecentOverviewPage(state),
|
2019-11-24 18:16:25 +01:00
|
|
|
selectedAddress,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-09 04:34:58 +01:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(MobileSyncPage)
|