rename hasWallet -> hasSyncedWallet
This commit is contained in:
parent
8145575e25
commit
08acc37991
6 changed files with 23 additions and 23 deletions
14
dist/bundle.es.js
vendored
14
dist/bundle.es.js
vendored
|
@ -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;
|
||||
|
|
18
dist/bundle.js
vendored
18
dist/bundle.js
vendored
|
@ -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;
|
||||
|
|
|
@ -155,7 +155,7 @@ export {
|
|||
} from 'redux/selectors/homepage';
|
||||
export { makeSelectViewCountForUri } from 'redux/selectors/stats';
|
||||
export {
|
||||
selectHasWallet,
|
||||
selectHasSyncedWallet,
|
||||
selectSyncHash,
|
||||
selectSetSyncErrorMessage,
|
||||
selectIsRetrievingSync,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue