From 08acc3799115190d31fd4012c3ee0a2892ead783 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Thu, 18 Apr 2019 08:59:19 +0100 Subject: [PATCH] rename hasWallet -> hasSyncedWallet --- dist/bundle.es.js | 14 +++++++------- dist/bundle.js | 18 +++++++++--------- src/index.js | 2 +- src/redux/actions/sync.js | 4 ++-- src/redux/reducers/sync.js | 6 +++--- src/redux/selectors/sync.js | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 5d360ef..625ec4e 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -2019,7 +2019,7 @@ function doGetSync(password) { hash }, 'post').then(response => { const data = { - hasWallet: true + hasSyncedWallet: true }; if (response.changed) { @@ -2048,7 +2048,7 @@ function doGetSync(password) { dispatch({ type: GET_SYNC_COMPLETED, data: { - hasWallet: false, + hasSyncedWallet: false, syncHash: null } }); // call sync_apply to get data to sync @@ -2538,7 +2538,7 @@ const statsReducer = handleActions({ const reducers$3 = {}; const defaultState$8 = { - hasWallet: false, + hasSyncedWallet: false, syncHash: null, setSyncErrorMessage: null, retrievingSync: false, @@ -2551,7 +2551,7 @@ reducers$3[GET_SYNC_STARTED] = state => Object.assign({}, state, { reducers$3[GET_SYNC_COMPLETED] = (state, action) => Object.assign({}, state, { syncHash: action.data.syncHash, - hasWallet: action.data.hasWallet, + hasSyncedWallet: action.data.hasSyncedWallet, retrievingSync: false }); @@ -2568,7 +2568,7 @@ reducers$3[SET_SYNC_FAILED] = (state, action) => Object.assign({}, state, { reducers$3[SET_SYNC_COMPLETED] = (state, action) => Object.assign({}, state, { settingSync: false, setSyncErrorMessage: null, - hasWallet: true, + hasSyncedWallet: true, // sync was successful, so the user has a synced wallet at this point syncHash: action.data.syncHash }); @@ -2607,7 +2607,7 @@ const makeSelectViewCountForUri = uri => reselect.createSelector(lbryRedux.makeS const selectState$8 = state => state.sync || {}; -const selectHasWallet = reselect.createSelector(selectState$8, state => state.hasWallet); +const selectHasSyncedWallet = reselect.createSelector(selectState$8, state => state.hasSyncedWallet); const selectSyncHash = reselect.createSelector(selectState$8, state => state.syncHash); const selectSetSyncErrorMessage = reselect.createSelector(selectState$8, state => state.setSyncErrorMessage); const selectIsRetrievingSync = reselect.createSelector(selectState$8, state => state.retrievingSync); @@ -2698,7 +2698,7 @@ exports.selectFetchingFeaturedUris = selectFetchingFeaturedUris; exports.selectFetchingRewards = selectFetchingRewards; exports.selectFetchingTrendingUris = selectFetchingTrendingUris; exports.selectFirstRunCompleted = selectFirstRunCompleted; -exports.selectHasWallet = selectHasWallet; +exports.selectHasSyncedWallet = selectHasSyncedWallet; exports.selectIdentityVerifyErrorMessage = selectIdentityVerifyErrorMessage; exports.selectIdentityVerifyIsPending = selectIdentityVerifyIsPending; exports.selectIsAuthenticating = selectIsAuthenticating; diff --git a/dist/bundle.js b/dist/bundle.js index 6f5a036..a3ad087 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -389,7 +389,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectViewCountForUri", function() { return redux_selectors_stats__WEBPACK_IMPORTED_MODULE_28__["makeSelectViewCountForUri"]; }); /* harmony import */ var redux_selectors_sync__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(39); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectHasWallet", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_29__["selectHasWallet"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectHasSyncedWallet", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_29__["selectHasSyncedWallet"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectSyncHash", function() { return redux_selectors_sync__WEBPACK_IMPORTED_MODULE_29__["selectSyncHash"]; }); @@ -3446,7 +3446,7 @@ function doGetSync(password) { hash: hash }, 'post').then(function (response) { var data = { - hasWallet: true + hasSyncedWallet: true }; if (response.changed) { @@ -3475,7 +3475,7 @@ function doGetSync(password) { dispatch({ type: constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"], data: { - hasWallet: false, + hasSyncedWallet: false, syncHash: null } }); // call sync_apply to get data to sync @@ -4125,7 +4125,7 @@ __webpack_require__.r(__webpack_exports__); var reducers = {}; var defaultState = { - hasWallet: false, + hasSyncedWallet: false, syncHash: null, setSyncErrorMessage: null, retrievingSync: false, @@ -4141,7 +4141,7 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_STARTED"] reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"]] = function (state, action) { return Object.assign({}, state, { syncHash: action.data.syncHash, - hasWallet: action.data.hasWallet, + hasSyncedWallet: action.data.hasSyncedWallet, retrievingSync: false }); }; @@ -4164,7 +4164,7 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["SET_SYNC_COMPLETED return Object.assign({}, state, { settingSync: false, setSyncErrorMessage: null, - hasWallet: true, + hasSyncedWallet: true, // sync was successful, so the user has a synced wallet at this point syncHash: action.data.syncHash }); @@ -4318,7 +4318,7 @@ var makeSelectViewCountForUri = function makeSelectViewCountForUri(uri) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectHasWallet", function() { return selectHasWallet; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectHasSyncedWallet", function() { return selectHasSyncedWallet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSyncHash", function() { return selectSyncHash; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncErrorMessage", function() { return selectSetSyncErrorMessage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectIsRetrievingSync", function() { return selectIsRetrievingSync; }); @@ -4331,8 +4331,8 @@ var selectState = function selectState(state) { return state.sync || {}; }; -var selectHasWallet = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { - return state.hasWallet; +var selectHasSyncedWallet = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { + return state.hasSyncedWallet; }); var selectSyncHash = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { return state.syncHash; diff --git a/src/index.js b/src/index.js index f32cbef..dfb554b 100644 --- a/src/index.js +++ b/src/index.js @@ -155,7 +155,7 @@ export { } from 'redux/selectors/homepage'; export { makeSelectViewCountForUri } from 'redux/selectors/stats'; export { - selectHasWallet, + selectHasSyncedWallet, selectSyncHash, selectSetSyncErrorMessage, selectIsRetrievingSync, diff --git a/src/redux/actions/sync.js b/src/redux/actions/sync.js index 89fe69b..db6448a 100644 --- a/src/redux/actions/sync.js +++ b/src/redux/actions/sync.js @@ -40,7 +40,7 @@ export function doGetSync(password) { Lbry.sync_hash().then(hash => { Lbryio.call('sync', 'get', { hash }, 'post') .then(response => { - const data = { hasWallet: true }; + const data = { hasSyncedWallet: true }; if (response.changed) { const syncHash = response.hash; data.syncHash = syncHash; @@ -60,7 +60,7 @@ export function doGetSync(password) { // user doesn't have a synced wallet dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, - data: { hasWallet: false, syncHash: null }, + data: { hasSyncedWallet: false, syncHash: null }, }); // call sync_apply to get data to sync diff --git a/src/redux/reducers/sync.js b/src/redux/reducers/sync.js index 9ce9fb0..8780b7c 100644 --- a/src/redux/reducers/sync.js +++ b/src/redux/reducers/sync.js @@ -2,7 +2,7 @@ import * as ACTIONS from 'constants/action_types'; const reducers = {}; const defaultState = { - hasWallet: false, + hasSyncedWallet: false, syncHash: null, setSyncErrorMessage: null, retrievingSync: false, @@ -17,7 +17,7 @@ reducers[ACTIONS.GET_SYNC_STARTED] = state => reducers[ACTIONS.GET_SYNC_COMPLETED] = (state, action) => Object.assign({}, state, { syncHash: action.data.syncHash, - hasWallet: action.data.hasWallet, + hasSyncedWallet: action.data.hasSyncedWallet, retrievingSync: false, }); @@ -37,7 +37,7 @@ reducers[ACTIONS.SET_SYNC_COMPLETED] = (state, action) => Object.assign({}, state, { settingSync: false, setSyncErrorMessage: null, - hasWallet: true, // sync was successful, so the user has a synced wallet at this point + hasSyncedWallet: true, // sync was successful, so the user has a synced wallet at this point syncHash: action.data.syncHash, }); diff --git a/src/redux/selectors/sync.js b/src/redux/selectors/sync.js index c23b7a9..ceefdb1 100644 --- a/src/redux/selectors/sync.js +++ b/src/redux/selectors/sync.js @@ -2,7 +2,7 @@ import { createSelector } from 'reselect'; const selectState = state => state.sync || {}; -export const selectHasWallet = createSelector(selectState, state => state.hasWallet); +export const selectHasSyncedWallet = createSelector(selectState, state => state.hasSyncedWallet); export const selectSyncHash = createSelector(selectState, state => state.syncHash);