fix: claim search params
This commit is contained in:
parent
60543562aa
commit
7baa73aff9
2 changed files with 77 additions and 67 deletions
|
@ -292,7 +292,13 @@ export function doFetchClaimsByChannel(uri: string, page: number = 1, pageSize:
|
|||
data: { uri, page },
|
||||
});
|
||||
|
||||
Lbry.claim_search({ channel: uri, is_controlling: true, page, page_size: pageSize }).then(result => {
|
||||
Lbry.claim_search({
|
||||
channel: uri,
|
||||
page,
|
||||
page_size: pageSize,
|
||||
valid_channel_signatures: true,
|
||||
order_by: ['release_time'],
|
||||
}).then(result => {
|
||||
const { items: claimsInChannel, page: returnedPage } = result;
|
||||
|
||||
if (claimsInChannel && claimsInChannel.length) {
|
||||
|
|
|
@ -204,8 +204,13 @@ export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: bool
|
|||
}
|
||||
|
||||
// We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel?
|
||||
Lbry.claim_search({ channel: subscriptionUri, is_controlling: true, page: 1, page_size: PAGE_SIZE }).then(
|
||||
claimListByChannel => {
|
||||
Lbry.claim_search({
|
||||
channel: subscriptionUri,
|
||||
valid_channel_signatures: true,
|
||||
order_by: ['release_time'],
|
||||
page: 1,
|
||||
page_size: PAGE_SIZE,
|
||||
}).then(claimListByChannel => {
|
||||
const { items: claimsInChannel } = claimListByChannel;
|
||||
|
||||
// may happen if subscribed to an abandoned channel or an empty channel
|
||||
|
@ -280,8 +285,7 @@ export const doCheckSubscription = (subscriptionUri: string, shouldNotify?: bool
|
|||
page: 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
export const doChannelSubscribe = (subscription: Subscription) => (dispatch: Dispatch, getState: GetState) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue