lbry-desktop/ui/component/walletSendTip/index.js

31 lines
1.3 KiB
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import {
makeSelectTitleForUri,
makeSelectClaimForUri,
selectClaimIsMineForUri,
2020-06-15 16:04:44 +02:00
selectFetchingMyChannels,
} from 'redux/selectors/claims';
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';
import { selectBalance, selectIsSendingSupport } from 'redux/selectors/wallet';
import { withRouter } from 'react-router';
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) => ({
activeChannelClaim: selectActiveChannelClaim(state),
balance: selectBalance(state),
claim: makeSelectClaimForUri(props.uri, false)(state),
claimIsMine: selectClaimIsMineForUri(state, props.uri),
2020-06-15 16:04:44 +02:00
fetchingChannels: selectFetchingMyChannels(state),
incognito: selectIncognito(state),
instantTipEnabled: makeSelectClientSetting(SETTINGS.INSTANT_PURCHASE_ENABLED)(state),
instantTipMax: makeSelectClientSetting(SETTINGS.INSTANT_PURCHASE_MAX)(state),
isPending: selectIsSendingSupport(state),
title: makeSelectTitleForUri(props.uri)(state),
2017-09-17 22:33:52 +02:00
});
export default withRouter(connect(select, { doHideModal, doSendTip, doSendCashTip })(WalletSendTip));