Skip to content

Commit

Permalink
hotfix hook cache reward
Browse files Browse the repository at this point in the history
  • Loading branch information
haunv3 committed Dec 21, 2023
1 parent bccc380 commit de58abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/Pools/hooks/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ export const useFetchCacheRewardAssetForAllPools = (lpAddresses: string[]) => {

useEffect(() => {
const isLpAddressesLength = lpAddresses?.length;
const isCacheReward = !cachedReward || !cachedReward.length || cachedReward.length < isLpAddressesLength;
if (isCacheReward && isLpAddressesLength > 0) {
const isNotCacheReward = !cachedReward || !cachedReward.length || cachedReward.length < isLpAddressesLength;
if (isNotCacheReward && isLpAddressesLength > 0) {
fetchReward();
}
}, [lpAddresses, cachedReward]);
Expand Down

0 comments on commit de58abe

Please sign in to comment.