From 3d9bfdd2d37b73dd8f1574848f7cad68a65c2fd5 Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 23 Mar 2021 19:55:16 -0400 Subject: [PATCH] create selectPendingClaims --- dist/bundle.es.js | 3 +++ src/index.js | 1 + src/redux/selectors/claims.js | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index ebaba32..783ec9b 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -2234,6 +2234,8 @@ const selectAllClaimsByChannel = reselect.createSelector(selectState$1, state => const selectPendingIds = reselect.createSelector(selectState$1, state => state.pendingIds || []); +const selectPendingClaims = reselect.createSelector(selectPendingIds, selectClaimsById, (pendingIds, byId) => pendingIds.map(id => byId[id])); + const makeSelectClaimIsPending = uri => reselect.createSelector(selectClaimIdsByUri, selectPendingIds, (idsByUri, pendingIds) => { const claimId = idsByUri[normalizeURI(uri)]; @@ -6728,6 +6730,7 @@ exports.selectMyClaimsWithoutChannels = selectMyClaimsWithoutChannels; exports.selectMyPurchases = selectMyPurchases; exports.selectMyPurchasesCount = selectMyPurchasesCount; exports.selectMyStreamUrlsCount = selectMyStreamUrlsCount; +exports.selectPendingClaims = selectPendingClaims; exports.selectPendingConsolidateTxid = selectPendingConsolidateTxid; exports.selectPendingIds = selectPendingIds; exports.selectPendingMassClaimTxid = selectPendingMassClaimTxid; diff --git a/src/index.js b/src/index.js index 8d9b0f4..5545df1 100644 --- a/src/index.js +++ b/src/index.js @@ -201,6 +201,7 @@ export { selectAllFetchingChannelClaims, selectIsFetchingClaimListMine, selectMyClaims, + selectPendingClaims, selectMyClaimsWithoutChannels, selectMyChannelUrls, selectMyClaimUrisWithoutChannels, diff --git a/src/redux/selectors/claims.js b/src/redux/selectors/claims.js index 1497bd4..e5af6ab 100644 --- a/src/redux/selectors/claims.js +++ b/src/redux/selectors/claims.js @@ -75,6 +75,12 @@ export const selectPendingIds = createSelector( state => state.pendingIds || [] ); +export const selectPendingClaims = createSelector( + selectPendingIds, + selectClaimsById, + (pendingIds, byId) => pendingIds.map(id => byId[id]) +); + export const makeSelectClaimIsPending = (uri: string) => createSelector( selectClaimIdsByUri, -- 2.45.2