From fa2d0f3583f4bdb06c75e79ae78093323db49619 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 18 Oct 2024 19:34:46 +0800 Subject: [PATCH] fix: null bigint error --- apps/renderer/src/modules/wallet/balance.tsx | 2 +- locales/errors/en.json | 1 + packages/shared/src/hono.ts | 20 -------------------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/apps/renderer/src/modules/wallet/balance.tsx b/apps/renderer/src/modules/wallet/balance.tsx index d66ceb8250..2b77b740fb 100644 --- a/apps/renderer/src/modules/wallet/balance.tsx +++ b/apps/renderer/src/modules/wallet/balance.tsx @@ -20,7 +20,7 @@ export const Balance = ({ withSuffix?: boolean withTooltip?: boolean }) => { - const n = [BigInt(children) || BigInt(value || 0n), 18] as const + const n = [BigInt(children || 0n) || BigInt(value || 0n), 18] as const const formatted = format(n, { digits: precision, trailingZeros: true }) const formattedFull = format(n, { digits: 18, trailingZeros: true }) diff --git a/locales/errors/en.json b/locales/errors/en.json index afdb250cf0..32ee1f9ccd 100644 --- a/locales/errors/en.json +++ b/locales/errors/en.json @@ -23,6 +23,7 @@ "4002": "Insufficient balance", "4003": "Feed insufficient withdrawable balance", "4004": "Target user wallet error", + "4005": "Daily power calculation in progress", "5000": "Invitation limit exceeded. Please try again in a few days.", "5001": "Invitation already exists.", "5002": "Invitation code already used.", diff --git a/packages/shared/src/hono.ts b/packages/shared/src/hono.ts index 6aaec00eed..793ff12e9c 100644 --- a/packages/shared/src/hono.ts +++ b/packages/shared/src/hono.ts @@ -4365,22 +4365,6 @@ declare const levels: drizzle_orm_pg_core.PgTableWithColumns<{ baseColumn: never; generated: undefined; }, {}, {}>; - statusUpdatedAt: drizzle_orm_pg_core.PgColumn<{ - name: "status_updated_at"; - tableName: "levels"; - dataType: "date"; - columnType: "PgTimestamp"; - data: Date; - driverParam: string; - notNull: false; - hasDefault: false; - isPrimaryKey: false; - isAutoincrement: false; - hasRuntimeDefault: false; - enumValues: undefined; - baseColumn: never; - generated: undefined; - }, {}, {}>; powerToken: drizzle_orm_pg_core.PgColumn<{ name: "power_token"; tableName: "levels"; @@ -4422,7 +4406,6 @@ declare const levelsOpenAPISchema: zod.ZodObject<{ level: zod.ZodNullable; prevActivityPoints: zod.ZodNullable; activityPoints: zod.ZodNullable; - statusUpdatedAt: zod.ZodNullable; powerToken: zod.ZodString; userId: zod.ZodString; }, zod.UnknownKeysParam, zod.ZodTypeAny, { @@ -4433,7 +4416,6 @@ declare const levelsOpenAPISchema: zod.ZodObject<{ level: number | null; prevActivityPoints: number | null; activityPoints: number | null; - statusUpdatedAt: string | null; }, { userId: string; address: string; @@ -4442,7 +4424,6 @@ declare const levelsOpenAPISchema: zod.ZodObject<{ level: number | null; prevActivityPoints: number | null; activityPoints: number | null; - statusUpdatedAt: string | null; }>; declare const levelsRelations: drizzle_orm.Relations<"levels", { wallet: drizzle_orm.One<"wallets", true>; @@ -5149,7 +5130,6 @@ declare const _routes: hono_hono_base.HonoBase