From 6ce6a494e45f6a3516711d2020bafbee7e9f9018 Mon Sep 17 00:00:00 2001 From: Thomas Zarebczan Date: Tue, 21 May 2019 16:10:41 -0400 Subject: [PATCH] fix: claim search to use channel uri instead of claim id (support for vanity resolution) I did not test this locally - would need to bring it into an Android build. The --winning parameter is required so that only the winning channel's claims are returned. --- dist/bundle.es.js | 4 +--- src/redux/actions/claims.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 4bbe81d..5ee8ee8 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -2093,9 +2093,7 @@ function doFetchClaimsByChannel(uri, page = 1) { data: { uri, page } }); - const { claimId } = parseURI(uri); - - lbryProxy.claim_search({ channel_id: claimId, page: page || 1 }).then(result => { + lbryProxy.claim_search({ channel_name: uri, page: page || 1, winning: true }).then(result => { const { items: claimsInChannel, page: returnedPage } = result; dispatch({ diff --git a/src/redux/actions/claims.js b/src/redux/actions/claims.js index 54bc7c9..33dd119 100644 --- a/src/redux/actions/claims.js +++ b/src/redux/actions/claims.js @@ -182,9 +182,7 @@ export function doFetchClaimsByChannel(uri: string, page: number = 1) { data: { uri, page }, }); - const { claimId } = parseURI(uri); - - Lbry.claim_search({ channel_id: claimId, page: page || 1 }).then( + Lbry.claim_search({ channel_name: uri, page: page || 1, winning: true }).then( (result: ClaimSearchResponse) => { const { items: claimsInChannel, page: returnedPage } = result; -- 2.45.2