1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 11:01:41 +01:00
metamask-extension/ui/app/pages/mobile-sync/mobile-sync.container.js
Esteban Miño 73257b1cd1
feature/sync imported accounts with mobile (#8631)
* sync imported accounts

* Update app/scripts/metamask-controller.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* exportAccounts action

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-25 22:04:17 -03:00

31 lines
1.0 KiB
JavaScript

import { connect } from 'react-redux'
import { displayWarning, requestRevealSeedWords, fetchInfoToSync, exportAccounts } from '../../store/actions'
import MobileSyncPage from './mobile-sync.component'
import { getMostRecentOverviewPage } from '../../ducks/history/history'
import { getMetaMaskKeyrings } from '../../selectors'
const mapDispatchToProps = (dispatch) => {
return {
requestRevealSeedWords: (password) => dispatch(requestRevealSeedWords(password)),
fetchInfoToSync: () => dispatch(fetchInfoToSync()),
displayWarning: (message) => dispatch(displayWarning(message || null)),
exportAccounts: (password, addresses) => dispatch(exportAccounts(password, addresses)),
}
}
const mapStateToProps = (state) => {
const {
metamask: {
selectedAddress,
},
} = state
return {
mostRecentOverviewPage: getMostRecentOverviewPage(state),
selectedAddress,
keyrings: getMetaMaskKeyrings(state),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(MobileSyncPage)