From cf24633357512c3f608caa38727193f71d0cac1d Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:00:42 +0900 Subject: [PATCH 1/2] fix /receipts order by --- packages/api-http/source/controllers/receipts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/api-http/source/controllers/receipts.ts b/packages/api-http/source/controllers/receipts.ts index a3bbf3d75..fc705b246 100644 --- a/packages/api-http/source/controllers/receipts.ts +++ b/packages/api-http/source/controllers/receipts.ts @@ -38,8 +38,8 @@ export class ReceiptsController extends Controller { } const [receipts, totalCount] = await query - .orderBy("transaction.sequence", "DESC") - .addOrderBy("transaction.blockHeight", "DESC") + .orderBy("transaction.blockHeight", "DESC") + .addOrderBy("transaction.sequence", "DESC") .offset(pagination.offset) .limit(pagination.limit) .select() From ba3ea537096d16e7c444735e6d4c7e80192cea57 Mon Sep 17 00:00:00 2001 From: oXtxNt9U <120286271+oXtxNt9U@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:53 +0900 Subject: [PATCH 2/2] fix /receipts/contracts order by --- packages/api-http/source/controllers/receipts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/api-http/source/controllers/receipts.ts b/packages/api-http/source/controllers/receipts.ts index fc705b246..f0ade4307 100644 --- a/packages/api-http/source/controllers/receipts.ts +++ b/packages/api-http/source/controllers/receipts.ts @@ -91,8 +91,8 @@ export class ReceiptsController extends Controller { } const [receipts, totalCount] = await query - .orderBy("transaction.sequence", "DESC") - .addOrderBy("transaction.blockHeight", "DESC") + .orderBy("transaction.blockHeight", "DESC") + .addOrderBy("transaction.sequence", "DESC") .offset(pagination.offset) .limit(pagination.limit) .select()