Skip to content

Commit

Permalink
feat(cardano-service): implement stake pools search advanced filters
Browse files Browse the repository at this point in the history
  • Loading branch information
iccicci committed Apr 30, 2024
1 parent b8bbb53 commit 7161910
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const getWhereClauseAndArgs = (filters: QueryStakePoolsArgs['filters'], t
args = { ...args, status: filters.status };
clauses.push('pool.status IN (:...status)');
}

if (!textFilter && filters.identifier && filters.identifier.values.length > 0) {
const identifierClauses: string[] = [];
const identifierCondition = getFilterCondition(filters.identifier?._condition, 'OR');
Expand Down Expand Up @@ -123,6 +124,7 @@ export const getWhereClauseAndArgs = (filters: QueryStakePoolsArgs['filters'], t
const identifierFilters = identifierClauses.join(` ${identifierCondition} `);
clauses.push(` (${identifierFilters}) `);
}

if (filters.pledgeMet !== undefined && filters.pledgeMet !== null) {
if (filters.pledgeMet) {
clauses.push('params.pledge<=metrics.live_pledge');
Expand Down

0 comments on commit 7161910

Please sign in to comment.