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