From e1e2d6fbf33ac4fcdb01a696dab2d62a79b5eff4 Mon Sep 17 00:00:00 2001 From: starknetdev Date: Mon, 23 Oct 2023 16:52:00 +0100 Subject: [PATCH] fix lords prefund check --- ui/src/app/components/intro/ArcadeIntro.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/src/app/components/intro/ArcadeIntro.tsx b/ui/src/app/components/intro/ArcadeIntro.tsx index 0354bcc22..81227e6f0 100644 --- a/ui/src/app/components/intro/ArcadeIntro.tsx +++ b/ui/src/app/components/intro/ArcadeIntro.tsx @@ -81,10 +81,11 @@ export const ArcadeIntro = ({ }; const checkNotEnoughPrefundEth = eth < parseInt(ETH_PREFUND_AMOUNT); + const checkNotEnoughPrefundLords = lords < parseInt(LORDS_PREFUND_AMOUNT); const checkAnyETh = eth === 0; useEffect(() => { - if (account && !checkNotEnoughPrefundEth && readDisclaimer) { + if (account && !checkNotEnoughPrefundLords && readDisclaimer) { setStep(4); } else if (account && readDisclaimer) { setStep(3); @@ -93,7 +94,7 @@ export const ArcadeIntro = ({ } else { setStep(1); } - }, [account, checkNotEnoughPrefundEth, readDisclaimer]); + }, [account, checkNotEnoughPrefundLords, readDisclaimer]); return ( <> @@ -233,9 +234,7 @@ export const ArcadeIntro = ({ } }} disabled={ - isWrongNetwork || - lords < parseInt(LORDS_PREFUND_AMOUNT) || - !account + isWrongNetwork || checkNotEnoughPrefundLords || !account } className="w-1/4 h-1/4" >