Skip to content

Commit bd2f7de

Browse files
PJColomboluis-herasme
authored andcommitted
perf: decouple item counting logic from data fetching (#581)
* fix(api): set category filter to `ROLLUP` when the rollup filter is provided * feat(api): create blob `getCount` procedure * chore: add changeset * refactor(web): use `getCount()` procedure to retrieve total amount of blobs * chore: add changeset * feat(api): create block `getCount` procedure * chore: add changeset * fix(web): align header sleketon on blobs page view * refactor(web): use `getCount()` procedure to retrieve total amount of blocks * refactor(api): use count logic in `getAll` block procedure * feat(api): add transaction `getCount` procedure * refactor(web): use `getCount()` procedure to retrieve total amount of transactions on txs page * chore: merge changesets * refactor(web): organize query parameters by filter and pagination usage * test(api): remove rollup test
1 parent 93ec38d commit bd2f7de

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

packages/api/src/routers/blob/getAll.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@ export const getAll = publicProcedure
4444
.use(withExpands)
4545
.output(outputSchema)
4646
.query(async ({ ctx: { filters, expands, pagination, prisma, count } }) => {
47-
let leadingOrderColumn: Prisma.BlobsOnTransactionsOrderByWithRelationInput =
48-
{
49-
blockTimestamp: filters.sort,
50-
};
51-
52-
if (filters.blockNumber) {
53-
leadingOrderColumn = {
54-
blockNumber: filters.sort,
55-
};
56-
}
57-
5847
const blockFiltersExists = filters.blockSlot || filters.blockType;
5948
const txFiltersExists =
6049
filters.transactionRollup !== undefined ||

0 commit comments

Comments
 (0)