diff --git a/src/renderer/component/walletSendTip/index.js b/src/renderer/component/walletSendTip/index.js index daa4ec66a..7677f0a7a 100644 --- a/src/renderer/component/walletSendTip/index.js +++ b/src/renderer/component/walletSendTip/index.js @@ -1,17 +1,17 @@ -import React from 'react'; import { connect } from 'react-redux'; import { doSendSupport } from 'redux/actions/wallet'; -import WalletSendTip from './view'; -import { makeSelectTitleForUri } from 'redux/selectors/claims'; +import { makeSelectTitleForUri, makeSelectClaimForUri } from 'redux/selectors/claims'; import { selectIsSendingSupport } from 'redux/selectors/wallet'; +import WalletSendTip from './view'; const select = (state, props) => ({ isPending: selectIsSendingSupport(state), title: makeSelectTitleForUri(props.uri)(state), + claim: makeSelectClaimForUri(props.uri)(state), }); const perform = dispatch => ({ - sendSupport: (amount, claim_id, uri) => dispatch(doSendSupport(amount, claim_id, uri)), + sendSupport: (amount, claimId, uri) => dispatch(doSendSupport(amount, claimId, uri)), }); export default connect(select, perform)(WalletSendTip); diff --git a/src/renderer/component/walletSendTip/view.jsx b/src/renderer/component/walletSendTip/view.jsx index 6433d0cc1..9af0da866 100644 --- a/src/renderer/component/walletSendTip/view.jsx +++ b/src/renderer/component/walletSendTip/view.jsx @@ -5,9 +5,9 @@ import { FormField } from 'component/common/form'; import UriIndicator from 'component/uriIndicator'; type Props = { - claim_id: string, uri: string, title: string, + claim: { claim_id: string }, errorMessage: string, isPending: boolean, sendSupport: (number, string, string) => void, @@ -31,7 +31,8 @@ class WalletSendTip extends React.PureComponent { } handleSendButtonClicked() { - const { claim_id: claimId, uri, sendSupport, sendTipCallback } = this.props; + const { claim, uri, sendSupport, sendTipCallback } = this.props; + const { claim_id: claimId } = claim; const { amount } = this.state; sendSupport(amount, claimId, uri); @@ -49,7 +50,7 @@ class WalletSendTip extends React.PureComponent { } render() { - const { errorMessage, isPending, title, uri, onCancel } = this.props; + const { title, errorMessage, isPending, uri, onCancel } = this.props; return (