diff --git a/package.json b/package.json index 1986032b1..337d15bf9 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "keytar": "^4.2.1", "lbry-format": "https://github.com/lbryio/lbry-format.git", "lbry-redux": "lbryio/lbry-redux#a22f8284110f957f3f645d42abc457ab8fb3fa8a", - "lbryinc": "lbryio/lbryinc#b3bb8c67745235ef54baea95accaedaa4bb86d4d", + "lbryinc": "lbryio/lbryinc#83c275da7a44f346ce9e796d06f30126f02b4c63", "localforage": "^1.7.1", "mammoth": "^1.4.6", "mime": "^2.3.1", diff --git a/src/renderer/component/rewardLink/index.js b/src/renderer/component/rewardLink/index.js index 7eea35460..6d4b60d5c 100644 --- a/src/renderer/component/rewardLink/index.js +++ b/src/renderer/component/rewardLink/index.js @@ -1,35 +1,19 @@ import { connect } from 'react-redux'; -import { - makeSelectClaimRewardError, - makeSelectRewardByType, - makeSelectIsRewardClaimPending, - doClaimRewardType, - doClaimRewardClearError, -} from 'lbryinc'; +import { makeSelectRewardByType, makeSelectIsRewardClaimPending, doClaimRewardType } from 'lbryinc'; import { doNavigate } from 'redux/actions/navigation'; import RewardLink from './view'; -const makeSelect = () => { - const selectIsPending = makeSelectIsRewardClaimPending(); - const selectReward = makeSelectRewardByType(); - const selectError = makeSelectClaimRewardError(); - - const select = (state, props) => ({ - errorMessage: selectError(state, props), - isPending: selectIsPending(state, props), - reward: selectReward(state, props.reward_type), - }); - - return select; -}; +const select = (state, props) => ({ + isPending: makeSelectIsRewardClaimPending()(state, props), + reward: makeSelectRewardByType()(state, props.reward_type), +}); const perform = dispatch => ({ - claimReward: reward => dispatch(doClaimRewardType(reward.reward_type)), - clearError: reward => dispatch(doClaimRewardClearError(reward)), + claimReward: reward => dispatch(doClaimRewardType(reward.reward_type, { notifyError: true })), navigate: path => dispatch(doNavigate(path)), }); export default connect( - makeSelect, + select, perform )(RewardLink); diff --git a/src/renderer/component/rewardLink/view.jsx b/src/renderer/component/rewardLink/view.jsx index 7ad8a4a21..b8de1d65b 100644 --- a/src/renderer/component/rewardLink/view.jsx +++ b/src/renderer/component/rewardLink/view.jsx @@ -1,6 +1,5 @@ // @flow import React from 'react'; -import { Modal } from 'modal/modal'; import Button from 'component/button'; type Reward = { @@ -10,15 +9,13 @@ type Reward = { type Props = { isPending: boolean, label: ?string, - errorMessage: ?string, reward: Reward, button: ?boolean, - clearError: Reward => void, claimReward: Reward => void, }; const RewardLink = (props: Props) => { - const { reward, claimReward, clearError, errorMessage, label, isPending, button } = props; + const { reward, claimReward, label, isPending, button } = props; return !reward ? null : (