Claim search fix (#134)

* fix claim_search in doFetchClaimsByChannel
* remove dist/bundle.js
This commit is contained in:
Akinwale Ariwodola 2019-04-29 15:29:24 +01:00 committed by GitHub
parent 164d980053
commit 4b3769fc2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 5945 deletions

7
dist/bundle.es.js vendored
View file

@ -2039,9 +2039,10 @@ function doFetchClaimsByChannel(uri, page = 1) {
data: { uri, page }
});
lbryProxy.claim_search({ uri, page: page || 1 }).then(result => {
const claimResult = result[uri] || {};
const { claims_in_channel: claimsInChannel, returned_page: returnedPage } = claimResult;
const { claimId } = parseURI(uri);
lbryProxy.claim_search({ channel_id: claimId, page: page || 1 }).then(result => {
const { items: claimsInChannel, page: returnedPage } = result;
dispatch({
type: FETCH_CHANNEL_CLAIMS_COMPLETED,

5929
dist/bundle.js vendored

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
// @flow
import * as ACTIONS from 'constants/action_types';
import Lbry from 'lbry';
import { normalizeURI } from 'lbryURI';
import { normalizeURI, parseURI } from 'lbryURI';
import { doToast } from 'redux/actions/notifications';
import { selectMyClaimsRaw, selectResolvingUris, selectClaimsByUri } from 'redux/selectors/claims';
import { doFetchTransactions } from 'redux/actions/wallet';
@ -155,19 +155,22 @@ export function doFetchClaimsByChannel(uri: string, page: number = 1) {
data: { uri, page },
});
Lbry.claim_search({ uri, page: page || 1 }).then((result: ClaimSearchResponse) => {
const claimResult = result[uri] || {};
const { claims_in_channel: claimsInChannel, returned_page: returnedPage } = claimResult;
const { claimId } = parseURI(uri);
dispatch({
type: ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED,
data: {
uri,
claims: claimsInChannel || [],
page: returnedPage || undefined,
},
});
});
Lbry.claim_search({ channel_id: claimId, page: page || 1 }).then(
(result: ClaimSearchResponse) => {
const { items: claimsInChannel, page: returnedPage } = result;
dispatch({
type: ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED,
data: {
uri,
claims: claimsInChannel || [],
page: returnedPage || undefined,
},
});
}
);
};
}