Skip to content

Commit

Permalink
Merge pull request #318 from kodadot/main
Browse files Browse the repository at this point in the history
🔖  Stick v12
  • Loading branch information
vikiival authored Oct 6, 2024
2 parents 08f53d1 + 9d0ee8c commit f3fd8c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/server-extension/query/totalTokenEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ WHERE
($3::bigint IS NULL OR ne.price > $3::bigint) AND
($4::bigint IS NULL OR ne.price <= $4::bigint) AND
($7::text[] IS NULL OR ne.collection_id = ANY($7)) AND
($8::text IS NULL OR LOWER(ne.name) LIKE LOWER('%' || $8 || '%'));
($8::text IS NULL OR LOWER(ne.name) LIKE LOWER('%' || $8 || '%')) AND
($9::text IS NULL OR ne.kind = $9);
`;
4 changes: 3 additions & 1 deletion src/server-extension/resolvers/totalTokenEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export class TokenCountResolver {
@Arg('price_lte', { nullable: true }) price_lte?: number,
@Arg('denyList', () => [String], { nullable: true }) denyList?: string[],
@Arg('collections', () => [String], { nullable: true }) collections?: string[],
@Arg('name', { nullable: true }) name?: string
@Arg('name', { nullable: true }) name?: string,
@Arg('kind', { nullable: true }) kind?: string
): Promise<CountEntity> {
const rawData: CountEntityQueryResult[] = await makeQuery(this.tx, CountEntity, totalTokenEntities, [
owner,
Expand All @@ -29,6 +30,7 @@ export class TokenCountResolver {
issuer,
collections,
name,
kind
])
return new CountEntity(rawData[0].total_count)
}
Expand Down

0 comments on commit f3fd8c0

Please sign in to comment.