Select pending url #369

Merged
jessopb merged 5 commits from selectPendingUrl into master 2020-12-16 16:19:51 +01:00
3 changed files with 18 additions and 4 deletions
Showing only changes of commit f683af3b99 - Show all commits

5
dist/bundle.es.js vendored
View file

@ -2363,6 +2363,10 @@ const makeSelectAmountForUri = uri => reselect.createSelector(makeSelectClaimFor
return claim && claim.amount;
});
const makeSelectEffectiveAmountForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
return claim && claim.meta && claim.meta.effective_amount;
});
const makeSelectContentTypeForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
const source = claim && claim.value && claim.value.source;
return source ? source.media_type : undefined;
@ -6218,6 +6222,7 @@ exports.makeSelectCoverForUri = makeSelectCoverForUri;
exports.makeSelectDateForUri = makeSelectDateForUri;
exports.makeSelectDownloadPathForUri = makeSelectDownloadPathForUri;
exports.makeSelectDownloadingForUri = makeSelectDownloadingForUri;
exports.makeSelectEffectiveAmountForUri = makeSelectEffectiveAmountForUri;
exports.makeSelectFetchingChannelClaims = makeSelectFetchingChannelClaims;
exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
exports.makeSelectFileNameForUri = makeSelectFileNameForUri;

View file

@ -157,6 +157,7 @@ export {
makeSelectTitleForUri,
makeSelectDateForUri,
makeSelectAmountForUri,
makeSelectEffectiveAmountForUri,
makeSelectTagsForUri,
makeSelectTagInClaimOrChannelForUri,
makeSelectContentTypeForUri,

View file

@ -383,6 +383,14 @@ export const makeSelectAmountForUri = (uri: string) =>
}
);
export const makeSelectEffectiveAmountForUri = (uri: string) =>
createSelector(
makeSelectClaimForUri(uri),
claim => {
return claim && claim.meta && claim.meta.effective_amount;
}
);
export const makeSelectContentTypeForUri = (uri: string) =>
createSelector(
makeSelectClaimForUri(uri),