From c21bc3075ca3f8bb130893107c11215eb7d5f4d5 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 2 Jun 2020 10:32:11 -0400 Subject: [PATCH] fix build --- dist/bundle.es.js | 9 ++++++--- dist/bundle.js | 8 ++++++-- src/redux/actions/user.js | 8 +++++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index c41688c..a84d52a 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1294,13 +1294,16 @@ const selectYouTubeImportVideosComplete = reselect.createSelector(selectState$2, } }); -function doFetchInviteStatus() { +function doFetchInviteStatus(shouldCallRewardList = true) { return dispatch => { dispatch({ type: USER_INVITE_STATUS_FETCH_STARTED }); Promise.all([Lbryio.call('user', 'invite_status'), Lbryio.call('user_referral_code', 'list')]).then(([status, code]) => { - dispatch(doRewardList()); + if (shouldCallRewardList) { + dispatch(doRewardList()); + } + dispatch({ type: USER_INVITE_STATUS_FETCH_SUCCESS, data: { @@ -1380,7 +1383,7 @@ function doAuthenticate(appVersion, os = null, firebaseToken = null, shareUsageD if (shareUsageData) { dispatch(doRewardList()); - dispatch(doFetchInviteStatus()); + dispatch(doFetchInviteStatus(false)); if (callInstall) { doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData); diff --git a/dist/bundle.js b/dist/bundle.js index ef5a41a..4226ab5 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -4999,6 +4999,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function doFetchInviteStatus() { + var shouldCallRewardList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; return function (dispatch) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_INVITE_STATUS_FETCH_STARTED"] @@ -5008,7 +5009,10 @@ function doFetchInviteStatus() { status = _ref2[0], code = _ref2[1]; - dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])()); + if (shouldCallRewardList) { + dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])()); + } + dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_INVITE_STATUS_FETCH_SUCCESS"], data: { @@ -5097,7 +5101,7 @@ function doAuthenticate(appVersion) { if (shareUsageData) { dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])()); - dispatch(doFetchInviteStatus()); + dispatch(doFetchInviteStatus(false)); if (callInstall) { doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData); diff --git a/src/redux/actions/user.js b/src/redux/actions/user.js index 03e2dfa..f14957a 100644 --- a/src/redux/actions/user.js +++ b/src/redux/actions/user.js @@ -17,7 +17,7 @@ import { import rewards from 'rewards'; import Lbryio from 'lbryio'; -export function doFetchInviteStatus() { +export function doFetchInviteStatus(shouldCallRewardList = true) { return dispatch => { dispatch({ type: ACTIONS.USER_INVITE_STATUS_FETCH_STARTED, @@ -25,7 +25,9 @@ export function doFetchInviteStatus() { Promise.all([Lbryio.call('user', 'invite_status'), Lbryio.call('user_referral_code', 'list')]) .then(([status, code]) => { - dispatch(doRewardList()); + if (shouldCallRewardList) { + dispatch(doRewardList()); + } dispatch({ type: ACTIONS.USER_INVITE_STATUS_FETCH_SUCCESS, @@ -121,7 +123,7 @@ export function doAuthenticate( if (shareUsageData) { dispatch(doRewardList()); - dispatch(doFetchInviteStatus()); + dispatch(doFetchInviteStatus(false)); if (callInstall) { doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData); }