Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
siibars committed Oct 24, 2024
1 parent fc7623c commit 9fd65c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/UI/Stake/hooks/useBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const useBalance = () => {
);

const { pooledStakesData } = usePooledStakes();
const assets = pooledStakesData.assets ? new BN(pooledStakesData.assets) : new BN(0);
const assets = new BN(pooledStakesData.assets);

Check failure on line 54 in app/components/UI/Stake/hooks/useBalance.ts

View workflow job for this annotation

GitHub Actions / scripts (lint)

The 'assets' object construction makes the dependencies of useMemo Hook (at line 58) change on every render. To fix this, wrap the initialization of 'assets' in its own useMemo() Hook

Check failure on line 54 in app/components/UI/Stake/hooks/useBalance.ts

View workflow job for this annotation

GitHub Actions / scripts (lint)

The 'assets' object construction makes the dependencies of useMemo Hook (at line 63) change on every render. To fix this, wrap the initialization of 'assets' in its own useMemo() Hook

Check warning on line 55 in app/components/UI/Stake/hooks/useBalance.ts

View workflow job for this annotation

GitHub Actions / scripts (lint)

Trailing spaces not allowed
const formattedStakedBalanceETH = useMemo(
() => `${renderFromWei(assets)} ETH`,
Expand All @@ -73,7 +73,7 @@ const useBalance = () => {
balanceFiat,
balanceWei,
balanceFiatNumber,
stakedBalanceWei: assets,
stakedBalanceWei: pooledStakesData.assets ?? '0',
formattedStakedBalanceETH,
stakedBalanceFiatNumber,
formattedStakedBalanceFiat,
Expand Down

0 comments on commit 9fd65c1

Please sign in to comment.