From 81dd94572dbb2d0e0820b5711849e5d8f117c3b7 Mon Sep 17 00:00:00 2001 From: jessop Date: Wed, 8 Jan 2020 16:58:07 -0500 Subject: [PATCH 1/4] new referrals provides referral code setting referrers claim referee reward fixes accessToken state --- dist/bundle.es.js | 89 +++++++++++++++++++++++---- dist/bundle.js | 109 ++++++++++++++++++++++++++++++---- src/constants/action_types.js | 3 + src/index.js | 4 ++ src/redux/actions/user.js | 44 ++++++++++++-- src/redux/reducers/user.js | 28 ++++++++- src/redux/selectors/user.js | 12 ++++ src/rewards.js | 1 + 8 files changed, 264 insertions(+), 26 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index ad80dc2..57a67a4 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -49,7 +49,10 @@ const USER_INVITE_NEW_FAILURE = 'USER_INVITE_NEW_FAILURE'; const FETCH_ACCESS_TOKEN_SUCCESS = 'FETCH_ACCESS_TOKEN_SUCCESS'; const USER_YOUTUBE_IMPORT_STARTED = 'USER_YOUTUBE_IMPORT_STARTED'; const USER_YOUTUBE_IMPORT_FAILURE = 'USER_YOUTUBE_IMPORT_FAILURE'; -const USER_YOUTUBE_IMPORT_SUCCESS = 'USER_YOUTUBE_IMPORT_SUCCESS'; // Claims +const USER_YOUTUBE_IMPORT_SUCCESS = 'USER_YOUTUBE_IMPORT_SUCCESS'; +const USER_SET_REFERRER_STARTED = 'USER_SET_REFERRER_STARTED'; +const USER_SET_REFERRER_SUCCESS = 'USER_SET_REFERRER_SUCCESS'; +const USER_SET_REFERRER_FAILURE = 'USER_SET_REFERRER_FAILURE'; // Claims const FETCH_FEATURED_CONTENT_STARTED = 'FETCH_FEATURED_CONTENT_STARTED'; const FETCH_FEATURED_CONTENT_COMPLETED = 'FETCH_FEATURED_CONTENT_COMPLETED'; @@ -176,6 +179,9 @@ var action_types = /*#__PURE__*/Object.freeze({ USER_YOUTUBE_IMPORT_STARTED: USER_YOUTUBE_IMPORT_STARTED, USER_YOUTUBE_IMPORT_FAILURE: USER_YOUTUBE_IMPORT_FAILURE, USER_YOUTUBE_IMPORT_SUCCESS: USER_YOUTUBE_IMPORT_SUCCESS, + USER_SET_REFERRER_STARTED: USER_SET_REFERRER_STARTED, + USER_SET_REFERRER_SUCCESS: USER_SET_REFERRER_SUCCESS, + USER_SET_REFERRER_FAILURE: USER_SET_REFERRER_FAILURE, FETCH_FEATURED_CONTENT_STARTED: FETCH_FEATURED_CONTENT_STARTED, FETCH_FEATURED_CONTENT_COMPLETED: FETCH_FEATURED_CONTENT_COMPLETED, FETCH_TRENDING_CONTENT_STARTED: FETCH_TRENDING_CONTENT_STARTED, @@ -485,6 +491,7 @@ rewards.TYPE_FIRST_STREAM = 'first_stream'; rewards.TYPE_MANY_DOWNLOADS = 'many_downloads'; rewards.TYPE_FIRST_PUBLISH = 'first_publish'; rewards.TYPE_REFERRAL = 'referral'; +rewards.TYPE_REFEREE = 'referee'; rewards.TYPE_REWARD_CODE = 'reward_code'; rewards.TYPE_SUBSCRIPTION = 'subscription'; rewards.YOUTUBE_CREATOR = 'youtube_creator'; @@ -1214,8 +1221,11 @@ const selectUserInviteStatusFailed = reselect.createSelector(selectUserInvitesRe const selectUserInviteNewIsPending = reselect.createSelector(selectState$2, state => state.inviteNewIsPending); const selectUserInviteNewErrorMessage = reselect.createSelector(selectState$2, state => state.inviteNewErrorMessage); const selectUserInviteReferralLink = reselect.createSelector(selectState$2, state => state.referralLink); +const selectUserInviteReferralCode = reselect.createSelector(selectState$2, state => state.referralCode); const selectYouTubeImportPending = reselect.createSelector(selectState$2, state => state.youtubeChannelImportPending); const selectYouTubeImportError = reselect.createSelector(selectState$2, state => state.youtubeChannelImportErrorMessage); +const selectSetReferrerPending = reselect.createSelector(selectState$2, state => state.setReferrerIsPending); +const selectSetReferrerError = reselect.createSelector(selectState$2, state => state.setReferrerError); const selectYouTubeImportVideosComplete = reselect.createSelector(selectState$2, state => { const total = state.youtubeChannelImportTotal; const complete = state.youtubeChannelImportComplete || 0; @@ -1237,7 +1247,8 @@ function doFetchInviteStatus() { data: { invitesRemaining: status.invites_remaining ? status.invites_remaining : 0, invitees: status.invitees, - referralLink: `${Lbryio.CONNECTION_STRING}user/refer?r=${code}` + referralLink: `${Lbryio.CONNECTION_STRING}user/refer?r=${code}`, + referralCode: code } }); }).catch(error => { @@ -1276,12 +1287,12 @@ function doAuthenticate(appVersion, os = null, firebaseToken = null) { dispatch({ type: AUTHENTICATION_STARTED }); - Lbryio.authenticate().then(user => { + Lbryio.authenticate().then(accessToken => { // analytics.setUser(user); dispatch({ type: AUTHENTICATION_SUCCESS, data: { - user + accessToken } }); dispatch(doRewardList()); @@ -1574,9 +1585,9 @@ function doUserInviteNew(email) { dispatch({ type: USER_INVITE_NEW_STARTED }); - Lbryio.call('user', 'invite', { + return Lbryio.call('user', 'invite', { email - }, 'post').then(() => { + }, 'post').then(success => { dispatch({ type: USER_INVITE_NEW_SUCCESS, data: { @@ -1587,6 +1598,7 @@ function doUserInviteNew(email) { message: __(`Invite sent to ${email}`) })); dispatch(doFetchInviteStatus()); + return success; }).catch(error => { dispatch({ type: USER_INVITE_NEW_FAILURE, @@ -1597,6 +1609,38 @@ function doUserInviteNew(email) { }); }; } +function doUserSetReferrer(referrer, shouldClaim) { + return dispatch => { + dispatch({ + type: USER_SET_REFERRER_STARTED + }); + return Lbryio.call('user', 'referral', { + referrer + }, 'post').then(() => { + dispatch({ + type: USER_SET_REFERRER_SUCCESS + }); // for testing + + dispatch(lbryRedux.doToast({ + message: __(`Set Referrer to ${referrer}`) + })); // we need to userFetch because once you claim this, + + if (shouldClaim) { + dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); + dispatch(doUserFetch()); + } else { + dispatch(doUserFetch()); + } + }).catch(error => { + dispatch({ + type: USER_SET_REFERRER_FAILURE, + data: { + error + } + }); + }); + }; +} function doClaimYoutubeChannels() { return dispatch => { dispatch({ @@ -2879,21 +2923,26 @@ const defaultState$3 = { inviteStatusIsPending: false, invitesRemaining: undefined, invitees: undefined, + referralLink: undefined, + referralCode: undefined, user: undefined, + accessToken: undefined, youtubeChannelImportPending: false, - youtubeChannelImportErrorMessage: '' + youtubeChannelImportErrorMessage: '', + setReferrerIsPending: false, + setReferrerError: '' }; reducers$2[AUTHENTICATION_STARTED] = state => Object.assign({}, state, { authenticationIsPending: true, userIsPending: true, - user: defaultState$3.user + accessToken: defaultState$3.accessToken }); reducers$2[AUTHENTICATION_SUCCESS] = (state, action) => Object.assign({}, state, { authenticationIsPending: false, userIsPending: false, - user: action.data.user + accessToken: action.data.accessToken }); reducers$2[AUTHENTICATION_FAILURE] = state => Object.assign({}, state, { @@ -3039,7 +3088,8 @@ reducers$2[USER_INVITE_STATUS_FETCH_SUCCESS] = (state, action) => Object.assign( inviteStatusIsPending: false, invitesRemaining: action.data.invitesRemaining, invitees: action.data.invitees, - referralLink: action.data.referralLink + referralLink: action.data.referralLink, + referralCode: action.data.referralCode }); reducers$2[USER_INVITE_NEW_STARTED] = state => Object.assign({}, state, { @@ -3096,6 +3146,21 @@ reducers$2[USER_EMAIL_VERIFY_RETRY_FAILURE] = state => Object.assign({}, state, resendingVerificationEmail: false }); +reducers$2[USER_SET_REFERRER_STARTED] = state => Object.assign({}, state, { + setReferrerIsPending: true, + setReferrerError: defaultState$3.setReferrerError +}); + +reducers$2[USER_SET_REFERRER_SUCCESS] = state => Object.assign({}, state, { + setReferrerIsPending: false, + setReferrerError: defaultState$3.setReferrerError +}); + +reducers$2[USER_SET_REFERRER_FAILURE] = (state, action) => Object.assign({}, state, { + setReferrerIsPending: false, + setReferrerError: action.data.error.message +}); + function userReducer(state = defaultState$3, action) { const handler = reducers$2[action.type]; if (handler) return handler(state, action); @@ -3528,6 +3593,7 @@ exports.doUserPhoneReset = doUserPhoneReset; exports.doUserPhoneVerify = doUserPhoneVerify; exports.doUserPhoneVerifyFailure = doUserPhoneVerifyFailure; exports.doUserResendVerificationEmail = doUserResendVerificationEmail; +exports.doUserSetReferrer = doUserSetReferrer; exports.filteredReducer = filteredReducer; exports.homepageReducer = homepageReducer; exports.lbrytvReducer = lbrytvReducer; @@ -3586,6 +3652,8 @@ exports.selectPhoneVerifyIsPending = selectPhoneVerifyIsPending; exports.selectReferralReward = selectReferralReward; exports.selectResendingVerificationEmail = selectResendingVerificationEmail; exports.selectRewardContentClaimIds = selectRewardContentClaimIds; +exports.selectSetReferrerError = selectSetReferrerError; +exports.selectSetReferrerPending = selectSetReferrerPending; exports.selectSetSyncErrorMessage = selectSetSyncErrorMessage; exports.selectSetSyncIsPending = selectSetSyncIsPending; exports.selectShowSuggestedSubs = selectShowSuggestedSubs; @@ -3612,6 +3680,7 @@ exports.selectUserCountryCode = selectUserCountryCode; exports.selectUserEmail = selectUserEmail; exports.selectUserInviteNewErrorMessage = selectUserInviteNewErrorMessage; exports.selectUserInviteNewIsPending = selectUserInviteNewIsPending; +exports.selectUserInviteReferralCode = selectUserInviteReferralCode; exports.selectUserInviteReferralLink = selectUserInviteReferralLink; exports.selectUserInviteStatusFailed = selectUserInviteStatusFailed; exports.selectUserInviteStatusIsPending = selectUserInviteStatusIsPending; diff --git a/dist/bundle.js b/dist/bundle.js index e49c150..66a0050 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -205,6 +205,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckYoutubeTransfer", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doCheckYoutubeTransfer"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserSetReferrer", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserSetReferrer"]; }); + /* harmony import */ var redux_actions_cost_info__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(29); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchCostInfoForUri", function() { return redux_actions_cost_info__WEBPACK_IMPORTED_MODULE_11__["doFetchCostInfoForUri"]; }); @@ -404,6 +406,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralLink", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteReferralLink"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralCode", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteReferralCode"]; }); + /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserVerifiedEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserVerifiedEmail"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYoutubeChannels", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectYoutubeChannels"]; }); @@ -414,6 +418,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportVideosComplete", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectYouTubeImportVideosComplete"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectSetReferrerPending"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerError", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectSetReferrerError"]; }); + /* harmony import */ var redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(47); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectFetchingCostInfoForUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__["makeSelectFetchingCostInfoForUri"]; }); @@ -568,6 +576,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_YOUTUBE_IMPORT_STARTED", function() { return USER_YOUTUBE_IMPORT_STARTED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_YOUTUBE_IMPORT_FAILURE", function() { return USER_YOUTUBE_IMPORT_FAILURE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_YOUTUBE_IMPORT_SUCCESS", function() { return USER_YOUTUBE_IMPORT_SUCCESS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_SET_REFERRER_STARTED", function() { return USER_SET_REFERRER_STARTED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_SET_REFERRER_SUCCESS", function() { return USER_SET_REFERRER_SUCCESS; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_SET_REFERRER_FAILURE", function() { return USER_SET_REFERRER_FAILURE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FETCH_FEATURED_CONTENT_STARTED", function() { return FETCH_FEATURED_CONTENT_STARTED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FETCH_FEATURED_CONTENT_COMPLETED", function() { return FETCH_FEATURED_CONTENT_COMPLETED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FETCH_TRENDING_CONTENT_STARTED", function() { return FETCH_TRENDING_CONTENT_STARTED; }); @@ -684,7 +695,10 @@ var USER_INVITE_NEW_FAILURE = 'USER_INVITE_NEW_FAILURE'; var FETCH_ACCESS_TOKEN_SUCCESS = 'FETCH_ACCESS_TOKEN_SUCCESS'; var USER_YOUTUBE_IMPORT_STARTED = 'USER_YOUTUBE_IMPORT_STARTED'; var USER_YOUTUBE_IMPORT_FAILURE = 'USER_YOUTUBE_IMPORT_FAILURE'; -var USER_YOUTUBE_IMPORT_SUCCESS = 'USER_YOUTUBE_IMPORT_SUCCESS'; // Claims +var USER_YOUTUBE_IMPORT_SUCCESS = 'USER_YOUTUBE_IMPORT_SUCCESS'; +var USER_SET_REFERRER_STARTED = 'USER_SET_REFERRER_STARTED'; +var USER_SET_REFERRER_SUCCESS = 'USER_SET_REFERRER_SUCCESS'; +var USER_SET_REFERRER_FAILURE = 'USER_SET_REFERRER_FAILURE'; // Claims var FETCH_FEATURED_CONTENT_STARTED = 'FETCH_FEATURED_CONTENT_STARTED'; var FETCH_FEATURED_CONTENT_COMPLETED = 'FETCH_FEATURED_CONTENT_COMPLETED'; @@ -1255,6 +1269,7 @@ rewards.TYPE_FIRST_STREAM = 'first_stream'; rewards.TYPE_MANY_DOWNLOADS = 'many_downloads'; rewards.TYPE_FIRST_PUBLISH = 'first_publish'; rewards.TYPE_REFERRAL = 'referral'; +rewards.TYPE_REFEREE = 'referee'; rewards.TYPE_REWARD_CODE = 'reward_code'; rewards.TYPE_SUBSCRIPTION = 'subscription'; rewards.YOUTUBE_CREATOR = 'youtube_creator'; @@ -4648,8 +4663,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteNewIsPending", function() { return selectUserInviteNewIsPending; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteNewErrorMessage", function() { return selectUserInviteNewErrorMessage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralLink", function() { return selectUserInviteReferralLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralCode", function() { return selectUserInviteReferralCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportPending", function() { return selectYouTubeImportPending; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportError", function() { return selectYouTubeImportError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerPending", function() { return selectSetReferrerPending; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerError", function() { return selectSetReferrerError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportVideosComplete", function() { return selectYouTubeImportVideosComplete; }); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); @@ -4753,12 +4771,21 @@ var selectUserInviteNewErrorMessage = Object(reselect__WEBPACK_IMPORTED_MODULE_0 var selectUserInviteReferralLink = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { return state.referralLink; }); +var selectUserInviteReferralCode = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { + return state.referralCode; +}); var selectYouTubeImportPending = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { return state.youtubeChannelImportPending; }); var selectYouTubeImportError = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { return state.youtubeChannelImportErrorMessage; }); +var selectSetReferrerPending = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { + return state.setReferrerIsPending; +}); +var selectSetReferrerError = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { + return state.setReferrerError; +}); var selectYouTubeImportVideosComplete = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { var total = state.youtubeChannelImportTotal; var complete = state.youtubeChannelImportComplete || 0; @@ -4791,6 +4818,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchAccessToken", function() { return doFetchAccessToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doUserIdentityVerify", function() { return doUserIdentityVerify; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doUserInviteNew", function() { return doUserInviteNew; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doUserSetReferrer", function() { return doUserSetReferrer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doClaimYoutubeChannels", function() { return doClaimYoutubeChannels; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doCheckYoutubeTransfer", function() { return doCheckYoutubeTransfer; }); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); @@ -4830,7 +4858,8 @@ function doFetchInviteStatus() { data: { invitesRemaining: status.invites_remaining ? status.invites_remaining : 0, invitees: status.invitees, - referralLink: "".concat(lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].CONNECTION_STRING, "user/refer?r=").concat(code) + referralLink: "".concat(lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].CONNECTION_STRING, "user/refer?r=").concat(code), + referralCode: code } }); })["catch"](function (error) { @@ -4873,12 +4902,12 @@ function doAuthenticate(appVersion) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"] }); - lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].authenticate().then(function (user) { + lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].authenticate().then(function (accessToken) { // analytics.setUser(user); dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_SUCCESS"], data: { - user: user + accessToken: accessToken } }); dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])()); @@ -5177,9 +5206,9 @@ function doUserInviteNew(email) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_INVITE_NEW_STARTED"] }); - lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('user', 'invite', { + return lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('user', 'invite', { email: email - }, 'post').then(function () { + }, 'post').then(function (success) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_INVITE_NEW_SUCCESS"], data: { @@ -5190,6 +5219,7 @@ function doUserInviteNew(email) { message: __("Invite sent to ".concat(email)) })); dispatch(doFetchInviteStatus()); + return success; })["catch"](function (error) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_INVITE_NEW_FAILURE"], @@ -5200,6 +5230,38 @@ function doUserInviteNew(email) { }); }; } +function doUserSetReferrer(referrer, shouldClaim) { + return function (dispatch) { + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_STARTED"] + }); + return lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('user', 'referral', { + referrer: referrer + }, 'post').then(function () { + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_SUCCESS"] + }); // for testing + + dispatch(Object(lbry_redux__WEBPACK_IMPORTED_MODULE_0__["doToast"])({ + message: __("Set Referrer to ".concat(referrer)) + })); // we need to userFetch because once you claim this, + + if (shouldClaim) { + dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doClaimRewardType"])(rewards__WEBPACK_IMPORTED_MODULE_4__["default"].TYPE_REFEREE)); + dispatch(doUserFetch()); + } else { + dispatch(doUserFetch()); + } + })["catch"](function (error) { + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_FAILURE"], + data: { + error: error + } + }); + }); + }; +} function doClaimYoutubeChannels() { return function (dispatch) { dispatch({ @@ -6629,16 +6691,21 @@ var defaultState = { inviteStatusIsPending: false, invitesRemaining: undefined, invitees: undefined, + referralLink: undefined, + referralCode: undefined, user: undefined, + accessToken: undefined, youtubeChannelImportPending: false, - youtubeChannelImportErrorMessage: '' + youtubeChannelImportErrorMessage: '', + setReferrerIsPending: false, + setReferrerError: '' }; reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["AUTHENTICATION_STARTED"]] = function (state) { return Object.assign({}, state, { authenticationIsPending: true, userIsPending: true, - user: defaultState.user + accessToken: defaultState.accessToken }); }; @@ -6646,7 +6713,7 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["AUTHENTICATION_SUC return Object.assign({}, state, { authenticationIsPending: false, userIsPending: false, - user: action.data.user + accessToken: action.data.accessToken }); }; @@ -6832,7 +6899,8 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_INVITE_STATUS inviteStatusIsPending: false, invitesRemaining: action.data.invitesRemaining, invitees: action.data.invitees, - referralLink: action.data.referralLink + referralLink: action.data.referralLink, + referralCode: action.data.referralCode }); }; @@ -6912,6 +6980,27 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_EMAIL_VERIFY_ }); }; +reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_SET_REFERRER_STARTED"]] = function (state) { + return Object.assign({}, state, { + setReferrerIsPending: true, + setReferrerError: defaultState.setReferrerError + }); +}; + +reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_SET_REFERRER_SUCCESS"]] = function (state) { + return Object.assign({}, state, { + setReferrerIsPending: false, + setReferrerError: defaultState.setReferrerError + }); +}; + +reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_SET_REFERRER_FAILURE"]] = function (state, action) { + return Object.assign({}, state, { + setReferrerIsPending: false, + setReferrerError: action.data.error.message + }); +}; + function userReducer() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; var action = arguments.length > 1 ? arguments[1] : undefined; diff --git a/src/constants/action_types.js b/src/constants/action_types.js index 45b759f..d2615ed 100644 --- a/src/constants/action_types.js +++ b/src/constants/action_types.js @@ -40,6 +40,9 @@ export const FETCH_ACCESS_TOKEN_SUCCESS = 'FETCH_ACCESS_TOKEN_SUCCESS'; export const USER_YOUTUBE_IMPORT_STARTED = 'USER_YOUTUBE_IMPORT_STARTED'; export const USER_YOUTUBE_IMPORT_FAILURE = 'USER_YOUTUBE_IMPORT_FAILURE'; export const USER_YOUTUBE_IMPORT_SUCCESS = 'USER_YOUTUBE_IMPORT_SUCCESS'; +export const USER_SET_REFERRER_STARTED = 'USER_SET_REFERRER_STARTED'; +export const USER_SET_REFERRER_SUCCESS = 'USER_SET_REFERRER_SUCCESS'; +export const USER_SET_REFERRER_FAILURE = 'USER_SET_REFERRER_FAILURE'; // Claims export const FETCH_FEATURED_CONTENT_STARTED = 'FETCH_FEATURED_CONTENT_STARTED'; diff --git a/src/index.js b/src/index.js index 7c5509b..b4109bc 100644 --- a/src/index.js +++ b/src/index.js @@ -63,6 +63,7 @@ export { doUserInviteNew, doClaimYoutubeChannels, doCheckYoutubeTransfer, + doUserSetReferrer, } from 'redux/actions/user'; export { doFetchCostInfoForUri } from 'redux/actions/cost_info'; export { doBlackListedOutpointsSubscribe } from 'redux/actions/blacklist'; @@ -162,11 +163,14 @@ export { selectUserInviteNewIsPending, selectUserInviteNewErrorMessage, selectUserInviteReferralLink, + selectUserInviteReferralCode, selectUserVerifiedEmail, selectYoutubeChannels, selectYouTubeImportPending, selectYouTubeImportError, selectYouTubeImportVideosComplete, + selectSetReferrerPending, + selectSetReferrerError, } from 'redux/selectors/user'; export { makeSelectFetchingCostInfoForUri, diff --git a/src/redux/actions/user.js b/src/redux/actions/user.js index 5b5d7c8..6ce67a5 100644 --- a/src/redux/actions/user.js +++ b/src/redux/actions/user.js @@ -25,6 +25,7 @@ export function doFetchInviteStatus() { invitesRemaining: status.invites_remaining ? status.invites_remaining : 0, invitees: status.invitees, referralLink: `${Lbryio.CONNECTION_STRING}user/refer?r=${code}`, + referralCode: code, }, }); }) @@ -63,11 +64,11 @@ export function doAuthenticate(appVersion, os = null, firebaseToken = null) { }); Lbryio.authenticate() - .then(user => { + .then(accessToken => { // analytics.setUser(user); dispatch({ type: ACTIONS.AUTHENTICATION_SUCCESS, - data: { user }, + data: { accessToken }, }); dispatch(doRewardList()); dispatch(doFetchInviteStatus()); @@ -363,8 +364,8 @@ export function doUserInviteNew(email) { type: ACTIONS.USER_INVITE_NEW_STARTED, }); - Lbryio.call('user', 'invite', { email }, 'post') - .then(() => { + return Lbryio.call('user', 'invite', { email }, 'post') + .then(success => { dispatch({ type: ACTIONS.USER_INVITE_NEW_SUCCESS, data: { email }, @@ -377,6 +378,7 @@ export function doUserInviteNew(email) { ); dispatch(doFetchInviteStatus()); + return success; }) .catch(error => { dispatch({ @@ -387,6 +389,40 @@ export function doUserInviteNew(email) { }; } +export function doUserSetReferrer(referrer, shouldClaim) { + return dispatch => { + dispatch({ + type: ACTIONS.USER_SET_REFERRER_STARTED, + }); + + return Lbryio.call('user', 'referral', { referrer }, 'post') + .then(() => { + dispatch({ + type: ACTIONS.USER_SET_REFERRER_SUCCESS, + }); + // for testing + dispatch( + doToast({ + message: __(`Set Referrer to ${referrer}`), + }) + ); + // we need to userFetch because once you claim this, + if (shouldClaim) { + dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); + dispatch(doUserFetch()); + } else { + dispatch(doUserFetch()); + } + }) + .catch(error => { + dispatch({ + type: ACTIONS.USER_SET_REFERRER_FAILURE, + data: { error }, + }); + }); + }; +} + export function doClaimYoutubeChannels() { return dispatch => { dispatch({ diff --git a/src/redux/reducers/user.js b/src/redux/reducers/user.js index 1de781a..2efd7d1 100644 --- a/src/redux/reducers/user.js +++ b/src/redux/reducers/user.js @@ -15,23 +15,28 @@ const defaultState = { inviteStatusIsPending: false, invitesRemaining: undefined, invitees: undefined, + referralLink: undefined, + referralCode: undefined, user: undefined, + accessToken: undefined, youtubeChannelImportPending: false, youtubeChannelImportErrorMessage: '', + setReferrerIsPending: false, + setReferrerError: '', }; reducers[ACTIONS.AUTHENTICATION_STARTED] = state => Object.assign({}, state, { authenticationIsPending: true, userIsPending: true, - user: defaultState.user, + accessToken: defaultState.accessToken, }); reducers[ACTIONS.AUTHENTICATION_SUCCESS] = (state, action) => Object.assign({}, state, { authenticationIsPending: false, userIsPending: false, - user: action.data.user, + accessToken: action.data.accessToken, }); reducers[ACTIONS.AUTHENTICATION_FAILURE] = state => @@ -198,6 +203,7 @@ reducers[ACTIONS.USER_INVITE_STATUS_FETCH_SUCCESS] = (state, action) => invitesRemaining: action.data.invitesRemaining, invitees: action.data.invitees, referralLink: action.data.referralLink, + referralCode: action.data.referralCode, }); reducers[ACTIONS.USER_INVITE_NEW_STARTED] = state => @@ -265,6 +271,24 @@ reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_FAILURE] = state => resendingVerificationEmail: false, }); +reducers[ACTIONS.USER_SET_REFERRER_STARTED] = state => + Object.assign({}, state, { + setReferrerIsPending: true, + setReferrerError: defaultState.setReferrerError, + }); + +reducers[ACTIONS.USER_SET_REFERRER_SUCCESS] = state => + Object.assign({}, state, { + setReferrerIsPending: false, + setReferrerError: defaultState.setReferrerError, + }); + +reducers[ACTIONS.USER_SET_REFERRER_FAILURE] = (state, action) => + Object.assign({}, state, { + setReferrerIsPending: false, + setReferrerError: action.data.error.message, + }); + export function userReducer(state = defaultState, action) { const handler = reducers[action.type]; if (handler) return handler(state, action); diff --git a/src/redux/selectors/user.js b/src/redux/selectors/user.js index 1857926..d6156c8 100644 --- a/src/redux/selectors/user.js +++ b/src/redux/selectors/user.js @@ -152,6 +152,11 @@ export const selectUserInviteReferralLink = createSelector( state => state.referralLink ); +export const selectUserInviteReferralCode = createSelector( + selectState, + state => state.referralCode +); + export const selectYouTubeImportPending = createSelector( selectState, state => state.youtubeChannelImportPending @@ -162,6 +167,13 @@ export const selectYouTubeImportError = createSelector( state => state.youtubeChannelImportErrorMessage ); +export const selectSetReferrerPending = createSelector( + selectState, + state => state.setReferrerIsPending +); + +export const selectSetReferrerError = createSelector(selectState, state => state.setReferrerError); + export const selectYouTubeImportVideosComplete = createSelector(selectState, state => { const total = state.youtubeChannelImportTotal; const complete = state.youtubeChannelImportComplete || 0; diff --git a/src/rewards.js b/src/rewards.js index 3da7418..e9deb92 100644 --- a/src/rewards.js +++ b/src/rewards.js @@ -11,6 +11,7 @@ rewards.TYPE_FIRST_STREAM = 'first_stream'; rewards.TYPE_MANY_DOWNLOADS = 'many_downloads'; rewards.TYPE_FIRST_PUBLISH = 'first_publish'; rewards.TYPE_REFERRAL = 'referral'; +rewards.TYPE_REFEREE = 'referee'; rewards.TYPE_REWARD_CODE = 'reward_code'; rewards.TYPE_SUBSCRIPTION = 'subscription'; rewards.YOUTUBE_CREATOR = 'youtube_creator'; From 54ca3fa8a7737305225c4e7ce41d688fbe6fe5e2 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 9 Jan 2020 22:28:46 -0500 Subject: [PATCH 2/4] referral improvements: resolve canonical urls before claiming some error handling bugfixes --- dist/bundle.es.js | 62 ++- dist/bundle.js | 807 ++++++++++++++++------------ src/constants/errors.js | 4 + src/index.js | 3 +- src/redux/actions/user.js | 73 ++- src/redux/reducers/subscriptions.js | 4 +- src/redux/selectors/user.js | 2 +- 7 files changed, 561 insertions(+), 394 deletions(-) create mode 100644 src/constants/errors.js diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 57a67a4..5067320 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -269,6 +269,14 @@ var youtube = /*#__PURE__*/Object.freeze({ COMPLETED_TRANSFER: COMPLETED_TRANSFER }); +const ALREADY_CLAIMED = 'once the invite reward has been claimed the referrer cannot be changed'; +const REFERRER_NOT_FOUND = 'A lbry.tv account could not be found for the referrer you provided.'; + +var errors = /*#__PURE__*/Object.freeze({ + ALREADY_CLAIMED: ALREADY_CLAIMED, + REFERRER_NOT_FOUND: REFERRER_NOT_FOUND +}); + const Lbryio = { enabled: true, authenticationPromise: null, @@ -624,7 +632,11 @@ var subscriptions = handleActions({ [CHANNEL_SUBSCRIBE]: (state, action) => { const newSubscription = action.data; const newSubscriptions = state.subscriptions.slice(); - newSubscriptions.unshift(newSubscription); + + if (!newSubscriptions.some(sub => sub.uri === newSubscription.uri)) { + newSubscriptions.unshift(newSubscription); + } + return { ...state, subscriptions: newSubscriptions }; @@ -1221,7 +1233,7 @@ const selectUserInviteStatusFailed = reselect.createSelector(selectUserInvitesRe const selectUserInviteNewIsPending = reselect.createSelector(selectState$2, state => state.inviteNewIsPending); const selectUserInviteNewErrorMessage = reselect.createSelector(selectState$2, state => state.inviteNewErrorMessage); const selectUserInviteReferralLink = reselect.createSelector(selectState$2, state => state.referralLink); -const selectUserInviteReferralCode = reselect.createSelector(selectState$2, state => state.referralCode); +const selectUserInviteReferralCode = reselect.createSelector(selectState$2, state => state.referralCode ? state.referralCode[0] : ''); const selectYouTubeImportPending = reselect.createSelector(selectState$2, state => state.youtubeChannelImportPending); const selectYouTubeImportError = reselect.createSelector(selectState$2, state => state.youtubeChannelImportErrorMessage); const selectSetReferrerPending = reselect.createSelector(selectState$2, state => state.setReferrerIsPending); @@ -1610,20 +1622,47 @@ function doUserInviteNew(email) { }; } function doUserSetReferrer(referrer, shouldClaim) { - return dispatch => { + return async (dispatch, getState) => { dispatch({ type: USER_SET_REFERRER_STARTED }); - return Lbryio.call('user', 'referral', { - referrer - }, 'post').then(() => { + let claim; + let referrerCode = referrer; + const isClaim = lbryRedux.parseURI(referrer).claimId; + + if (isClaim) { + const uri = `lbry://${referrer}`; + claim = lbryRedux.makeSelectClaimForUri(uri)(getState()); + + if (!claim) { + try { + const response = await lbryRedux.Lbry.resolve({ + urls: [uri] + }); + claim = response && response[uri]; + } catch (error) { + dispatch({ + type: USER_SET_REFERRER_FAILURE, + data: { + error + } + }); + } + } + + referrerCode = claim && claim.permanent_url.replace('lbry://', ''); + } + + try { + await Lbryio.call('user', 'referral', { + referrer: referrerCode + }, 'post'); dispatch({ type: USER_SET_REFERRER_SUCCESS - }); // for testing - + }); dispatch(lbryRedux.doToast({ message: __(`Set Referrer to ${referrer}`) - })); // we need to userFetch because once you claim this, + })); if (shouldClaim) { dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); @@ -1631,14 +1670,14 @@ function doUserSetReferrer(referrer, shouldClaim) { } else { dispatch(doUserFetch()); } - }).catch(error => { + } catch (error) { dispatch({ type: USER_SET_REFERRER_FAILURE, data: { error } }); - }); + } }; } function doClaimYoutubeChannels() { @@ -3531,6 +3570,7 @@ const selectState$a = state => state.lbrytv || {}; const selectCurrentUploads = reselect.createSelector(selectState$a, state => state.currentUploads); const selectUploadCount = reselect.createSelector(selectCurrentUploads, currentUploads => currentUploads && Object.keys(currentUploads).length); +exports.ERRORS = errors; exports.LBRYINC_ACTIONS = action_types; exports.Lbryio = Lbryio; exports.YOUTUBE_STATUSES = youtube; diff --git a/dist/bundle.js b/dist/bundle.js index 66a0050..2f693ee 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -7,7 +7,7 @@ var a = typeof exports === 'object' ? factory(require("lbry-redux")) : factory(root["lbry-redux"]); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } -})(window, function(__WEBPACK_EXTERNAL_MODULE__4__) { +})(window, function(__WEBPACK_EXTERNAL_MODULE__5__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -104,380 +104,383 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "LBRYINC_ACTIONS", function() { return constants_action_types__WEBPACK_IMPORTED_MODULE_0__; }); /* harmony import */ var constants_youtube__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); /* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "YOUTUBE_STATUSES", function() { return constants_youtube__WEBPACK_IMPORTED_MODULE_1__; }); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Lbryio", function() { return lbryio__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var constants_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3); +/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "ERRORS", function() { return constants_errors__WEBPACK_IMPORTED_MODULE_2__; }); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Lbryio", function() { return lbryio__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rewards", function() { return rewards__WEBPACK_IMPORTED_MODULE_3__["default"]; }); +/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rewards", function() { return rewards__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/* harmony import */ var redux_reducers_subscriptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscriptionsReducer", function() { return redux_reducers_subscriptions__WEBPACK_IMPORTED_MODULE_4__["default"]; }); +/* harmony import */ var redux_reducers_subscriptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscriptionsReducer", function() { return redux_reducers_subscriptions__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/* harmony import */ var redux_middleware_sync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "userStateSyncMiddleware", function() { return redux_middleware_sync__WEBPACK_IMPORTED_MODULE_5__["userStateSyncMiddleware"]; }); +/* harmony import */ var redux_middleware_sync__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "userStateSyncMiddleware", function() { return redux_middleware_sync__WEBPACK_IMPORTED_MODULE_6__["userStateSyncMiddleware"]; }); -/* harmony import */ var util_transifex_upload__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(16); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doTransifexUpload", function() { return util_transifex_upload__WEBPACK_IMPORTED_MODULE_6__["doTransifexUpload"]; }); +/* harmony import */ var util_transifex_upload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(17); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doTransifexUpload", function() { return util_transifex_upload__WEBPACK_IMPORTED_MODULE_7__["doTransifexUpload"]; }); -/* harmony import */ var redux_actions_auth__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doGenerateAuthToken", function() { return redux_actions_auth__WEBPACK_IMPORTED_MODULE_7__["doGenerateAuthToken"]; }); +/* harmony import */ var redux_actions_auth__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doGenerateAuthToken", function() { return redux_actions_auth__WEBPACK_IMPORTED_MODULE_8__["doGenerateAuthToken"]; }); -/* harmony import */ var redux_actions_rewards__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doRewardList", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_8__["doRewardList"]; }); +/* harmony import */ var redux_actions_rewards__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(24); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doRewardList", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_9__["doRewardList"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimRewardType", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_8__["doClaimRewardType"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimRewardType", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_9__["doClaimRewardType"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimEligiblePurchaseRewards", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_8__["doClaimEligiblePurchaseRewards"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimEligiblePurchaseRewards", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_9__["doClaimEligiblePurchaseRewards"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimRewardClearError", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_8__["doClaimRewardClearError"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimRewardClearError", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_9__["doClaimRewardClearError"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchRewardedContent", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_8__["doFetchRewardedContent"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchRewardedContent", function() { return redux_actions_rewards__WEBPACK_IMPORTED_MODULE_9__["doFetchRewardedContent"]; }); -/* harmony import */ var redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscribe", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doChannelSubscribe"]; }); +/* harmony import */ var redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscribe", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doChannelSubscribe"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelUnsubscribe", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doChannelUnsubscribe"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelUnsubscribe", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doChannelUnsubscribe"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscriptionEnableNotifications", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doChannelSubscriptionEnableNotifications"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscriptionEnableNotifications", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doChannelSubscriptionEnableNotifications"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscriptionDisableNotifications", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doChannelSubscriptionDisableNotifications"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscriptionDisableNotifications", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doChannelSubscriptionDisableNotifications"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSubscription", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doCheckSubscription"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSubscription", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doCheckSubscription"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doCheckSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doCheckSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSubscriptionsInit", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doCheckSubscriptionsInit"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSubscriptionsInit", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doCheckSubscriptionsInit"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCompleteFirstRun", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doCompleteFirstRun"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCompleteFirstRun", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doCompleteFirstRun"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchMySubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doFetchMySubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchMySubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doFetchMySubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchRecommendedSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doFetchRecommendedSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchRecommendedSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doFetchRecommendedSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doRemoveUnreadSubscription", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doRemoveUnreadSubscription"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doRemoveUnreadSubscription", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doRemoveUnreadSubscription"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doRemoveUnreadSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doRemoveUnreadSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doRemoveUnreadSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doRemoveUnreadSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSetViewMode", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doSetViewMode"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSetViewMode", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doSetViewMode"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doShowSuggestedSubs", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doShowSuggestedSubs"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doShowSuggestedSubs", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doShowSuggestedSubs"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUpdateUnreadSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["doUpdateUnreadSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUpdateUnreadSubscriptions", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["doUpdateUnreadSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setSubscriptionLatest", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_9__["setSubscriptionLatest"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setSubscriptionLatest", function() { return redux_actions_subscriptions__WEBPACK_IMPORTED_MODULE_10__["setSubscriptionLatest"]; }); -/* harmony import */ var redux_actions_user__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(26); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchInviteStatus", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doFetchInviteStatus"]; }); +/* harmony import */ var redux_actions_user__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(27); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchInviteStatus", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doFetchInviteStatus"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doInstallNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doInstallNew"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doInstallNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doInstallNew"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doAuthenticate", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doAuthenticate"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doAuthenticate", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doAuthenticate"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserFetch", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserFetch"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserFetch", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserFetch"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserEmailNew"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserEmailNew"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserCheckEmailVerified", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserCheckEmailVerified"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserCheckEmailVerified", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserCheckEmailVerified"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailToVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserEmailToVerify"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailToVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserEmailToVerify"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailVerifyFailure", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserEmailVerifyFailure"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailVerifyFailure", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserEmailVerifyFailure"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserEmailVerify"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserEmailVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserEmailVerify"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserPhoneNew"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserPhoneNew"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneReset", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserPhoneReset"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneReset", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserPhoneReset"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneVerifyFailure", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserPhoneVerifyFailure"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneVerifyFailure", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserPhoneVerifyFailure"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserPhoneVerify"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserPhoneVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserPhoneVerify"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchAccessToken", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doFetchAccessToken"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchAccessToken", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doFetchAccessToken"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserResendVerificationEmail", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserResendVerificationEmail"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserResendVerificationEmail", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserResendVerificationEmail"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserIdentityVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserIdentityVerify"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserIdentityVerify", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserIdentityVerify"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserInviteNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserInviteNew"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserInviteNew", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserInviteNew"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimYoutubeChannels", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doClaimYoutubeChannels"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doClaimYoutubeChannels", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doClaimYoutubeChannels"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckYoutubeTransfer", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doCheckYoutubeTransfer"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckYoutubeTransfer", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doCheckYoutubeTransfer"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserSetReferrer", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_10__["doUserSetReferrer"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUserSetReferrer", function() { return redux_actions_user__WEBPACK_IMPORTED_MODULE_11__["doUserSetReferrer"]; }); -/* harmony import */ var redux_actions_cost_info__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(29); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchCostInfoForUri", function() { return redux_actions_cost_info__WEBPACK_IMPORTED_MODULE_11__["doFetchCostInfoForUri"]; }); +/* harmony import */ var redux_actions_cost_info__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchCostInfoForUri", function() { return redux_actions_cost_info__WEBPACK_IMPORTED_MODULE_12__["doFetchCostInfoForUri"]; }); -/* harmony import */ var redux_actions_blacklist__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doBlackListedOutpointsSubscribe", function() { return redux_actions_blacklist__WEBPACK_IMPORTED_MODULE_12__["doBlackListedOutpointsSubscribe"]; }); +/* harmony import */ var redux_actions_blacklist__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(31); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doBlackListedOutpointsSubscribe", function() { return redux_actions_blacklist__WEBPACK_IMPORTED_MODULE_13__["doBlackListedOutpointsSubscribe"]; }); -/* harmony import */ var redux_actions_filtered__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(31); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFilteredOutpointsSubscribe", function() { return redux_actions_filtered__WEBPACK_IMPORTED_MODULE_13__["doFilteredOutpointsSubscribe"]; }); +/* harmony import */ var redux_actions_filtered__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(32); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFilteredOutpointsSubscribe", function() { return redux_actions_filtered__WEBPACK_IMPORTED_MODULE_14__["doFilteredOutpointsSubscribe"]; }); -/* harmony import */ var redux_actions_homepage__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(32); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchFeaturedUris", function() { return redux_actions_homepage__WEBPACK_IMPORTED_MODULE_14__["doFetchFeaturedUris"]; }); +/* harmony import */ var redux_actions_homepage__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(33); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchFeaturedUris", function() { return redux_actions_homepage__WEBPACK_IMPORTED_MODULE_15__["doFetchFeaturedUris"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchTrendingUris", function() { return redux_actions_homepage__WEBPACK_IMPORTED_MODULE_14__["doFetchTrendingUris"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchTrendingUris", function() { return redux_actions_homepage__WEBPACK_IMPORTED_MODULE_15__["doFetchTrendingUris"]; }); -/* harmony import */ var redux_actions_stats__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(33); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchViewCount", function() { return redux_actions_stats__WEBPACK_IMPORTED_MODULE_15__["doFetchViewCount"]; }); +/* harmony import */ var redux_actions_stats__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(34); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchViewCount", function() { return redux_actions_stats__WEBPACK_IMPORTED_MODULE_16__["doFetchViewCount"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchSubCount", function() { return redux_actions_stats__WEBPACK_IMPORTED_MODULE_15__["doFetchSubCount"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doFetchSubCount", function() { return redux_actions_stats__WEBPACK_IMPORTED_MODULE_16__["doFetchSubCount"]; }); -/* harmony import */ var redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(34); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doCheckSync"]; }); +/* harmony import */ var redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(35); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doCheckSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doCheckSync"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doGetSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doGetSync"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doGetSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doGetSync"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSetSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doSetSync"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSetSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doSetSync"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSetDefaultAccount", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doSetDefaultAccount"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSetDefaultAccount", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doSetDefaultAccount"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSyncApply", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doSyncApply"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSyncApply", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doSyncApply"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doResetSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doResetSync"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doResetSync", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doResetSync"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSyncEncryptAndDecrypt", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_16__["doSyncEncryptAndDecrypt"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doSyncEncryptAndDecrypt", function() { return redux_actions_sync__WEBPACK_IMPORTED_MODULE_17__["doSyncEncryptAndDecrypt"]; }); -/* harmony import */ var redux_actions_lbrytv__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(35); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUpdateUploadProgress", function() { return redux_actions_lbrytv__WEBPACK_IMPORTED_MODULE_17__["doUpdateUploadProgress"]; }); +/* harmony import */ var redux_actions_lbrytv__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(36); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "doUpdateUploadProgress", function() { return redux_actions_lbrytv__WEBPACK_IMPORTED_MODULE_18__["doUpdateUploadProgress"]; }); -/* harmony import */ var redux_reducers_auth__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(36); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "authReducer", function() { return redux_reducers_auth__WEBPACK_IMPORTED_MODULE_18__["authReducer"]; }); +/* harmony import */ var redux_reducers_auth__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(37); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "authReducer", function() { return redux_reducers_auth__WEBPACK_IMPORTED_MODULE_19__["authReducer"]; }); -/* harmony import */ var redux_reducers_rewards__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(37); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rewardsReducer", function() { return redux_reducers_rewards__WEBPACK_IMPORTED_MODULE_19__["rewardsReducer"]; }); +/* harmony import */ var redux_reducers_rewards__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(38); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rewardsReducer", function() { return redux_reducers_rewards__WEBPACK_IMPORTED_MODULE_20__["rewardsReducer"]; }); -/* harmony import */ var redux_reducers_user__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(38); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "userReducer", function() { return redux_reducers_user__WEBPACK_IMPORTED_MODULE_20__["userReducer"]; }); +/* harmony import */ var redux_reducers_user__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(39); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "userReducer", function() { return redux_reducers_user__WEBPACK_IMPORTED_MODULE_21__["userReducer"]; }); -/* harmony import */ var redux_reducers_cost_info__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(39); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "costInfoReducer", function() { return redux_reducers_cost_info__WEBPACK_IMPORTED_MODULE_21__["costInfoReducer"]; }); +/* harmony import */ var redux_reducers_cost_info__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(40); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "costInfoReducer", function() { return redux_reducers_cost_info__WEBPACK_IMPORTED_MODULE_22__["costInfoReducer"]; }); -/* harmony import */ var redux_reducers_blacklist__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(40); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blacklistReducer", function() { return redux_reducers_blacklist__WEBPACK_IMPORTED_MODULE_22__["blacklistReducer"]; }); +/* harmony import */ var redux_reducers_blacklist__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(41); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blacklistReducer", function() { return redux_reducers_blacklist__WEBPACK_IMPORTED_MODULE_23__["blacklistReducer"]; }); -/* harmony import */ var redux_reducers_filtered__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(41); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filteredReducer", function() { return redux_reducers_filtered__WEBPACK_IMPORTED_MODULE_23__["filteredReducer"]; }); +/* harmony import */ var redux_reducers_filtered__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(42); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filteredReducer", function() { return redux_reducers_filtered__WEBPACK_IMPORTED_MODULE_24__["filteredReducer"]; }); -/* harmony import */ var redux_reducers_homepage__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(42); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "homepageReducer", function() { return redux_reducers_homepage__WEBPACK_IMPORTED_MODULE_24__["homepageReducer"]; }); +/* harmony import */ var redux_reducers_homepage__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(43); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "homepageReducer", function() { return redux_reducers_homepage__WEBPACK_IMPORTED_MODULE_25__["homepageReducer"]; }); -/* harmony import */ var redux_reducers_stats__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(43); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "statsReducer", function() { return redux_reducers_stats__WEBPACK_IMPORTED_MODULE_25__["statsReducer"]; }); +/* harmony import */ var redux_reducers_stats__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(44); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "statsReducer", function() { return redux_reducers_stats__WEBPACK_IMPORTED_MODULE_26__["statsReducer"]; }); -/* harmony import */ var redux_reducers_sync__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(44); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "syncReducer", function() { return redux_reducers_sync__WEBPACK_IMPORTED_MODULE_26__["syncReducer"]; }); +/* harmony import */ var redux_reducers_sync__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(45); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "syncReducer", function() { return redux_reducers_sync__WEBPACK_IMPORTED_MODULE_27__["syncReducer"]; }); -/* harmony import */ var redux_reducers_lbrytv__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(45); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lbrytvReducer", function() { return redux_reducers_lbrytv__WEBPACK_IMPORTED_MODULE_27__["lbrytvReducer"]; }); +/* harmony import */ var redux_reducers_lbrytv__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(46); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lbrytvReducer", function() { return redux_reducers_lbrytv__WEBPACK_IMPORTED_MODULE_28__["lbrytvReducer"]; }); -/* harmony import */ var redux_selectors_auth__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(46); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAuthToken", function() { return redux_selectors_auth__WEBPACK_IMPORTED_MODULE_28__["selectAuthToken"]; }); +/* harmony import */ var redux_selectors_auth__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(47); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAuthToken", function() { return redux_selectors_auth__WEBPACK_IMPORTED_MODULE_29__["selectAuthToken"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIsAuthenticating", function() { return redux_selectors_auth__WEBPACK_IMPORTED_MODULE_28__["selectIsAuthenticating"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIsAuthenticating", function() { return redux_selectors_auth__WEBPACK_IMPORTED_MODULE_29__["selectIsAuthenticating"]; }); -/* harmony import */ var redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(24); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectClaimRewardError", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["makeSelectClaimRewardError"]; }); +/* harmony import */ var redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(25); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectClaimRewardError", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["makeSelectClaimRewardError"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsRewardClaimPending", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["makeSelectIsRewardClaimPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsRewardClaimPending", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["makeSelectIsRewardClaimPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectRewardAmountByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["makeSelectRewardAmountByType"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectRewardAmountByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["makeSelectRewardAmountByType"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectRewardByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["makeSelectRewardByType"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectRewardByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["makeSelectRewardByType"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnclaimedRewardsByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectUnclaimedRewardsByType"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnclaimedRewardsByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectUnclaimedRewardsByType"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimedRewardsById", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectClaimedRewardsById"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimedRewardsById", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectClaimedRewardsById"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimedRewards", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectClaimedRewards"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimedRewards", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectClaimedRewards"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimedRewardsByTransactionId", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectClaimedRewardsByTransactionId"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimedRewardsByTransactionId", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectClaimedRewardsByTransactionId"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnclaimedRewards", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectUnclaimedRewards"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnclaimedRewards", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectUnclaimedRewards"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingRewards", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectFetchingRewards"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingRewards", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectFetchingRewards"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnclaimedRewardValue", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectUnclaimedRewardValue"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnclaimedRewardValue", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectUnclaimedRewardValue"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimsPendingByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectClaimsPendingByType"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimsPendingByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectClaimsPendingByType"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimErrorsByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectClaimErrorsByType"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectClaimErrorsByType", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectClaimErrorsByType"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectRewardContentClaimIds", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectRewardContentClaimIds"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectRewardContentClaimIds", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectRewardContentClaimIds"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectReferralReward", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_29__["selectReferralReward"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectReferralReward", function() { return redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_30__["selectReferralReward"]; }); -/* harmony import */ var redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(13); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsNew", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["makeSelectIsNew"]; }); +/* harmony import */ var redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(14); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsNew", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["makeSelectIsNew"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsSubscribed", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["makeSelectIsSubscribed"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsSubscribed", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["makeSelectIsSubscribed"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectUnreadByChannel", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["makeSelectUnreadByChannel"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectUnreadByChannel", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["makeSelectUnreadByChannel"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEnabledChannelNotifications", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectEnabledChannelNotifications"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEnabledChannelNotifications", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectEnabledChannelNotifications"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSubscriptions", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSubscriptions", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIsFetchingSubscriptions", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectIsFetchingSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIsFetchingSubscriptions", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectIsFetchingSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectViewMode", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectViewMode"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectViewMode", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectViewMode"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSuggested", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectSuggested"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSuggested", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectSuggested"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIsFetchingSuggested", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectIsFetchingSuggested"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIsFetchingSuggested", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectIsFetchingSuggested"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSuggestedChannels", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectSuggestedChannels"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSuggestedChannels", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectSuggestedChannels"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFirstRunCompleted", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectFirstRunCompleted"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFirstRunCompleted", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectFirstRunCompleted"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectShowSuggestedSubs", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectShowSuggestedSubs"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectShowSuggestedSubs", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectShowSuggestedSubs"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSubscriptionsBeingFetched", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectSubscriptionsBeingFetched"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSubscriptionsBeingFetched", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectSubscriptionsBeingFetched"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnreadByChannel", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectUnreadByChannel"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnreadByChannel", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectUnreadByChannel"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnreadAmount", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectUnreadAmount"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnreadAmount", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectUnreadAmount"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnreadSubscriptions", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectUnreadSubscriptions"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUnreadSubscriptions", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectUnreadSubscriptions"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSubscriptionClaims", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_30__["selectSubscriptionClaims"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSubscriptionClaims", function() { return redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_31__["selectSubscriptionClaims"]; }); -/* harmony import */ var redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(25); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAuthenticationIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectAuthenticationIsPending"]; }); +/* harmony import */ var redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(26); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAuthenticationIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectAuthenticationIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUser", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUser"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUser", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUser"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserEmail"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserEmail"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserPhone", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserPhone"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserPhone", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserPhone"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserCountryCode", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserCountryCode"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserCountryCode", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserCountryCode"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailToVerify", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectEmailToVerify"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailToVerify", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectEmailToVerify"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneToVerify", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectPhoneToVerify"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneToVerify", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectPhoneToVerify"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserIsRewardApproved", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserIsRewardApproved"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserIsRewardApproved", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserIsRewardApproved"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailNewIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectEmailNewIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailNewIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectEmailNewIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailNewErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectEmailNewErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailNewErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectEmailNewErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneNewErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectPhoneNewErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneNewErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectPhoneNewErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneNewIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectPhoneNewIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneNewIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectPhoneNewIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailVerifyIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectEmailVerifyIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailVerifyIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectEmailVerifyIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailVerifyErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectEmailVerifyErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailVerifyErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectEmailVerifyErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailAlreadyExists", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectEmailAlreadyExists"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectEmailAlreadyExists", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectEmailAlreadyExists"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectResendingVerificationEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectResendingVerificationEmail"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectResendingVerificationEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectResendingVerificationEmail"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneVerifyErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectPhoneVerifyErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneVerifyErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectPhoneVerifyErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneVerifyIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectPhoneVerifyIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectPhoneVerifyIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectPhoneVerifyIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIdentityVerifyIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectIdentityVerifyIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIdentityVerifyIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectIdentityVerifyIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIdentityVerifyErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectIdentityVerifyErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectIdentityVerifyErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectIdentityVerifyErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserIsVerificationCandidate", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserIsVerificationCandidate"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserIsVerificationCandidate", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserIsVerificationCandidate"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAccessToken", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectAccessToken"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAccessToken", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectAccessToken"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteStatusIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteStatusIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteStatusIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInviteStatusIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInvitesRemaining", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInvitesRemaining"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInvitesRemaining", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInvitesRemaining"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInvitees", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInvitees"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInvitees", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInvitees"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteStatusFailed", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteStatusFailed"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteStatusFailed", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInviteStatusFailed"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteNewIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteNewIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteNewIsPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInviteNewIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteNewErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteNewErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteNewErrorMessage", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInviteNewErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralLink", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteReferralLink"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralLink", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInviteReferralLink"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralCode", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserInviteReferralCode"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserInviteReferralCode", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserInviteReferralCode"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserVerifiedEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectUserVerifiedEmail"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserVerifiedEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectUserVerifiedEmail"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYoutubeChannels", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectYoutubeChannels"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYoutubeChannels", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectYoutubeChannels"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectYouTubeImportPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectYouTubeImportPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportError", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectYouTubeImportError"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportError", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectYouTubeImportError"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportVideosComplete", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectYouTubeImportVideosComplete"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportVideosComplete", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectYouTubeImportVideosComplete"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectSetReferrerPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerPending", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectSetReferrerPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerError", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_31__["selectSetReferrerError"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerError", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_32__["selectSetReferrerError"]; }); -/* harmony import */ var redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(47); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectFetchingCostInfoForUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__["makeSelectFetchingCostInfoForUri"]; }); +/* harmony import */ var redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(48); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectFetchingCostInfoForUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_33__["makeSelectFetchingCostInfoForUri"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectCostInfoForUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__["makeSelectCostInfoForUri"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectCostInfoForUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_33__["makeSelectCostInfoForUri"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAllCostInfoByUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__["selectAllCostInfoByUri"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAllCostInfoByUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_33__["selectAllCostInfoByUri"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingCostInfo", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_32__["selectFetchingCostInfo"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingCostInfo", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_33__["selectFetchingCostInfo"]; }); -/* harmony import */ var redux_selectors_blacklist__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(48); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectBlackListedOutpoints", function() { return redux_selectors_blacklist__WEBPACK_IMPORTED_MODULE_33__["selectBlackListedOutpoints"]; }); +/* harmony import */ var redux_selectors_blacklist__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(49); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectBlackListedOutpoints", function() { return redux_selectors_blacklist__WEBPACK_IMPORTED_MODULE_34__["selectBlackListedOutpoints"]; }); -/* harmony import */ var redux_selectors_filtered__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(49); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFilteredOutpoints", function() { return redux_selectors_filtered__WEBPACK_IMPORTED_MODULE_34__["selectFilteredOutpoints"]; }); +/* harmony import */ var redux_selectors_filtered__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(50); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFilteredOutpoints", function() { return redux_selectors_filtered__WEBPACK_IMPORTED_MODULE_35__["selectFilteredOutpoints"]; }); -/* harmony import */ var redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(50); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFeaturedUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_35__["selectFeaturedUris"]; }); +/* harmony import */ var redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(51); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFeaturedUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_36__["selectFeaturedUris"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingFeaturedUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_35__["selectFetchingFeaturedUris"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingFeaturedUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_36__["selectFetchingFeaturedUris"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectTrendingUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_35__["selectTrendingUris"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectTrendingUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_36__["selectTrendingUris"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingTrendingUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_35__["selectFetchingTrendingUris"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectFetchingTrendingUris", function() { return redux_selectors_homepage__WEBPACK_IMPORTED_MODULE_36__["selectFetchingTrendingUris"]; }); -/* harmony import */ var redux_selectors_stats__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(51); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectViewCountForUri", function() { return redux_selectors_stats__WEBPACK_IMPORTED_MODULE_36__["makeSelectViewCountForUri"]; }); +/* harmony import */ var redux_selectors_stats__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(52); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectViewCountForUri", function() { return redux_selectors_stats__WEBPACK_IMPORTED_MODULE_37__["makeSelectViewCountForUri"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectSubCountForUri", function() { return redux_selectors_stats__WEBPACK_IMPORTED_MODULE_36__["makeSelectSubCountForUri"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectSubCountForUri", function() { return redux_selectors_stats__WEBPACK_IMPORTED_MODULE_37__["makeSelectSubCountForUri"]; }); -/* harmony import */ var redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(52); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectHasSyncedWallet", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectHasSyncedWallet"]; }); +/* harmony import */ var redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(53); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectHasSyncedWallet", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectHasSyncedWallet"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncData", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSyncData"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncData", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSyncData"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncHash", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSyncHash"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncHash", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSyncHash"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncErrorMessage", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSetSyncErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncErrorMessage", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSetSyncErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectGetSyncErrorMessage", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectGetSyncErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectGetSyncErrorMessage", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectGetSyncErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectGetSyncIsPending", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectGetSyncIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectGetSyncIsPending", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectGetSyncIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncIsPending", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSetSyncIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncIsPending", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSetSyncIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyIsPending", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSyncApplyIsPending"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyIsPending", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSyncApplyIsPending"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectHashChanged", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectHashChanged"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectHashChanged", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectHashChanged"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyErrorMessage", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSyncApplyErrorMessage"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyErrorMessage", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSyncApplyErrorMessage"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyPasswordError", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_37__["selectSyncApplyPasswordError"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyPasswordError", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_38__["selectSyncApplyPasswordError"]; }); -/* harmony import */ var redux_selectors_lbrytv__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(53); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectCurrentUploads", function() { return redux_selectors_lbrytv__WEBPACK_IMPORTED_MODULE_38__["selectCurrentUploads"]; }); +/* harmony import */ var redux_selectors_lbrytv__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(54); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectCurrentUploads", function() { return redux_selectors_lbrytv__WEBPACK_IMPORTED_MODULE_39__["selectCurrentUploads"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUploadCount", function() { return redux_selectors_lbrytv__WEBPACK_IMPORTED_MODULE_39__["selectUploadCount"]; }); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUploadCount", function() { return redux_selectors_lbrytv__WEBPACK_IMPORTED_MODULE_38__["selectUploadCount"]; }); @@ -800,12 +803,23 @@ var COMPLETED_TRANSFER = 'completed_transfer'; /* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ALREADY_CLAIMED", function() { return ALREADY_CLAIMED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REFERRER_NOT_FOUND", function() { return REFERRER_NOT_FOUND; }); +var ALREADY_CLAIMED = 'once the invite reward has been claimed the referrer cannot be changed'; +var REFERRER_NOT_FOUND = 'A lbry.tv account could not be found for the referrer you provided.'; + +/***/ }), +/* 4 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); +/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6); /* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_2__); function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } @@ -1046,24 +1060,24 @@ Lbryio.setOverride = function (methodName, newMethod) { /* harmony default export */ __webpack_exports__["default"] = (Lbryio); /***/ }), -/* 4 */ +/* 5 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE__4__; +module.exports = __WEBPACK_EXTERNAL_MODULE__5__; /***/ }), -/* 5 */ +/* 6 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.decode = exports.parse = __webpack_require__(6); -exports.encode = exports.stringify = __webpack_require__(7); +exports.decode = exports.parse = __webpack_require__(7); +exports.encode = exports.stringify = __webpack_require__(8); /***/ }), -/* 6 */ +/* 7 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1154,7 +1168,7 @@ var isArray = Array.isArray || function (xs) { /***/ }), -/* 7 */ +/* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1246,14 +1260,14 @@ var objectKeys = Object.keys || function (obj) { /***/ }), -/* 8 */ +/* 9 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -1367,16 +1381,16 @@ rewards.setCallback = function (name, method) { /* harmony default export */ __webpack_exports__["default"] = (rewards); /***/ }), -/* 9 */ +/* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var constants_subscriptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10); -/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11); +/* harmony import */ var constants_subscriptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11); +/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12); var _handleActions; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } @@ -1402,7 +1416,13 @@ var defaultState = { /* harmony default export */ __webpack_exports__["default"] = (Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_3__["handleActions"])((_handleActions = {}, _defineProperty(_handleActions, constants_action_types__WEBPACK_IMPORTED_MODULE_0__["CHANNEL_SUBSCRIBE"], function (state, action) { var newSubscription = action.data; var newSubscriptions = state.subscriptions.slice(); - newSubscriptions.unshift(newSubscription); + + if (!newSubscriptions.some(function (sub) { + return sub.uri === newSubscription.uri; + })) { + newSubscriptions.unshift(newSubscription); + } + return _objectSpread({}, state, { subscriptions: newSubscriptions }); @@ -1558,7 +1578,7 @@ var defaultState = { }), _handleActions), defaultState)); /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -1583,7 +1603,7 @@ var SUGGESTED_TOP_SUBSCRIBED = 'top_subscribed'; var SUGGESTED_FEATURED = 'featured'; /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -1611,17 +1631,17 @@ var handleActions = function handleActions(actionMap, defaultState) { }; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "userStateSyncMiddleware", function() { return userStateSyncMiddleware; }); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1); -/* harmony import */ var redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13); +/* harmony import */ var redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -1695,7 +1715,7 @@ function userStateSyncMiddleware() { } /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -1717,12 +1737,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsSubscribed", function() { return makeSelectIsSubscribed; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectIsNew", function() { return makeSelectIsNew; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectEnabledChannelNotifications", function() { return selectEnabledChannelNotifications; }); -/* harmony import */ var constants_subscriptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14); +/* harmony import */ var constants_subscriptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var util_swap_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15); +/* harmony import */ var util_swap_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -1966,7 +1986,7 @@ var selectEnabledChannelNotifications = Object(reselect__WEBPACK_IMPORTED_MODULE }); /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2097,7 +2117,7 @@ function createStructuredSelector(selectors) { } /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2116,7 +2136,7 @@ function swapKeyAndValue(dict) { } /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -2195,10 +2215,10 @@ function doTransifexUpload(contents, project, token, success, fail) { }).then(handleResponse)["catch"](handleError); }); } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17).Buffer)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(18).Buffer)) /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2212,9 +2232,9 @@ function doTransifexUpload(contents, project, token, success, fail) { -var base64 = __webpack_require__(19) -var ieee754 = __webpack_require__(20) -var isArray = __webpack_require__(21) +var base64 = __webpack_require__(20) +var ieee754 = __webpack_require__(21) +var isArray = __webpack_require__(22) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -3992,10 +4012,10 @@ function isnan (val) { return val !== val // eslint-disable-line no-self-compare } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(18))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19))) /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports) { var g; @@ -4021,7 +4041,7 @@ module.exports = g; /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4179,7 +4199,7 @@ function fromByteArray (uint8) { /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports) { exports.read = function (buffer, offset, isLE, mLen, nBytes) { @@ -4269,7 +4289,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -4280,14 +4300,14 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 22 */ +/* 23 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doGenerateAuthToken", function() { return doGenerateAuthToken; }); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); function doGenerateAuthToken(installationId) { @@ -4321,7 +4341,7 @@ function doGenerateAuthToken(installationId) { } /***/ }), -/* 23 */ +/* 24 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4331,13 +4351,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doClaimEligiblePurchaseRewards", function() { return doClaimEligiblePurchaseRewards; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doClaimRewardClearError", function() { return doClaimRewardClearError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchRewardedContent", function() { return doFetchRewardedContent; }); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24); -/* harmony import */ var redux_selectors_user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25); -/* harmony import */ var redux_actions_user__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26); -/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8); +/* harmony import */ var redux_selectors_rewards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25); +/* harmony import */ var redux_selectors_user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26); +/* harmony import */ var redux_actions_user__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27); +/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9); @@ -4515,7 +4535,7 @@ function doFetchRewardedContent() { } /***/ }), -/* 24 */ +/* 25 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4535,9 +4555,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectRewardAmountByType", function() { return makeSelectRewardAmountByType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectRewardContentClaimIds", function() { return selectRewardContentClaimIds; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectReferralReward", function() { return selectReferralReward; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8); +/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); @@ -4625,7 +4645,7 @@ var selectReferralReward = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createS }); /***/ }), -/* 25 */ +/* 26 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4669,7 +4689,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerPending", function() { return selectSetReferrerPending; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetReferrerError", function() { return selectSetReferrerError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectYouTubeImportVideosComplete", function() { return selectYouTubeImportVideosComplete; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); var selectState = function selectState(state) { @@ -4772,7 +4792,7 @@ var selectUserInviteReferralLink = Object(reselect__WEBPACK_IMPORTED_MODULE_0__[ return state.referralLink; }); var selectUserInviteReferralCode = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { - return state.referralCode; + return state.referralCode ? state.referralCode[0] : ''; }); var selectYouTubeImportPending = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { return state.youtubeChannelImportPending; @@ -4796,7 +4816,7 @@ var selectYouTubeImportVideosComplete = Object(reselect__WEBPACK_IMPORTED_MODULE }); /***/ }), -/* 26 */ +/* 27 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -4821,13 +4841,17 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doUserSetReferrer", function() { return doUserSetReferrer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doClaimYoutubeChannels", function() { return doClaimYoutubeChannels; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doCheckYoutubeTransfer", function() { return doCheckYoutubeTransfer; }); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); -/* harmony import */ var redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23); -/* harmony import */ var redux_selectors_user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25); -/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3); +/* harmony import */ var redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24); +/* harmony import */ var redux_selectors_user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26); +/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4); +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } @@ -5231,36 +5255,109 @@ function doUserInviteNew(email) { }; } function doUserSetReferrer(referrer, shouldClaim) { - return function (dispatch) { - dispatch({ - type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_STARTED"] - }); - return lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('user', 'referral', { - referrer: referrer - }, 'post').then(function () { - dispatch({ - type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_SUCCESS"] - }); // for testing + return ( + /*#__PURE__*/ + function () { + var _ref3 = _asyncToGenerator( + /*#__PURE__*/ + regeneratorRuntime.mark(function _callee(dispatch, getState) { + var claim, referrerCode, isClaim, uri, response; + return regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_STARTED"] + }); + referrerCode = referrer; + isClaim = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_0__["parseURI"])(referrer).claimId; - dispatch(Object(lbry_redux__WEBPACK_IMPORTED_MODULE_0__["doToast"])({ - message: __("Set Referrer to ".concat(referrer)) - })); // we need to userFetch because once you claim this, + if (!isClaim) { + _context.next = 18; + break; + } - if (shouldClaim) { - dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doClaimRewardType"])(rewards__WEBPACK_IMPORTED_MODULE_4__["default"].TYPE_REFEREE)); - dispatch(doUserFetch()); - } else { - dispatch(doUserFetch()); - } - })["catch"](function (error) { - dispatch({ - type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_FAILURE"], - data: { - error: error - } - }); - }); - }; + uri = "lbry://".concat(referrer); + claim = Object(lbry_redux__WEBPACK_IMPORTED_MODULE_0__["makeSelectClaimForUri"])(uri)(getState()); + + if (claim) { + _context.next = 17; + break; + } + + _context.prev = 7; + _context.next = 10; + return lbry_redux__WEBPACK_IMPORTED_MODULE_0__["Lbry"].resolve({ + urls: [uri] + }); + + case 10: + response = _context.sent; + claim = response && response[uri]; + _context.next = 17; + break; + + case 14: + _context.prev = 14; + _context.t0 = _context["catch"](7); + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_FAILURE"], + data: { + error: _context.t0 + } + }); + + case 17: + referrerCode = claim && claim.permanent_url.replace('lbry://', ''); + + case 18: + _context.prev = 18; + _context.next = 21; + return lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('user', 'referral', { + referrer: referrerCode + }, 'post'); + + case 21: + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_SUCCESS"] + }); + dispatch(Object(lbry_redux__WEBPACK_IMPORTED_MODULE_0__["doToast"])({ + message: __("Set Referrer to ".concat(referrer)) + })); + + if (shouldClaim) { + dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doClaimRewardType"])(rewards__WEBPACK_IMPORTED_MODULE_4__["default"].TYPE_REFEREE)); + dispatch(doUserFetch()); + } else { + dispatch(doUserFetch()); + } + + _context.next = 29; + break; + + case 26: + _context.prev = 26; + _context.t1 = _context["catch"](18); + dispatch({ + type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_FAILURE"], + data: { + error: _context.t1 + } + }); + + case 29: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[7, 14], [18, 26]]); + })); + + return function (_x, _x2) { + return _ref3.apply(this, arguments); + }; + }() + ); } function doClaimYoutubeChannels() { return function (dispatch) { @@ -5333,7 +5430,7 @@ function doCheckYoutubeTransfer() { } /***/ }), -/* 27 */ +/* 28 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5354,15 +5451,15 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doShowSuggestedSubs", function() { return doShowSuggestedSubs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscriptionEnableNotifications", function() { return doChannelSubscriptionEnableNotifications; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doChannelSubscriptionDisableNotifications", function() { return doChannelSubscriptionDisableNotifications; }); -/* harmony import */ var constants_claim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); -/* harmony import */ var redux_actions_rewards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23); -/* harmony import */ var redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4); +/* harmony import */ var constants_claim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29); +/* harmony import */ var redux_actions_rewards__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24); +/* harmony import */ var redux_selectors_subscriptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1); -/* harmony import */ var constants_subscriptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3); -/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8); +/* harmony import */ var constants_subscriptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4); +/* harmony import */ var rewards__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } @@ -5786,7 +5883,7 @@ var doChannelSubscriptionDisableNotifications = function doChannelSubscriptionDi }; /***/ }), -/* 28 */ +/* 29 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5801,15 +5898,15 @@ var CHANNEL_NEW = 'new'; var PAGE_SIZE = 20; /***/ }), -/* 29 */ +/* 30 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchCostInfoForUri", function() { return doFetchCostInfoForUri; }); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_2__); @@ -5856,14 +5953,14 @@ function doFetchCostInfoForUri(uri) { } /***/ }), -/* 30 */ +/* 31 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchBlackListedOutpoints", function() { return doFetchBlackListedOutpoints; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doBlackListedOutpointsSubscribe", function() { return doBlackListedOutpointsSubscribe; }); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -5933,14 +6030,14 @@ function doBlackListedOutpointsSubscribe() { } /***/ }), -/* 31 */ +/* 32 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchFilteredOutpoints", function() { return doFetchFilteredOutpoints; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFilteredOutpointsSubscribe", function() { return doFilteredOutpointsSubscribe; }); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } @@ -6008,15 +6105,15 @@ function doFilteredOutpointsSubscribe() { } /***/ }), -/* 32 */ +/* 33 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchFeaturedUris", function() { return doFetchFeaturedUris; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchTrendingUris", function() { return doFetchTrendingUris; }); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } @@ -6104,14 +6201,14 @@ function doFetchTrendingUris() { } /***/ }), -/* 33 */ +/* 34 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchViewCount", function() { return doFetchViewCount; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doFetchSubCount", function() { return doFetchSubCount; }); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); @@ -6165,7 +6262,7 @@ var doFetchSubCount = function doFetchSubCount(claimId) { }; /***/ }), -/* 34 */ +/* 35 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6178,8 +6275,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doResetSync", function() { return doResetSync; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doSyncEncryptAndDecrypt", function() { return doSyncEncryptAndDecrypt; }); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); +/* harmony import */ var lbryio__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_2__); @@ -6474,7 +6571,7 @@ function doSyncEncryptAndDecrypt(oldPassword, newPassword, encrypt) { } /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6496,7 +6593,7 @@ var doUpdateUploadProgress = function doUpdateUploadProgress(progress, params, x }; /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6538,13 +6635,13 @@ function authReducer() { } /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rewardsReducer", function() { return rewardsReducer; }); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_0__); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } @@ -6669,7 +6766,7 @@ function rewardsReducer() { } /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7010,13 +7107,13 @@ function userReducer() { } /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "costInfoReducer", function() { return costInfoReducer; }); -/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); var _handleActions; @@ -7052,14 +7149,14 @@ var costInfoReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_0__["hand }), _handleActions), defaultState); /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blacklistReducer", function() { return blacklistReducer; }); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); var _handleActions; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } @@ -7098,14 +7195,14 @@ var blacklistReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_1__["han }), _handleActions), defaultState); /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filteredReducer", function() { return filteredReducer; }); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); var _handleActions; function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } @@ -7137,13 +7234,13 @@ var filteredReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_1__["hand }), _handleActions), defaultState); /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "homepageReducer", function() { return homepageReducer; }); -/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); var _handleActions; @@ -7190,13 +7287,13 @@ var homepageReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_0__["hand }), _handleActions), defaultState); /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "statsReducer", function() { return statsReducer; }); -/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var util_redux_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); /* harmony import */ var constants_action_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); var _handleActions; @@ -7255,7 +7352,7 @@ var statsReducer = Object(util_redux_utils__WEBPACK_IMPORTED_MODULE_0__["handleA }), _handleActions), defaultState); /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7367,7 +7464,7 @@ function syncReducer() { } /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7435,14 +7532,14 @@ function lbrytvReducer() { } /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectAuthToken", function() { return selectAuthToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectIsAuthenticating", function() { return selectIsAuthenticating; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); @@ -7458,7 +7555,7 @@ var selectIsAuthenticating = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["creat }); /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7468,7 +7565,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectCostInfoForUri", function() { return makeSelectCostInfoForUri; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectFetchingCostInfo", function() { return selectFetchingCostInfo; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectFetchingCostInfoForUri", function() { return makeSelectFetchingCostInfoForUri; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); var selectState = function selectState(state) { @@ -7492,14 +7589,14 @@ var makeSelectFetchingCostInfoForUri = function makeSelectFetchingCostInfoForUri }; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectState", function() { return selectState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectBlackListedOutpoints", function() { return selectBlackListedOutpoints; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); var selectState = function selectState(state) { @@ -7510,14 +7607,14 @@ var selectBlackListedOutpoints = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["c }); /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectState", function() { return selectState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectFilteredOutpoints", function() { return selectFilteredOutpoints; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); var selectState = function selectState(state) { @@ -7528,7 +7625,7 @@ var selectFilteredOutpoints = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["crea }); /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7537,7 +7634,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectFetchingFeaturedUris", function() { return selectFetchingFeaturedUris; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectTrendingUris", function() { return selectTrendingUris; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectFetchingTrendingUris", function() { return selectFetchingTrendingUris; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); @@ -7559,7 +7656,7 @@ var selectFetchingTrendingUris = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["c }); /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7568,9 +7665,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSubCount", function() { return selectSubCount; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectViewCountForUri", function() { return makeSelectViewCountForUri; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeSelectSubCountForUri", function() { return makeSelectSubCountForUri; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5); /* harmony import */ var lbry_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lbry_redux__WEBPACK_IMPORTED_MODULE_1__); @@ -7597,7 +7694,7 @@ var makeSelectSubCountForUri = function makeSelectSubCountForUri(uri) { }; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7613,7 +7710,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyIsPending", function() { return selectSyncApplyIsPending; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyErrorMessage", function() { return selectSyncApplyErrorMessage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSyncApplyPasswordError", function() { return selectSyncApplyPasswordError; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); @@ -7656,14 +7753,14 @@ var selectSyncApplyPasswordError = Object(reselect__WEBPACK_IMPORTED_MODULE_0__[ }); /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectCurrentUploads", function() { return selectCurrentUploads; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUploadCount", function() { return selectUploadCount; }); -/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(reselect__WEBPACK_IMPORTED_MODULE_0__); diff --git a/src/constants/errors.js b/src/constants/errors.js new file mode 100644 index 0000000..9044463 --- /dev/null +++ b/src/constants/errors.js @@ -0,0 +1,4 @@ +export const ALREADY_CLAIMED = + 'once the invite reward has been claimed the referrer cannot be changed'; +export const REFERRER_NOT_FOUND = + 'A lbry.tv account could not be found for the referrer you provided.'; diff --git a/src/index.js b/src/index.js index b4109bc..e0e2f4b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ import * as LBRYINC_ACTIONS from 'constants/action_types'; import * as YOUTUBE_STATUSES from 'constants/youtube'; +import * as ERRORS from 'constants/errors'; import Lbryio from 'lbryio'; import rewards from 'rewards'; import subscriptionsReducer from 'redux/reducers/subscriptions'; @@ -8,7 +9,7 @@ import subscriptionsReducer from 'redux/reducers/subscriptions'; export { userStateSyncMiddleware } from 'redux/middleware/sync'; // constants -export { LBRYINC_ACTIONS, YOUTUBE_STATUSES }; +export { LBRYINC_ACTIONS, YOUTUBE_STATUSES, ERRORS }; // Lbryio and rewards export { Lbryio, rewards }; diff --git a/src/redux/actions/user.js b/src/redux/actions/user.js index 6ce67a5..bd05743 100644 --- a/src/redux/actions/user.js +++ b/src/redux/actions/user.js @@ -1,4 +1,11 @@ -import { Lbry, doToast, doFetchChannelListMine, batchActions } from 'lbry-redux'; +import { + Lbry, + doToast, + doFetchChannelListMine, + batchActions, + makeSelectClaimForUri, + parseURI, +} from 'lbry-redux'; import * as ACTIONS from 'constants/action_types'; import { doClaimRewardType, doRewardList } from 'redux/actions/rewards'; import { @@ -390,36 +397,52 @@ export function doUserInviteNew(email) { } export function doUserSetReferrer(referrer, shouldClaim) { - return dispatch => { + return async (dispatch, getState) => { dispatch({ type: ACTIONS.USER_SET_REFERRER_STARTED, }); + let claim; + let referrerCode = referrer; - return Lbryio.call('user', 'referral', { referrer }, 'post') - .then(() => { - dispatch({ - type: ACTIONS.USER_SET_REFERRER_SUCCESS, - }); - // for testing - dispatch( - doToast({ - message: __(`Set Referrer to ${referrer}`), - }) - ); - // we need to userFetch because once you claim this, - if (shouldClaim) { - dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); - dispatch(doUserFetch()); - } else { - dispatch(doUserFetch()); + const isClaim = parseURI(referrer).claimId; + if (isClaim) { + const uri = `lbry://${referrer}`; + claim = makeSelectClaimForUri(uri)(getState()); + if (!claim) { + try { + const response = await Lbry.resolve({ urls: [uri] }); + claim = response && response[uri]; + } catch (error) { + dispatch({ + type: ACTIONS.USER_SET_REFERRER_FAILURE, + data: { error }, + }); } - }) - .catch(error => { - dispatch({ - type: ACTIONS.USER_SET_REFERRER_FAILURE, - data: { error }, - }); + } + referrerCode = claim && claim.permanent_url.replace('lbry://', ''); + } + try { + await Lbryio.call('user', 'referral', { referrer: referrerCode }, 'post'); + dispatch({ + type: ACTIONS.USER_SET_REFERRER_SUCCESS, }); + dispatch( + doToast({ + message: __(`Set Referrer to ${referrer}`), + }), + ); + if (shouldClaim) { + dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); + dispatch(doUserFetch()); + } else { + dispatch(doUserFetch()); + } + } catch (error) { + dispatch({ + type: ACTIONS.USER_SET_REFERRER_FAILURE, + data: { error }, + }); + } }; } diff --git a/src/redux/reducers/subscriptions.js b/src/redux/reducers/subscriptions.js index 6dc1f14..5f2eb92 100644 --- a/src/redux/reducers/subscriptions.js +++ b/src/redux/reducers/subscriptions.js @@ -25,7 +25,9 @@ export default handleActions( ): SubscriptionState => { const newSubscription: Subscription = action.data; const newSubscriptions: Array = state.subscriptions.slice(); - newSubscriptions.unshift(newSubscription); + if (!newSubscriptions.some(sub => sub.uri === newSubscription.uri)) { + newSubscriptions.unshift(newSubscription); + } return { ...state, diff --git a/src/redux/selectors/user.js b/src/redux/selectors/user.js index d6156c8..e2cc3b3 100644 --- a/src/redux/selectors/user.js +++ b/src/redux/selectors/user.js @@ -154,7 +154,7 @@ export const selectUserInviteReferralLink = createSelector( export const selectUserInviteReferralCode = createSelector( selectState, - state => state.referralCode + state => (state.referralCode ? state.referralCode[0] : '') ); export const selectYouTubeImportPending = createSelector( From 018d149fb493615c7179d1ea3c497f07b9c8aed6 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 9 Jan 2020 22:44:03 -0500 Subject: [PATCH 3/4] rename setReferrerPending and Error --- dist/bundle.es.js | 20 ++++++++++---------- dist/bundle.js | 20 ++++++++++---------- src/redux/reducers/user.js | 16 ++++++++-------- src/redux/selectors/user.js | 4 ++-- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 5067320..1d98973 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1236,8 +1236,8 @@ const selectUserInviteReferralLink = reselect.createSelector(selectState$2, stat const selectUserInviteReferralCode = reselect.createSelector(selectState$2, state => state.referralCode ? state.referralCode[0] : ''); const selectYouTubeImportPending = reselect.createSelector(selectState$2, state => state.youtubeChannelImportPending); const selectYouTubeImportError = reselect.createSelector(selectState$2, state => state.youtubeChannelImportErrorMessage); -const selectSetReferrerPending = reselect.createSelector(selectState$2, state => state.setReferrerIsPending); -const selectSetReferrerError = reselect.createSelector(selectState$2, state => state.setReferrerError); +const selectSetReferrerPending = reselect.createSelector(selectState$2, state => state.referrerSetIsPending); +const selectSetReferrerError = reselect.createSelector(selectState$2, state => state.referrerSetError); const selectYouTubeImportVideosComplete = reselect.createSelector(selectState$2, state => { const total = state.youtubeChannelImportTotal; const complete = state.youtubeChannelImportComplete || 0; @@ -2968,8 +2968,8 @@ const defaultState$3 = { accessToken: undefined, youtubeChannelImportPending: false, youtubeChannelImportErrorMessage: '', - setReferrerIsPending: false, - setReferrerError: '' + referrerSetIsPending: false, + referrerSetError: '' }; reducers$2[AUTHENTICATION_STARTED] = state => Object.assign({}, state, { @@ -3186,18 +3186,18 @@ reducers$2[USER_EMAIL_VERIFY_RETRY_FAILURE] = state => Object.assign({}, state, }); reducers$2[USER_SET_REFERRER_STARTED] = state => Object.assign({}, state, { - setReferrerIsPending: true, - setReferrerError: defaultState$3.setReferrerError + referrerSetIsPending: true, + referrerSetError: defaultState$3.referrerSetError }); reducers$2[USER_SET_REFERRER_SUCCESS] = state => Object.assign({}, state, { - setReferrerIsPending: false, - setReferrerError: defaultState$3.setReferrerError + referrerSetIsPending: false, + referrerSetError: defaultState$3.referrerSetError }); reducers$2[USER_SET_REFERRER_FAILURE] = (state, action) => Object.assign({}, state, { - setReferrerIsPending: false, - setReferrerError: action.data.error.message + referrerSetIsPending: false, + referrerSetError: action.data.error.message }); function userReducer(state = defaultState$3, action) { diff --git a/dist/bundle.js b/dist/bundle.js index 2f693ee..4374365 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -4801,10 +4801,10 @@ var selectYouTubeImportError = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["cre return state.youtubeChannelImportErrorMessage; }); var selectSetReferrerPending = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { - return state.setReferrerIsPending; + return state.referrerSetIsPending; }); var selectSetReferrerError = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { - return state.setReferrerError; + return state.referrerSetError; }); var selectYouTubeImportVideosComplete = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { var total = state.youtubeChannelImportTotal; @@ -6794,8 +6794,8 @@ var defaultState = { accessToken: undefined, youtubeChannelImportPending: false, youtubeChannelImportErrorMessage: '', - setReferrerIsPending: false, - setReferrerError: '' + referrerSetIsPending: false, + referrerSetError: '' }; reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["AUTHENTICATION_STARTED"]] = function (state) { @@ -7079,22 +7079,22 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_EMAIL_VERIFY_ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_SET_REFERRER_STARTED"]] = function (state) { return Object.assign({}, state, { - setReferrerIsPending: true, - setReferrerError: defaultState.setReferrerError + referrerSetIsPending: true, + referrerSetError: defaultState.referrerSetError }); }; reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_SET_REFERRER_SUCCESS"]] = function (state) { return Object.assign({}, state, { - setReferrerIsPending: false, - setReferrerError: defaultState.setReferrerError + referrerSetIsPending: false, + referrerSetError: defaultState.referrerSetError }); }; reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["USER_SET_REFERRER_FAILURE"]] = function (state, action) { return Object.assign({}, state, { - setReferrerIsPending: false, - setReferrerError: action.data.error.message + referrerSetIsPending: false, + referrerSetError: action.data.error.message }); }; diff --git a/src/redux/reducers/user.js b/src/redux/reducers/user.js index 2efd7d1..3748059 100644 --- a/src/redux/reducers/user.js +++ b/src/redux/reducers/user.js @@ -21,8 +21,8 @@ const defaultState = { accessToken: undefined, youtubeChannelImportPending: false, youtubeChannelImportErrorMessage: '', - setReferrerIsPending: false, - setReferrerError: '', + referrerSetIsPending: false, + referrerSetError: '', }; reducers[ACTIONS.AUTHENTICATION_STARTED] = state => @@ -273,20 +273,20 @@ reducers[ACTIONS.USER_EMAIL_VERIFY_RETRY_FAILURE] = state => reducers[ACTIONS.USER_SET_REFERRER_STARTED] = state => Object.assign({}, state, { - setReferrerIsPending: true, - setReferrerError: defaultState.setReferrerError, + referrerSetIsPending: true, + referrerSetError: defaultState.referrerSetError, }); reducers[ACTIONS.USER_SET_REFERRER_SUCCESS] = state => Object.assign({}, state, { - setReferrerIsPending: false, - setReferrerError: defaultState.setReferrerError, + referrerSetIsPending: false, + referrerSetError: defaultState.referrerSetError, }); reducers[ACTIONS.USER_SET_REFERRER_FAILURE] = (state, action) => Object.assign({}, state, { - setReferrerIsPending: false, - setReferrerError: action.data.error.message, + referrerSetIsPending: false, + referrerSetError: action.data.error.message, }); export function userReducer(state = defaultState, action) { diff --git a/src/redux/selectors/user.js b/src/redux/selectors/user.js index e2cc3b3..dc0b0ed 100644 --- a/src/redux/selectors/user.js +++ b/src/redux/selectors/user.js @@ -169,10 +169,10 @@ export const selectYouTubeImportError = createSelector( export const selectSetReferrerPending = createSelector( selectState, - state => state.setReferrerIsPending + state => state.referrerSetIsPending ); -export const selectSetReferrerError = createSelector(selectState, state => state.setReferrerError); +export const selectSetReferrerError = createSelector(selectState, state => state.referrerSetError); export const selectYouTubeImportVideosComplete = createSelector(selectState, state => { const total = state.youtubeChannelImportTotal; From e7e800b2d2d27ff7fed6d66cba40dd0149fee50c Mon Sep 17 00:00:00 2001 From: jessop Date: Fri, 10 Jan 2020 17:56:47 -0500 Subject: [PATCH 4/4] remove setReferrer Toast --- dist/bundle.es.js | 3 --- dist/bundle.js | 13 +++++-------- src/redux/actions/user.js | 5 ----- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 1d98973..f1e4008 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1660,9 +1660,6 @@ function doUserSetReferrer(referrer, shouldClaim) { dispatch({ type: USER_SET_REFERRER_SUCCESS }); - dispatch(lbryRedux.doToast({ - message: __(`Set Referrer to ${referrer}`) - })); if (shouldClaim) { dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); diff --git a/dist/bundle.js b/dist/bundle.js index 4374365..1258a58 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -5321,9 +5321,6 @@ function doUserSetReferrer(referrer, shouldClaim) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_SUCCESS"] }); - dispatch(Object(lbry_redux__WEBPACK_IMPORTED_MODULE_0__["doToast"])({ - message: __("Set Referrer to ".concat(referrer)) - })); if (shouldClaim) { dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doClaimRewardType"])(rewards__WEBPACK_IMPORTED_MODULE_4__["default"].TYPE_REFEREE)); @@ -5332,11 +5329,11 @@ function doUserSetReferrer(referrer, shouldClaim) { dispatch(doUserFetch()); } - _context.next = 29; + _context.next = 28; break; - case 26: - _context.prev = 26; + case 25: + _context.prev = 25; _context.t1 = _context["catch"](18); dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_SET_REFERRER_FAILURE"], @@ -5345,12 +5342,12 @@ function doUserSetReferrer(referrer, shouldClaim) { } }); - case 29: + case 28: case "end": return _context.stop(); } } - }, _callee, null, [[7, 14], [18, 26]]); + }, _callee, null, [[7, 14], [18, 25]]); })); return function (_x, _x2) { diff --git a/src/redux/actions/user.js b/src/redux/actions/user.js index bd05743..7c7db39 100644 --- a/src/redux/actions/user.js +++ b/src/redux/actions/user.js @@ -426,11 +426,6 @@ export function doUserSetReferrer(referrer, shouldClaim) { dispatch({ type: ACTIONS.USER_SET_REFERRER_SUCCESS, }); - dispatch( - doToast({ - message: __(`Set Referrer to ${referrer}`), - }), - ); if (shouldClaim) { dispatch(doClaimRewardType(rewards.TYPE_REFEREE)); dispatch(doUserFetch());