lbry-desktop/ui/modal/modalWalletEncrypt/index.js

19 lines
721 B
JavaScript
Raw Normal View History

2018-07-18 21:48:30 +02:00
import { connect } from 'react-redux';
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';
const select = (state) => ({
2018-07-18 21:48:30 +02:00
walletEncryptSucceded: selectWalletEncryptSucceeded(state),
walletEncryptResult: selectWalletEncryptResult(state),
});
const perform = (dispatch) => ({
closeModal: () => dispatch(doHideModal()),
encryptWallet: (password) => dispatch(doWalletEncrypt(password)),
2018-07-18 21:48:30 +02:00
updateWalletStatus: () => dispatch(doWalletStatus()),
});
export default connect(select, perform)(ModalWalletEncrypt);