From d439a2e1c0643aaf179cae3d1383c7a5477ee85d Mon Sep 17 00:00:00 2001 From: mantikoros Date: Fri, 4 Feb 2022 17:40:03 -0600 Subject: [PATCH] create page: fix ante resetting --- web/pages/create.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index b1c44df7..94c0e92e 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -64,11 +64,11 @@ export function NewContract(props: { question: string; tag?: string }) { const [ante, setAnte] = useState(undefined) useEffect(() => { - if (creator) { + if (ante === undefined && creator) { const initialAnte = creator.balance < 100 ? 10 : 100 setAnte(initialAnte) } - }, [creator]) + }, [ante, creator]) const [anteError, setAnteError] = useState() // By default, close the market a week from today