2018-07-18 15:48:30 -04:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-07 23:47:39 -04:00
|
|
|
import { doWalletUnlock } from 'redux/actions/wallet';
|
|
|
|
import { selectWalletUnlockSucceeded } from 'redux/selectors/wallet';
|
2019-08-27 22:35:07 -04:00
|
|
|
import { doQuit, doHideModal } from 'redux/actions/app';
|
2018-07-18 15:48:30 -04:00
|
|
|
import ModalWalletUnlock from './view';
|
|
|
|
|
2021-10-07 23:47:39 -04:00
|
|
|
const select = (state) => ({
|
2018-07-18 15:48:30 -04:00
|
|
|
walletUnlockSucceded: selectWalletUnlockSucceeded(state),
|
|
|
|
});
|
|
|
|
|
2021-10-07 23:47:39 -04:00
|
|
|
const perform = (dispatch) => ({
|
2018-10-29 13:23:53 -04:00
|
|
|
closeModal: () => dispatch(doHideModal()),
|
2018-07-18 15:48:30 -04:00
|
|
|
quit: () => dispatch(doQuit()),
|
2021-10-07 23:47:39 -04:00
|
|
|
unlockWallet: (password) => dispatch(doWalletUnlock(password)),
|
2018-07-18 15:48:30 -04:00
|
|
|
});
|
|
|
|
|
2021-10-07 23:47:39 -04:00
|
|
|
export default connect(select, perform)(ModalWalletUnlock);
|