diff --git a/dist/bundle.es.js b/dist/bundle.es.js index a3ac37d..a67535f 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -4384,7 +4384,7 @@ function doCollectionPublish(options, localId) { type: COLLECTION_PUBLISH_COMPLETED, data: { claimId: collectionClaim.claim_id } }, - // shift unpublished collection to pending collection with new publish id + // move unpublished collection to pending collection with new publish id // recent publish won't resolve this second. handle it in checkPending { type: COLLECTION_PENDING, @@ -4415,11 +4415,8 @@ function doCollectionPublish(options, localId) { } function doCollectionPublishUpdate(options) { - return (dispatch, getState) => { - const state = getState(); - // select claim forclaim_id - // get publish params from claim - // $FlowFixMe + return dispatch => { + // TODO: implement one click update const updateParams = { bid: creditsToString(options.bid), @@ -4441,7 +4438,6 @@ function doCollectionPublishUpdate(options) { if (options.claims) { updateParams['claims'] = options.claims; } - // $FlowFixMe return new Promise(resolve => { dispatch({ type: COLLECTION_PUBLISH_UPDATE_STARTED @@ -7703,11 +7699,11 @@ const collectionsReducer = handleActions({ })); }, [USER_STATE_POPULATE]: (state, action) => { - const { builtinCollectionTest, savedCollectionTest, unpublishedCollectionTest } = action.data; + const { builtinCollections, savedCollections, unpublishedCollections } = action.data; return _extends$e({}, state, { - unpublished: unpublishedCollectionTest || state.unpublished, - builtin: builtinCollectionTest || state.builtin, - saved: savedCollectionTest || state.saved + unpublished: unpublishedCollections || state.unpublished, + builtin: builtinCollections || state.builtin, + saved: savedCollections || state.saved }); }, [COLLECTION_ITEMS_RESOLVE_COMPLETED]: (state, action) => { diff --git a/src/redux/actions/claims.js b/src/redux/actions/claims.js index c83dedc..88ee81e 100644 --- a/src/redux/actions/claims.js +++ b/src/redux/actions/claims.js @@ -799,7 +799,7 @@ export function doCollectionPublish( type: ACTIONS.COLLECTION_PUBLISH_COMPLETED, data: { claimId: collectionClaim.claim_id }, }, - // shift unpublished collection to pending collection with new publish id + // move unpublished collection to pending collection with new publish id // recent publish won't resolve this second. handle it in checkPending { type: ACTIONS.COLLECTION_PENDING, @@ -843,11 +843,8 @@ export function doCollectionPublishUpdate(options: { languages?: Array, claims?: Array, }) { - return (dispatch: Dispatch, getState: GetState) => { - const state = getState(); - // select claim forclaim_id - // get publish params from claim - // $FlowFixMe + return (dispatch: Dispatch): Promise => { + // TODO: implement one click update const updateParams: { bid?: string, @@ -880,7 +877,6 @@ export function doCollectionPublishUpdate(options: { if (options.claims) { updateParams['claims'] = options.claims; } - // $FlowFixMe return new Promise(resolve => { dispatch({ type: ACTIONS.COLLECTION_PUBLISH_UPDATE_STARTED, diff --git a/src/redux/reducers/collections.js b/src/redux/reducers/collections.js index 57f863b..e228d6d 100644 --- a/src/redux/reducers/collections.js +++ b/src/redux/reducers/collections.js @@ -159,12 +159,12 @@ const collectionsReducer = handleActions( }); }, [ACTIONS.USER_STATE_POPULATE]: (state, action) => { - const { builtinCollectionTest, savedCollectionTest, unpublishedCollectionTest } = action.data; + const { builtinCollections, savedCollections, unpublishedCollections } = action.data; return { ...state, - unpublished: unpublishedCollectionTest || state.unpublished, - builtin: builtinCollectionTest || state.builtin, - saved: savedCollectionTest || state.saved, + unpublished: unpublishedCollections || state.unpublished, + builtin: builtinCollections || state.builtin, + saved: savedCollections || state.saved, }; }, [ACTIONS.COLLECTION_ITEMS_RESOLVE_COMPLETED]: (state, action) => {