rename hasWallet -> hasSyncedWallet

This commit is contained in:
Akinwale Ariwodola 2019-04-18 08:59:19 +01:00
parent 8145575e25
commit 08acc37991
6 changed files with 23 additions and 23 deletions

14
dist/bundle.es.js vendored
View file

@ -2019,7 +2019,7 @@ function doGetSync(password) {
hash hash
}, 'post').then(response => { }, 'post').then(response => {
const data = { const data = {
hasWallet: true hasSyncedWallet: true
}; };
if (response.changed) { if (response.changed) {
@ -2048,7 +2048,7 @@ function doGetSync(password) {
dispatch({ dispatch({
type: GET_SYNC_COMPLETED, type: GET_SYNC_COMPLETED,
data: { data: {
hasWallet: false, hasSyncedWallet: false,
syncHash: null syncHash: null
} }
}); // call sync_apply to get data to sync }); // call sync_apply to get data to sync
@ -2538,7 +2538,7 @@ const statsReducer = handleActions({
const reducers$3 = {}; const reducers$3 = {};
const defaultState$8 = { const defaultState$8 = {
hasWallet: false, hasSyncedWallet: false,
syncHash: null, syncHash: null,
setSyncErrorMessage: null, setSyncErrorMessage: null,
retrievingSync: false, 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, { reducers$3[GET_SYNC_COMPLETED] = (state, action) => Object.assign({}, state, {
syncHash: action.data.syncHash, syncHash: action.data.syncHash,
hasWallet: action.data.hasWallet, hasSyncedWallet: action.data.hasSyncedWallet,
retrievingSync: false 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, { reducers$3[SET_SYNC_COMPLETED] = (state, action) => Object.assign({}, state, {
settingSync: false, settingSync: false,
setSyncErrorMessage: null, setSyncErrorMessage: null,
hasWallet: true, hasSyncedWallet: true,
// sync was successful, so the user has a synced wallet at this point // sync was successful, so the user has a synced wallet at this point
syncHash: action.data.syncHash syncHash: action.data.syncHash
}); });
@ -2607,7 +2607,7 @@ const makeSelectViewCountForUri = uri => reselect.createSelector(lbryRedux.makeS
const selectState$8 = state => state.sync || {}; 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 selectSyncHash = reselect.createSelector(selectState$8, state => state.syncHash);
const selectSetSyncErrorMessage = reselect.createSelector(selectState$8, state => state.setSyncErrorMessage); const selectSetSyncErrorMessage = reselect.createSelector(selectState$8, state => state.setSyncErrorMessage);
const selectIsRetrievingSync = reselect.createSelector(selectState$8, state => state.retrievingSync); const selectIsRetrievingSync = reselect.createSelector(selectState$8, state => state.retrievingSync);
@ -2698,7 +2698,7 @@ exports.selectFetchingFeaturedUris = selectFetchingFeaturedUris;
exports.selectFetchingRewards = selectFetchingRewards; exports.selectFetchingRewards = selectFetchingRewards;
exports.selectFetchingTrendingUris = selectFetchingTrendingUris; exports.selectFetchingTrendingUris = selectFetchingTrendingUris;
exports.selectFirstRunCompleted = selectFirstRunCompleted; exports.selectFirstRunCompleted = selectFirstRunCompleted;
exports.selectHasWallet = selectHasWallet; exports.selectHasSyncedWallet = selectHasSyncedWallet;
exports.selectIdentityVerifyErrorMessage = selectIdentityVerifyErrorMessage; exports.selectIdentityVerifyErrorMessage = selectIdentityVerifyErrorMessage;
exports.selectIdentityVerifyIsPending = selectIdentityVerifyIsPending; exports.selectIdentityVerifyIsPending = selectIdentityVerifyIsPending;
exports.selectIsAuthenticating = selectIsAuthenticating; exports.selectIsAuthenticating = selectIsAuthenticating;

18
dist/bundle.js vendored
View file

@ -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 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 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"]; }); /* 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 hash: hash
}, 'post').then(function (response) { }, 'post').then(function (response) {
var data = { var data = {
hasWallet: true hasSyncedWallet: true
}; };
if (response.changed) { if (response.changed) {
@ -3475,7 +3475,7 @@ function doGetSync(password) {
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"], type: constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"],
data: { data: {
hasWallet: false, hasSyncedWallet: false,
syncHash: null syncHash: null
} }
}); // call sync_apply to get data to sync }); // call sync_apply to get data to sync
@ -4125,7 +4125,7 @@ __webpack_require__.r(__webpack_exports__);
var reducers = {}; var reducers = {};
var defaultState = { var defaultState = {
hasWallet: false, hasSyncedWallet: false,
syncHash: null, syncHash: null,
setSyncErrorMessage: null, setSyncErrorMessage: null,
retrievingSync: false, 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) { reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"]] = function (state, action) {
return Object.assign({}, state, { return Object.assign({}, state, {
syncHash: action.data.syncHash, syncHash: action.data.syncHash,
hasWallet: action.data.hasWallet, hasSyncedWallet: action.data.hasSyncedWallet,
retrievingSync: false retrievingSync: false
}); });
}; };
@ -4164,7 +4164,7 @@ reducers[constants_action_types__WEBPACK_IMPORTED_MODULE_0__["SET_SYNC_COMPLETED
return Object.assign({}, state, { return Object.assign({}, state, {
settingSync: false, settingSync: false,
setSyncErrorMessage: null, setSyncErrorMessage: null,
hasWallet: true, hasSyncedWallet: true,
// sync was successful, so the user has a synced wallet at this point // sync was successful, so the user has a synced wallet at this point
syncHash: action.data.syncHash syncHash: action.data.syncHash
}); });
@ -4318,7 +4318,7 @@ var makeSelectViewCountForUri = function makeSelectViewCountForUri(uri) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __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__, "selectSyncHash", function() { return selectSyncHash; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncErrorMessage", function() { return selectSetSyncErrorMessage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectSetSyncErrorMessage", function() { return selectSetSyncErrorMessage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectIsRetrievingSync", function() { return selectIsRetrievingSync; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectIsRetrievingSync", function() { return selectIsRetrievingSync; });
@ -4331,8 +4331,8 @@ var selectState = function selectState(state) {
return state.sync || {}; return state.sync || {};
}; };
var selectHasWallet = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { var selectHasSyncedWallet = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) {
return state.hasWallet; return state.hasSyncedWallet;
}); });
var selectSyncHash = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) { var selectSyncHash = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, function (state) {
return state.syncHash; return state.syncHash;

View file

@ -155,7 +155,7 @@ export {
} from 'redux/selectors/homepage'; } from 'redux/selectors/homepage';
export { makeSelectViewCountForUri } from 'redux/selectors/stats'; export { makeSelectViewCountForUri } from 'redux/selectors/stats';
export { export {
selectHasWallet, selectHasSyncedWallet,
selectSyncHash, selectSyncHash,
selectSetSyncErrorMessage, selectSetSyncErrorMessage,
selectIsRetrievingSync, selectIsRetrievingSync,

View file

@ -40,7 +40,7 @@ export function doGetSync(password) {
Lbry.sync_hash().then(hash => { Lbry.sync_hash().then(hash => {
Lbryio.call('sync', 'get', { hash }, 'post') Lbryio.call('sync', 'get', { hash }, 'post')
.then(response => { .then(response => {
const data = { hasWallet: true }; const data = { hasSyncedWallet: true };
if (response.changed) { if (response.changed) {
const syncHash = response.hash; const syncHash = response.hash;
data.syncHash = syncHash; data.syncHash = syncHash;
@ -60,7 +60,7 @@ export function doGetSync(password) {
// user doesn't have a synced wallet // user doesn't have a synced wallet
dispatch({ dispatch({
type: ACTIONS.GET_SYNC_COMPLETED, type: ACTIONS.GET_SYNC_COMPLETED,
data: { hasWallet: false, syncHash: null }, data: { hasSyncedWallet: false, syncHash: null },
}); });
// call sync_apply to get data to sync // call sync_apply to get data to sync

View file

@ -2,7 +2,7 @@ import * as ACTIONS from 'constants/action_types';
const reducers = {}; const reducers = {};
const defaultState = { const defaultState = {
hasWallet: false, hasSyncedWallet: false,
syncHash: null, syncHash: null,
setSyncErrorMessage: null, setSyncErrorMessage: null,
retrievingSync: false, retrievingSync: false,
@ -17,7 +17,7 @@ reducers[ACTIONS.GET_SYNC_STARTED] = state =>
reducers[ACTIONS.GET_SYNC_COMPLETED] = (state, action) => reducers[ACTIONS.GET_SYNC_COMPLETED] = (state, action) =>
Object.assign({}, state, { Object.assign({}, state, {
syncHash: action.data.syncHash, syncHash: action.data.syncHash,
hasWallet: action.data.hasWallet, hasSyncedWallet: action.data.hasSyncedWallet,
retrievingSync: false, retrievingSync: false,
}); });
@ -37,7 +37,7 @@ reducers[ACTIONS.SET_SYNC_COMPLETED] = (state, action) =>
Object.assign({}, state, { Object.assign({}, state, {
settingSync: false, settingSync: false,
setSyncErrorMessage: null, 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, syncHash: action.data.syncHash,
}); });

View file

@ -2,7 +2,7 @@ import { createSelector } from 'reselect';
const selectState = state => state.sync || {}; 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); export const selectSyncHash = createSelector(selectState, state => state.syncHash);