Skip to content

Commit

Permalink
fix: only allow bigint eth balance as a valid balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Jul 9, 2024
1 parent 171e181 commit 53002df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/staking/app/faucet/AuthModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ export const AuthModule = () => {
};

const ethAmount = useMemo(() => {
if (ethBalance) {
if (typeof ethBalance === 'bigint') {
return parseFloat(formatEther(ethBalance));
}
return 0;
return null;
}, [ethBalance]);

useEffect(() => {
Expand Down

0 comments on commit 53002df

Please sign in to comment.