2018-05-28 21:53:15 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { doSendDraftTransaction, doSendTip } from 'redux/actions/wallet';
|
2021-12-31 18:52:26 +01:00
|
|
|
import { selectClaimForUri } from 'redux/selectors/claims';
|
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) => ({
|
2021-12-31 18:52:26 +01:00
|
|
|
claim: selectClaimForUri(state, props.destination)(state),
|
2021-05-20 21:30:40 +02:00
|
|
|
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);
|