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