2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2020-04-23 09:44:18 -07:00
|
|
|
import {
|
2022-01-19 20:46:01 -05:00
|
|
|
selectTitleForUri,
|
2020-04-23 09:44:18 -07:00
|
|
|
makeSelectClaimForUri,
|
2020-06-09 18:09:24 -04:00
|
|
|
makeSelectClaimIsMine,
|
2020-06-15 10:04:44 -04:00
|
|
|
selectFetchingMyChannels,
|
2021-10-07 23:47:39 -04:00
|
|
|
} from 'redux/selectors/claims';
|
2022-01-24 11:07:09 -05:00
|
|
|
import { doHideModal } from 'redux/actions/app';
|
2021-10-07 23:47:39 -04:00
|
|
|
import { doSendTip } from 'redux/actions/wallet';
|
2020-04-24 16:53:57 -07:00
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2021-02-09 11:05:56 -05:00
|
|
|
import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
2022-01-24 11:07:09 -05:00
|
|
|
import { selectBalance, selectIsSendingSupport } from 'redux/selectors/wallet';
|
|
|
|
import { withRouter } from 'react-router';
|
|
|
|
import * as SETTINGS from 'constants/settings';
|
|
|
|
import WalletSendTip from './view';
|
2017-09-17 16:33:52 -04:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2022-01-24 11:07:09 -05:00
|
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
2018-05-14 12:19:07 -04:00
|
|
|
balance: selectBalance(state),
|
2022-01-24 11:07:09 -05:00
|
|
|
claim: makeSelectClaimForUri(props.uri, false)(state), // find this selectClaim
|
2020-06-09 18:09:24 -04:00
|
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
2020-06-15 10:04:44 -04:00
|
|
|
fetchingChannels: selectFetchingMyChannels(state),
|
2021-02-09 11:05:56 -05:00
|
|
|
incognito: selectIncognito(state),
|
2022-01-24 11:07:09 -05:00
|
|
|
instantTipEnabled: makeSelectClientSetting(SETTINGS.INSTANT_PURCHASE_ENABLED)(state),
|
|
|
|
instantTipMax: makeSelectClientSetting(SETTINGS.INSTANT_PURCHASE_MAX)(state),
|
|
|
|
isPending: selectIsSendingSupport(state),
|
|
|
|
title: selectTitleForUri(state, props.uri),
|
2017-09-17 16:33:52 -04:00
|
|
|
});
|
|
|
|
|
2022-01-24 11:07:09 -05:00
|
|
|
export default withRouter(connect(select, { doHideModal, doSendTip })(WalletSendTip)); // doSendCashTip gone
|