Claim search fix (#134)
* fix claim_search in doFetchClaimsByChannel * remove dist/bundle.js
This commit is contained in:
parent
164d980053
commit
4b3769fc2d
3 changed files with 20 additions and 5945 deletions
7
dist/bundle.es.js
vendored
7
dist/bundle.es.js
vendored
|
@ -2039,9 +2039,10 @@ function doFetchClaimsByChannel(uri, page = 1) {
|
||||||
data: { uri, page }
|
data: { uri, page }
|
||||||
});
|
});
|
||||||
|
|
||||||
lbryProxy.claim_search({ uri, page: page || 1 }).then(result => {
|
const { claimId } = parseURI(uri);
|
||||||
const claimResult = result[uri] || {};
|
|
||||||
const { claims_in_channel: claimsInChannel, returned_page: returnedPage } = claimResult;
|
lbryProxy.claim_search({ channel_id: claimId, page: page || 1 }).then(result => {
|
||||||
|
const { items: claimsInChannel, page: returnedPage } = result;
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: FETCH_CHANNEL_CLAIMS_COMPLETED,
|
type: FETCH_CHANNEL_CLAIMS_COMPLETED,
|
||||||
|
|
5929
dist/bundle.js
vendored
5929
dist/bundle.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import { normalizeURI } from 'lbryURI';
|
import { normalizeURI, parseURI } from 'lbryURI';
|
||||||
import { doToast } from 'redux/actions/notifications';
|
import { doToast } from 'redux/actions/notifications';
|
||||||
import { selectMyClaimsRaw, selectResolvingUris, selectClaimsByUri } from 'redux/selectors/claims';
|
import { selectMyClaimsRaw, selectResolvingUris, selectClaimsByUri } from 'redux/selectors/claims';
|
||||||
import { doFetchTransactions } from 'redux/actions/wallet';
|
import { doFetchTransactions } from 'redux/actions/wallet';
|
||||||
|
@ -155,19 +155,22 @@ export function doFetchClaimsByChannel(uri: string, page: number = 1) {
|
||||||
data: { uri, page },
|
data: { uri, page },
|
||||||
});
|
});
|
||||||
|
|
||||||
Lbry.claim_search({ uri, page: page || 1 }).then((result: ClaimSearchResponse) => {
|
const { claimId } = parseURI(uri);
|
||||||
const claimResult = result[uri] || {};
|
|
||||||
const { claims_in_channel: claimsInChannel, returned_page: returnedPage } = claimResult;
|
|
||||||
|
|
||||||
dispatch({
|
Lbry.claim_search({ channel_id: claimId, page: page || 1 }).then(
|
||||||
type: ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED,
|
(result: ClaimSearchResponse) => {
|
||||||
data: {
|
const { items: claimsInChannel, page: returnedPage } = result;
|
||||||
uri,
|
|
||||||
claims: claimsInChannel || [],
|
dispatch({
|
||||||
page: returnedPage || undefined,
|
type: ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED,
|
||||||
},
|
data: {
|
||||||
});
|
uri,
|
||||||
});
|
claims: claimsInChannel || [],
|
||||||
|
page: returnedPage || undefined,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue