From a7010112453795c405f3ca9a9ac1e205be10c487 Mon Sep 17 00:00:00 2001 From: hackrush Date: Sat, 29 Jul 2017 13:51:03 +0530 Subject: [PATCH] Removed useless passing of claim arg in filePage --- ui/js/component/fileActions/index.js | 7 ++++++- ui/js/component/fileActions/view.jsx | 3 ++- ui/js/component/tipLink/view.jsx | 2 +- ui/js/page/filePage/view.jsx | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ui/js/component/fileActions/index.js b/ui/js/component/fileActions/index.js index 4311823d1..5802526af 100644 --- a/ui/js/component/fileActions/index.js +++ b/ui/js/component/fileActions/index.js @@ -12,7 +12,10 @@ import { makeSelectCostInfoForUri } from "selectors/cost_info"; import { doCloseModal, doOpenModal } from "actions/app"; import { doFetchAvailability } from "actions/availability"; import { doOpenFileInShell, doOpenFileInFolder } from "actions/file_info"; -import { makeSelectClaimForUriIsMine } from "selectors/claims"; +import { + makeSelectClaimForUriIsMine, + makeSelectClaimForUri, +} from "selectors/claims"; import { doPurchaseUri, doLoadVideo, doStartDownload } from "actions/content"; import FileActions from "./view"; @@ -23,6 +26,7 @@ const makeSelect = () => { const selectCostInfoForUri = makeSelectCostInfoForUri(); const selectLoadingForUri = makeSelectLoadingForUri(); const selectClaimForUriIsMine = makeSelectClaimForUriIsMine(); + const selectClaimForUri = makeSelectClaimForUri(); const select = (state, props) => ({ fileInfo: selectFileInfoForUri(state, props), @@ -34,6 +38,7 @@ const makeSelect = () => { costInfo: selectCostInfoForUri(state, props), loading: selectLoadingForUri(state, props), claimIsMine: selectClaimForUriIsMine(state, props), + claimInfo: selectClaimForUri(state, props), }); return select; diff --git a/ui/js/component/fileActions/view.jsx b/ui/js/component/fileActions/view.jsx index 216202205..79bfbf506 100644 --- a/ui/js/component/fileActions/view.jsx +++ b/ui/js/component/fileActions/view.jsx @@ -87,6 +87,7 @@ class FileActions extends React.PureComponent { costInfo, loading, claimIsMine, + claimInfo, } = this.props; const { showTipBox } = this.state; @@ -186,7 +187,7 @@ class FileActions extends React.PureComponent { onTipShow={this.handleTipShow.bind(this)} onTipHide={this.handleTipHide.bind(this)} showTipBox={showTipBox} - claim={this.props.claim} + address={claimInfo.address} /> {showMenu && !showTipBox ? diff --git a/ui/js/component/tipLink/view.jsx b/ui/js/component/tipLink/view.jsx index 3f710007f..7138e95aa 100644 --- a/ui/js/component/tipLink/view.jsx +++ b/ui/js/component/tipLink/view.jsx @@ -19,7 +19,7 @@ class TipLink extends React.PureComponent { } handleTipButtonClicked() { - let address = this.props.claim.address; + let address = this.props.address; let amount = this.state.feeAmount; this.props.setAddress(address); diff --git a/ui/js/page/filePage/view.jsx b/ui/js/page/filePage/view.jsx index 8bd952a60..3ca23aadc 100644 --- a/ui/js/page/filePage/view.jsx +++ b/ui/js/page/filePage/view.jsx @@ -126,7 +126,7 @@ class FilePage extends React.PureComponent { : uriIndicator}
- +