From 65845268f9940247d3b645b1588d1564ec0b4cff Mon Sep 17 00:00:00 2001 From: Liuzh Date: Wed, 6 Nov 2024 00:20:03 +0800 Subject: [PATCH] fix: prevent withdrawal of zero amount to avoid unnecessary fees (#1422) --- apps/renderer/src/modules/power/my-wallet-section/withdraw.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/renderer/src/modules/power/my-wallet-section/withdraw.tsx b/apps/renderer/src/modules/power/my-wallet-section/withdraw.tsx index c10155b5d7..92f6e0e29c 100644 --- a/apps/renderer/src/modules/power/my-wallet-section/withdraw.tsx +++ b/apps/renderer/src/modules/power/my-wallet-section/withdraw.tsx @@ -49,7 +49,7 @@ const WithdrawModalContent = ({ dismiss }: { dismiss: () => void }) => { const formSchema = z.object({ address: z.string().startsWith("0x").length(42), - amount: z.number().min(0).max(cashablePowerTokenNumber), + amount: z.number().positive().max(cashablePowerTokenNumber), }) const form = useForm>({