From c61f6eadb3bc8ac41bf3ce70f3fd2cf126f2a706 Mon Sep 17 00:00:00 2001 From: BoHsuu <115441679+Huygon764@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:41:32 +0700 Subject: [PATCH 1/4] refactor: improve layout and responsiveness in Quest and Batch components (#200) - Updated QuestPage layout for better responsiveness with max-width and padding adjustments. - Changed BatchTransactions and TransactionSummary components to use flexbox for improved item alignment and responsiveness. - Enhanced QuestCard to allow for flexible width. - Added titles for new routes in the Title component. --- .../components/Batch/BatchContainer.tsx | 6 +--- .../components/Batch/TransactionSummary.tsx | 31 +++++-------------- 2 files changed, 9 insertions(+), 28 deletions(-) diff --git a/packages/nextjs/components/Batch/BatchContainer.tsx b/packages/nextjs/components/Batch/BatchContainer.tsx index febcefc..93cecd6 100644 --- a/packages/nextjs/components/Batch/BatchContainer.tsx +++ b/packages/nextjs/components/Batch/BatchContainer.tsx @@ -179,11 +179,7 @@ function BatchTransactions({ {/* Recipient */}
{matchedContact ? ( - +
= ({
{/* Header Section */}
- Batch transactions + Batch transactions
Transactions summary @@ -58,7 +58,10 @@ const TransactionSummary: React.FC = ({ ); return ( -
+
{/* Amount with Token Icon */}
{transaction.tokenIcon && ( @@ -74,26 +77,14 @@ const TransactionSummary: React.FC = ({ {/* Arrow */}
- Arrow Right + Arrow Right
{/* Recipient */}
{matchedContact ? (
- avatar + avatar {matchedContact.name} {"(" + `${formatAddress(transaction.recipient, { start: 3, end: 3 }) + ")"}`} @@ -101,13 +92,7 @@ const TransactionSummary: React.FC = ({
) : ( - avatar + avatar {formatAddress(transaction.recipient, { start: 3, end: 3 })} )} From 162441f61e2e68744417f5ee7b3d978678dfe231 Mon Sep 17 00:00:00 2001 From: BoHsuu <115441679+Huygon764@users.noreply.github.com> Date: Wed, 11 Mar 2026 16:27:44 +0700 Subject: [PATCH 2/4] Refactor/extract magic numbers to constants (#203) * refactor: adjust z-index values across various components for improved UI layering * feat: add timing constants for HTTP timeouts, cache TTL, and retry delays - Introduced new timing constants in `timing.ts` for backend and nextjs packages. - Updated index files to export the new timing constants for better accessibility. refactor: replace hardcoded values with timing constants for retries and timeouts - Updated various services and modules to utilize new timing constants for retries and timeouts, improving maintainability and consistency across the codebase. - Adjusted `waitForReceiptWithRetry`, `PriceService`, `ZenTransferService`, `TransactionService`, and `ZkVerifyService` to use centralized timing configurations. refactor: replace hardcoded values with timing constants across components and hooks - Updated various components and hooks to utilize new timing constants for polling intervals, refetch intervals, and timeouts, enhancing maintainability and consistency throughout the codebase. - Adjusted `NotificationItem`, `ClaimSection`, `EditAccountModal`, and several hooks to reference centralized timing configurations. refactor: standardize formatting and improve component styles - Refactored various components to enhance code readability by standardizing formatting, including consistent indentation and spacing. - Updated styles across components to utilize new shadow and height constants for improved UI consistency. - Adjusted text sizes in multiple components to ensure uniformity in typography. --- packages/nextjs/services/api/apiClient.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nextjs/services/api/apiClient.ts b/packages/nextjs/services/api/apiClient.ts index cc8ed2c..12f469b 100644 --- a/packages/nextjs/services/api/apiClient.ts +++ b/packages/nextjs/services/api/apiClient.ts @@ -4,6 +4,7 @@ import axios, { AxiosError, AxiosInstance, AxiosResponse, InternalAxiosRequestCo import { API_BASE_URL } from "~~/constants"; import { API_TIMEOUT_DEFAULT, API_TIMEOUT_ZK } from "~~/constants/timing"; import { formatErrorMessage } from "~~/utils/formatError"; +import { API_TIMEOUT_DEFAULT, API_TIMEOUT_ZK } from "~~/constants/timing"; const AUTHORIZATION_HEADER = (accessToken: string) => `Bearer ${accessToken}`; From 58e88387aa21dd5a9f859a1430d4d15d0c36d837 Mon Sep 17 00:00:00 2001 From: BoHsuu <115441679+Huygon764@users.noreply.github.com> Date: Wed, 11 Mar 2026 17:29:00 +0700 Subject: [PATCH 3/4] refactor: enhance component structure and user feedback in NewAccount sections (#206) - Updated ChooseNetwork component to include wallet connection checks and commitment validation, enhancing user experience with appropriate notifications. - Adjusted StatusContainer to allow copying of commitment addresses to clipboard for better usability. - Enhanced Sidebar component to incorporate wallet connection status in navigation logic. --- .../components/Batch/BatchContainer.tsx | 6 +++- .../components/Batch/TransactionSummary.tsx | 31 ++++++++++++++----- packages/nextjs/services/api/apiClient.ts | 1 - 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/nextjs/components/Batch/BatchContainer.tsx b/packages/nextjs/components/Batch/BatchContainer.tsx index 93cecd6..febcefc 100644 --- a/packages/nextjs/components/Batch/BatchContainer.tsx +++ b/packages/nextjs/components/Batch/BatchContainer.tsx @@ -179,7 +179,11 @@ function BatchTransactions({ {/* Recipient */}
{matchedContact ? ( - +
= ({
{/* Header Section */}
- Batch transactions + Batch transactions
Transactions summary @@ -58,10 +58,7 @@ const TransactionSummary: React.FC = ({ ); return ( -
+
{/* Amount with Token Icon */}
{transaction.tokenIcon && ( @@ -77,14 +74,26 @@ const TransactionSummary: React.FC = ({ {/* Arrow */}
- Arrow Right + Arrow Right
{/* Recipient */}
{matchedContact ? (
- avatar + avatar {matchedContact.name} {"(" + `${formatAddress(transaction.recipient, { start: 3, end: 3 }) + ")"}`} @@ -92,7 +101,13 @@ const TransactionSummary: React.FC = ({
) : ( - avatar + avatar {formatAddress(transaction.recipient, { start: 3, end: 3 })} )} diff --git a/packages/nextjs/services/api/apiClient.ts b/packages/nextjs/services/api/apiClient.ts index 12f469b..cc8ed2c 100644 --- a/packages/nextjs/services/api/apiClient.ts +++ b/packages/nextjs/services/api/apiClient.ts @@ -4,7 +4,6 @@ import axios, { AxiosError, AxiosInstance, AxiosResponse, InternalAxiosRequestCo import { API_BASE_URL } from "~~/constants"; import { API_TIMEOUT_DEFAULT, API_TIMEOUT_ZK } from "~~/constants/timing"; import { formatErrorMessage } from "~~/utils/formatError"; -import { API_TIMEOUT_DEFAULT, API_TIMEOUT_ZK } from "~~/constants/timing"; const AUTHORIZATION_HEADER = (accessToken: string) => `Bearer ${accessToken}`; From cc77d2a1f3600ee615229596748c1b5cbcb83918 Mon Sep 17 00:00:00 2001 From: BoHsuu <115441679+Huygon764@users.noreply.github.com> Date: Fri, 20 Mar 2026 12:44:44 +0700 Subject: [PATCH 4/4] refactor: make signer ops optional in analytics report (#224) --- packages/backend/src/admin/admin.service.ts | 17 +++++++++++++++-- .../src/admin/dto/analytics-report.dto.ts | 9 +++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/admin/admin.service.ts b/packages/backend/src/admin/admin.service.ts index 6020e2d..d6f0784 100644 --- a/packages/backend/src/admin/admin.service.ts +++ b/packages/backend/src/admin/admin.service.ts @@ -101,6 +101,16 @@ export class AdminService { } const hasDateFilter = Object.keys(dateFilter).length > 0; + // Build included tx types based on params + const includedTxTypes: TxType[] = [TxType.TRANSFER, TxType.BATCH]; + if (dto?.includeSignerOps) { + includedTxTypes.push( + TxType.ADD_SIGNER, + TxType.REMOVE_SIGNER, + TxType.SET_THRESHOLD, + ); + } + // 1. LOGIN records if (dto?.includeLogin) { const loginRecords = await this.prisma.loginHistory.findMany({ @@ -136,10 +146,11 @@ export class AdminService { .map((a) => a.signers[0]?.user.commitment) .filter(Boolean); - // 3. APPROVE votes + // 3. APPROVE votes (filtered by includedTxTypes) const approveVotes = await this.prisma.vote.findMany({ where: { voteType: VoteType.APPROVE, + transaction: { type: { in: includedTxTypes } }, ...(hasDateFilter ? { createdAt: dateFilter } : {}), }, include: { transaction: true }, @@ -151,6 +162,7 @@ export class AdminService { ? await this.prisma.vote.findMany({ where: { voteType: VoteType.DENY, + transaction: { type: { in: includedTxTypes } }, ...(hasDateFilter ? { createdAt: dateFilter } : {}), }, include: { transaction: true }, @@ -158,10 +170,11 @@ export class AdminService { }) : []; - // 5. EXECUTE records + // 5. EXECUTE records (filtered by includedTxTypes) const executedTxs = await this.prisma.transaction.findMany({ where: { status: TxStatus.EXECUTED, + type: { in: includedTxTypes }, ...(hasDateFilter ? { executedAt: dateFilter } : {}), }, orderBy: { executedAt: 'asc' }, diff --git a/packages/backend/src/admin/dto/analytics-report.dto.ts b/packages/backend/src/admin/dto/analytics-report.dto.ts index 3118f4b..21cd90e 100644 --- a/packages/backend/src/admin/dto/analytics-report.dto.ts +++ b/packages/backend/src/admin/dto/analytics-report.dto.ts @@ -45,4 +45,13 @@ export class AnalyticsReportDto { @IsBoolean() @Transform(({ value }) => value === 'true' || value === true) includeClaim?: boolean; + + @ApiPropertyOptional({ + description: 'Include ADD_SIGNER, REMOVE_SIGNER, UPDATE_THRESHOLD records', + default: false, + }) + @IsOptional() + @IsBoolean() + @Transform(({ value }) => value === 'true' || value === true) + includeSignerOps?: boolean; }