diff --git a/app/src/component/floatingWalletBalance/index.js b/app/src/component/floatingWalletBalance/index.js index 27e9e25..e0ba24b 100644 --- a/app/src/component/floatingWalletBalance/index.js +++ b/app/src/component/floatingWalletBalance/index.js @@ -1,9 +1,11 @@ import { connect } from 'react-redux'; import { selectBalance } from 'lbry-redux'; import FloatingWalletBalance from './view'; +import { doRewardList, selectUnclaimedRewardValue, selectFetchingRewards, selectUser } from 'lbryinc'; const select = state => ({ balance: selectBalance(state), + unclaimedRewardAmount: selectUnclaimedRewardValue(state), }); export default connect(select, null)(FloatingWalletBalance); diff --git a/app/src/component/floatingWalletBalance/view.js b/app/src/component/floatingWalletBalance/view.js index f48fb18..be0843f 100644 --- a/app/src/component/floatingWalletBalance/view.js +++ b/app/src/component/floatingWalletBalance/view.js @@ -13,16 +13,23 @@ type Props = { class FloatingWalletBalance extends React.PureComponent { render() { - const { balance, navigation } = this.props; + const { balance, navigation, unclaimedRewardAmount } = this.props; return ( - navigation && navigation.navigate({ routeName: 'WalletStack' })}> - {isNaN(balance) && } - - {(balance || balance === 0) && (formatCredits(parseFloat(balance), 2) + ' LBC')} - - + + navigation && navigation.navigate({ routeName: 'WalletStack' })}> + {isNaN(balance) && } + + {(balance || balance === 0) && (formatCredits(parseFloat(balance), 2) + ' LBC')} + + + {unclaimedRewardAmount > 0 && + navigation && navigation.navigate({ routeName: 'Rewards' })} > + claim {unclaimedRewardAmount} + } + ); } } diff --git a/app/src/component/rewardSummary/view.js b/app/src/component/rewardSummary/view.js index 5009236..20a847a 100644 --- a/app/src/component/rewardSummary/view.js +++ b/app/src/component/rewardSummary/view.js @@ -56,14 +56,12 @@ class RewardSummary extends React.Component { } return ( - { - navigation.navigate('Rewards'); - }}> + - You have {unclaimedRewardAmount} LBC in unclaimed rewards. You have {this.state.actionsLeft} action{this.state.actionsLeft === 1 ? '' : 's'} left to claim your first reward. Tap here to continue. + You have {unclaimedRewardAmount} LBC in unclaimed rewards. LBC stands for LBRY Credits which are tokens that you can use in the digital marketplace. You have {this.state.actionsLeft} action{this.state.actionsLeft === 1 ? '' : 's'} left to claim your first reward.