ignore channelClaims if channelId has not been confirmed
This commit is contained in:
parent
c7a7790c27
commit
9ba4c4641e
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,11 @@ const { returnPaginatedChannelClaims } = require('./channelPagination.js');
|
|||
|
||||
const getChannelClaims = async (channelName, channelShortId, page) => {
|
||||
const channelId = await chainquery.claim.queries.getLongClaimId(channelName, channelShortId);
|
||||
const channelClaims = await chainquery.claim.queries.getAllChannelClaims(channelId);
|
||||
|
||||
let channelClaims;
|
||||
if (channelId) {
|
||||
channelClaims = await chainquery.claim.queries.getAllChannelClaims(channelId);
|
||||
}
|
||||
|
||||
const processingChannelClaims = channelClaims ? channelClaims.map((claim) => getClaimData(claim)) : [];
|
||||
const processedChannelClaims = await Promise.all(processingChannelClaims);
|
||||
|
|
Loading…
Reference in a new issue