fix: featured reward claim

This will fetch new rewards if LBRY is left open on the homepage. We refresh the featured URIs on an interval, but the reward list would not have the newly pushed LBRYCast reward available...so you would not be able to claim this until going to the rewards page.
This commit is contained in:
Thomas Zarebczan 2018-11-30 15:30:24 -05:00
parent 0c19b57b70
commit e4c48124d4
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,6 @@
import { connect } from 'react-redux';
import { selectFeaturedUris, selectFetchingFeaturedUris, doFetchFeaturedUris } from 'lbry-redux';
import { doFetchRewardedContent } from 'lbryinc';
import { doFetchRewardedContent, doRewardList } from 'lbryinc';
import DiscoverPage from './view';
const select = state => ({
@ -11,6 +11,7 @@ const select = state => ({
const perform = dispatch => ({
fetchFeaturedUris: () => dispatch(doFetchFeaturedUris()),
fetchRewardedContent: () => dispatch(doFetchRewardedContent()),
fetchRewards: () => dispatch(doRewardList()),
});
export default connect(

View file

@ -24,6 +24,7 @@ class DiscoverPage extends React.PureComponent<Props> {
this.continousFetch = setInterval(() => {
fetchFeaturedUris();
fetchRewardedContent();
fetchRewards();
}, 1000 * 60 * 60);
}