use canonical_url when returning own claim urls and fix lint

This commit is contained in:
Sean Yesmunt 2020-03-09 10:29:13 -04:00
parent f36b91496b
commit 76207fb3c8
4 changed files with 11 additions and 12 deletions

10
dist/bundle.es.js vendored
View file

@ -2206,7 +2206,7 @@ const selectMyClaimUrisWithoutChannels = reselect.createSelector(selectMyClaimsW
} else {
return b.timestamp - a.timestamp;
}
}).map(claim => `lbry://${claim.name}#${claim.claim_id}`));
}).map(claim => claim.canonical_url));
const selectAllMyClaimsByOutpoint = reselect.createSelector(selectMyClaimsRaw, claims => new Set(claims && claims.length ? claims.map(claim => `${claim.txid}:${claim.nout}`) : null));
@ -2920,6 +2920,7 @@ function doFetchClaimListMine(page = 1, pageSize = 99999, resolve = true) {
type: FETCH_CLAIM_LIST_MINE_STARTED
});
// $FlowFixMe
lbryProxy.claim_list({ page, page_size: pageSize, claim_type: ['stream', 'repost'], resolve }).then(result => {
const claims = result.items;
@ -4210,14 +4211,11 @@ from, isBackgroundSearch = false, options = {}, nsfw) => (dispatch, getState) =>
return;
}
const optionsWithFrom = _extends$8({
size,
from,
const optionsWithFrom = _extends$8({}, size ? { size } : {}, from ? { from } : {}, {
isBackgroundSearch
}, options);
const optionsWithoutFrom = _extends$8({
size,
const optionsWithoutFrom = _extends$8({}, size ? { size } : {}, {
isBackgroundSearch
}, options);

View file

@ -104,6 +104,7 @@ export function doFetchClaimListMine(
type: ACTIONS.FETCH_CLAIM_LIST_MINE_STARTED,
});
// $FlowFixMe
Lbry.claim_list({ page, page_size: pageSize, claim_type: ['stream', 'repost'], resolve }).then(
(result: StreamListResponse) => {
const claims = result.items;

View file

@ -184,14 +184,14 @@ export const doResolvedSearch = (
}
const optionsWithFrom: SearchOptions = {
size,
from,
...(size ? { size } : {}),
...(from ? { from } : {}),
isBackgroundSearch,
...options,
};
const optionsWithoutFrom: SearchOptions = {
size,
...(size ? { size } : {}),
isBackgroundSearch,
...options,
};

View file

@ -377,7 +377,7 @@ export const selectMyClaimUrisWithoutChannels = createSelector(
return b.timestamp - a.timestamp;
}
})
.map(claim => `lbry://${claim.name}#${claim.claim_id}`)
.map(claim => claim.canonical_url)
);
export const selectAllMyClaimsByOutpoint = createSelector(