2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2020-04-23 09:44:18 -07:00
|
|
|
import {
|
2021-11-16 12:23:18 +08:00
|
|
|
selectTitleForUri,
|
2020-04-23 09:44:18 -07:00
|
|
|
makeSelectClaimForUri,
|
2021-11-10 10:30:03 +08:00
|
|
|
selectClaimIsMineForUri,
|
2020-06-15 10:04:44 -04:00
|
|
|
selectFetchingMyChannels,
|
2021-10-17 16:36:14 +08:00
|
|
|
} from 'redux/selectors/claims';
|
2021-10-28 17:25:34 -03:00
|
|
|
import { doHideModal } from 'redux/actions/app';
|
|
|
|
import { doSendTip, doSendCashTip } from 'redux/actions/wallet';
|
2021-11-23 12:29:04 +08:00
|
|
|
import { selectClientSetting } from 'redux/selectors/settings';
|
2021-10-28 17:25:34 -03:00
|
|
|
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
2021-10-17 16:36:14 +08:00
|
|
|
import { selectBalance, selectIsSendingSupport } from 'redux/selectors/wallet';
|
2021-10-28 17:25:34 -03:00
|
|
|
import { withRouter } from 'react-router';
|
2021-10-17 16:36:14 +08:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2018-04-03 19:58:58 -04:00
|
|
|
import WalletSendTip from './view';
|
2017-09-17 16:33:52 -04:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2021-10-28 17:25:34 -03:00
|
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
2018-05-14 12:19:07 -04:00
|
|
|
balance: selectBalance(state),
|
2021-10-28 17:25:34 -03:00
|
|
|
claim: makeSelectClaimForUri(props.uri, false)(state),
|
2021-11-10 10:30:03 +08:00
|
|
|
claimIsMine: selectClaimIsMineForUri(state, props.uri),
|
2020-06-15 10:04:44 -04:00
|
|
|
fetchingChannels: selectFetchingMyChannels(state),
|
2021-02-09 11:05:56 -05:00
|
|
|
incognito: selectIncognito(state),
|
2021-11-23 12:29:04 +08:00
|
|
|
instantTipEnabled: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_ENABLED),
|
|
|
|
instantTipMax: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_MAX),
|
2021-10-28 17:25:34 -03:00
|
|
|
isPending: selectIsSendingSupport(state),
|
2021-11-16 12:23:18 +08:00
|
|
|
title: selectTitleForUri(state, props.uri),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
2021-10-28 17:25:34 -03:00
|
|
|
export default withRouter(connect(select, { doHideModal, doSendTip, doSendCashTip })(WalletSendTip));
|