2018-07-18 21:48:30 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { selectWalletEncryptSucceeded, selectWalletEncryptResult } from 'redux/selectors/wallet';
|
|
|
|
import { doWalletStatus, doWalletEncrypt } from 'redux/actions/wallet';
|
2019-08-28 04:35:07 +02:00
|
|
|
import { doHideModal } from 'redux/actions/app';
|
2018-07-18 21:48:30 +02:00
|
|
|
import ModalWalletEncrypt from './view';
|
|
|
|
|
2021-10-08 05:47:39 +02:00
|
|
|
const select = (state) => ({
|
2018-07-18 21:48:30 +02:00
|
|
|
walletEncryptSucceded: selectWalletEncryptSucceeded(state),
|
|
|
|
walletEncryptResult: selectWalletEncryptResult(state),
|
|
|
|
});
|
|
|
|
|
2021-10-08 05:47:39 +02:00
|
|
|
const perform = (dispatch) => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
closeModal: () => dispatch(doHideModal()),
|
2021-10-08 05:47:39 +02:00
|
|
|
encryptWallet: (password) => dispatch(doWalletEncrypt(password)),
|
2018-07-18 21:48:30 +02:00
|
|
|
updateWalletStatus: () => dispatch(doWalletStatus()),
|
|
|
|
});
|
|
|
|
|
2021-10-08 05:47:39 +02:00
|
|
|
export default connect(select, perform)(ModalWalletEncrypt);
|