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

21 lines
822 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { doHideModal } from 'redux/actions/app';
import { doAbandonTxo, doAbandonClaim, doResolveUri } from 'redux/actions/claims';
2020-07-23 16:22:57 +02:00
import { doToast } from 'redux/actions/notifications';
import ModalRevokeClaim from './view';
import { selectTransactionItems } from 'redux/selectors/wallet';
2017-10-27 21:42:54 +02:00
const select = (state) => ({
2017-11-01 21:23:30 +01:00
transactionItems: selectTransactionItems(state),
});
const perform = (dispatch) => ({
2020-07-23 16:22:57 +02:00
toast: (message, isError) => dispatch(doToast({ message, isError })),
closeModal: () => dispatch(doHideModal()),
abandonTxo: (txo, cb) => dispatch(doAbandonTxo(txo, cb)),
abandonClaim: (txid, nout, cb) => dispatch(doAbandonClaim(txid, nout, cb)),
2021-06-17 19:57:04 +02:00
doResolveUri: (uri) => dispatch(doResolveUri(uri)),
2017-10-27 21:42:54 +02:00
});
export default connect(select, perform)(ModalRevokeClaim);