2018-05-28 21:53:15 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-05-20 21:30:40 +02:00
|
|
|
import { doSendDraftTransaction, makeSelectClaimForUri, doSendTip } from 'lbry-redux';
|
2018-10-29 18:23:53 +01:00
|
|
|
import { doHideModal } from 'redux/actions/app';
|
2018-05-28 21:53:15 +02:00
|
|
|
import ModalConfirmTransaction from './view';
|
2021-05-20 21:30:40 +02:00
|
|
|
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
2018-05-28 21:53:15 +02:00
|
|
|
|
2021-05-20 21:30:40 +02:00
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.destination)(state),
|
|
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
|
|
incognito: selectIncognito(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
closeModal: () => dispatch(doHideModal()),
|
2018-05-28 21:53:15 +02:00
|
|
|
sendToAddress: (address, amount) => dispatch(doSendDraftTransaction(address, amount)),
|
2021-05-20 21:30:40 +02:00
|
|
|
sendTip: (params, isSupport) => dispatch(doSendTip(params, isSupport)),
|
2018-05-28 21:53:15 +02:00
|
|
|
});
|
|
|
|
|
2021-05-20 21:30:40 +02:00
|
|
|
export default connect(select, perform)(ModalConfirmTransaction);
|