Skip to content

Commit

Permalink
fix lords prefund check
Browse files Browse the repository at this point in the history
  • Loading branch information
starknetdev committed Oct 23, 2023
1 parent f73cedc commit e1e2d6f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ui/src/app/components/intro/ArcadeIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -93,7 +94,7 @@ export const ArcadeIntro = ({
} else {
setStep(1);
}
}, [account, checkNotEnoughPrefundEth, readDisclaimer]);
}, [account, checkNotEnoughPrefundLords, readDisclaimer]);

return (
<>
Expand Down Expand Up @@ -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"
>
Expand Down

1 comment on commit e1e2d6f

@vercel
Copy link

@vercel vercel bot commented on e1e2d6f Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.