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

18 lines
599 B
JavaScript
Raw Permalink Normal View History

2018-07-18 21:48:30 +02:00
import { connect } from 'react-redux';
import { doWalletUnlock } from 'redux/actions/wallet';
import { selectWalletUnlockSucceeded } from 'redux/selectors/wallet';
2019-08-28 04:35:07 +02:00
import { doQuit, doHideModal } from 'redux/actions/app';
2018-07-18 21:48:30 +02:00
import ModalWalletUnlock from './view';
const select = (state) => ({
2018-07-18 21:48:30 +02:00
walletUnlockSucceded: selectWalletUnlockSucceeded(state),
});
const perform = (dispatch) => ({
closeModal: () => dispatch(doHideModal()),
2018-07-18 21:48:30 +02:00
quit: () => dispatch(doQuit()),
unlockWallet: (password) => dispatch(doWalletUnlock(password)),
2018-07-18 21:48:30 +02:00
});
export default connect(select, perform)(ModalWalletUnlock);