2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2018-04-18 00:03:01 -04:00
|
|
|
import {
|
2018-10-26 00:20:18 -04:00
|
|
|
doSendTip,
|
2018-04-18 00:03:01 -04:00
|
|
|
makeSelectTitleForUri,
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
selectIsSendingSupport,
|
2018-05-14 12:19:07 -04:00
|
|
|
selectBalance,
|
2018-04-18 00:03:01 -04:00
|
|
|
} from 'lbry-redux';
|
2018-04-03 19:58:58 -04:00
|
|
|
import WalletSendTip from './view';
|
2017-09-17 16:33:52 -04:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
isPending: selectIsSendingSupport(state),
|
|
|
|
title: makeSelectTitleForUri(props.uri)(state),
|
2020-02-12 13:59:48 -05:00
|
|
|
claim: makeSelectClaimForUri(props.uri, false)(state),
|
2018-05-14 12:19:07 -04:00
|
|
|
balance: selectBalance(state),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
2019-07-24 09:41:05 -04:00
|
|
|
sendSupport: (amount, claimId, isSupport) => dispatch(doSendTip(amount, claimId, isSupport)),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
2018-10-26 00:20:18 -04:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(WalletSendTip);
|