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