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