2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2021-05-20 21:30:40 +02:00
|
|
|
import { selectBalance, selectMyChannelClaims, makeSelectClaimForUri } from 'lbry-redux';
|
2018-10-29 18:23:53 +01:00
|
|
|
import { doOpenModal } from 'redux/actions/app';
|
2017-12-21 22:08:54 +01:00
|
|
|
import WalletSend from './view';
|
2019-10-30 07:07:30 +01:00
|
|
|
import { withRouter } from 'react-router';
|
2021-05-20 21:30:40 +02:00
|
|
|
import { selectToast } from 'redux/selectors/notifications';
|
2017-05-11 02:59:47 +02:00
|
|
|
|
2018-03-26 23:32:43 +02:00
|
|
|
const perform = dispatch => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
2017-06-06 06:21:55 +02:00
|
|
|
});
|
2017-05-11 02:59:47 +02:00
|
|
|
|
2021-05-20 21:30:40 +02:00
|
|
|
const select = (state, props) => ({
|
2018-03-26 23:32:43 +02:00
|
|
|
balance: selectBalance(state),
|
2020-06-10 00:09:24 +02:00
|
|
|
channels: selectMyChannelClaims(state),
|
2021-05-20 21:30:40 +02:00
|
|
|
contentClaim: makeSelectClaimForUri(props.contentUri)(state),
|
|
|
|
snack: selectToast(state),
|
2017-06-06 06:21:55 +02:00
|
|
|
});
|
2017-05-11 02:59:47 +02:00
|
|
|
|
2020-06-10 00:09:24 +02:00
|
|
|
export default withRouter(connect(select, perform)(WalletSend));
|