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

31 lines
1.3 KiB
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import {
selectTitleForUri,
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 { selectClientSetting } 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: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_ENABLED),
instantTipMax: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_MAX),
isPending: selectIsSendingSupport(state),
title: selectTitleForUri(state, props.uri),
2017-09-17 22:33:52 +02:00
});
export default withRouter(connect(select, { doHideModal, doSendTip, doSendCashTip })(WalletSendTip));