Collections #383

Merged
jessopb merged 20 commits from collections into master 2021-06-08 17:51:49 +02:00
3 changed files with 10 additions and 8 deletions
Showing only changes of commit 09699be25c - Show all commits

7
dist/bundle.es.js vendored
View file

@ -4380,7 +4380,7 @@ function doCollectionPublish(options, localId) {
})); }));
dispatch(doCheckPendingClaims()); dispatch(doCheckPendingClaims());
dispatch(doFetchCollectionListMine(1, 10)); dispatch(doFetchCollectionListMine(1, 10));
resolve(collectionClaim); return collectionClaim;
} }
function failure(error) { function failure(error) {
@ -4450,7 +4450,7 @@ function doCollectionPublishUpdate(options) {
}); });
dispatch(doCheckPendingClaims()); dispatch(doCheckPendingClaims());
dispatch(doFetchCollectionListMine(1, 10)); dispatch(doFetchCollectionListMine(1, 10));
resolve(collectionClaim); return collectionClaim;
} }
function failure(error) { function failure(error) {
@ -4608,7 +4608,8 @@ const doCollectionDelete = (id, colKey = undefined) => (dispatch, getState) => {
collectionKey: colKey collectionKey: colKey
} }
}); });
if (claim) { if (claim && !colKey) {
// could support "abandon, but keep" later
const { txid, nout } = claim; const { txid, nout } = claim;
return dispatch(doAbandonClaim(txid, nout, collectionDelete)); return dispatch(doAbandonClaim(txid, nout, collectionDelete));
} }

View file

@ -788,7 +788,7 @@ export function doCollectionPublish(
); );
dispatch(doCheckPendingClaims()); dispatch(doCheckPendingClaims());
dispatch(doFetchCollectionListMine(1, 10)); dispatch(doFetchCollectionListMine(1, 10));
resolve(collectionClaim); return collectionClaim;
} }
function failure(error) { function failure(error) {
@ -879,7 +879,7 @@ export function doCollectionPublishUpdate(options: {
}); });
dispatch(doCheckPendingClaims()); dispatch(doCheckPendingClaims());
dispatch(doFetchCollectionListMine(1, 10)); dispatch(doFetchCollectionListMine(1, 10));
resolve(collectionClaim); return collectionClaim;
} }
function failure(error) { function failure(error) {

View file

@ -55,7 +55,8 @@ export const doCollectionDelete = (id: string, colKey: ?string = undefined) => (
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
collectionKey: colKey, collectionKey: colKey,
}, },
}); });
if (claim) { if (claim && !colKey) {
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
// could support "abandon, but keep" later
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
const { txid, nout } = claim; const { txid, nout } = claim;
return dispatch(doAbandonClaim(txid, nout, collectionDelete)); return dispatch(doAbandonClaim(txid, nout, collectionDelete));
} }
@ -92,7 +93,7 @@ export const doFetchItemsInCollections = (
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
pageSize?: number, pageSize?: number,
}, },
resolveStartedCallback?: () => void resolveStartedCallback?: () => void
) => async(dispatch: Dispatch, getState: GetState) => { ) => async (dispatch: Dispatch, getState: GetState) => {
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
/* /*
1) make sure all the collection claims are loaded into claims reducer, search/resolve if necessary. 1) make sure all the collection claims are loaded into claims reducer, search/resolve if necessary.
2) get the item claims for each 2) get the item claims for each
@ -328,7 +329,7 @@ export const doFetchItemsInCollection = (
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
return doFetchItemsInCollections(newOptions, cb); return doFetchItemsInCollections(newOptions, cb);
}; };
export const doCollectionEdit = (collectionId: string, params: CollectionEditParams) => async( export const doCollectionEdit = (collectionId: string, params: CollectionEditParams) => async (
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
dispatch: Dispatch, dispatch: Dispatch,
getState: GetState getState: GetState
) => { ) => {

jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >
jessopb commented 2021-02-17 17:16:08 +01:00 (Migrated from github.com)
Review

Array/< { claimId: string, items: ?Array } >

Array/< { claimId: string, items: ?Array<GenericClaim> } >