Skip to content

Commit

Permalink
fix: prevent getMainPools from being called twice (#1590)
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy authored Oct 16, 2023
1 parent f1ebb41 commit a1f8d20
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const useGetPendingRewards = (input: TrimmedGetPendingRewardsInput, options?: Op

// Get Comptroller addresses of isolated pools
const { data: getPoolsData, isLoading: isGetPoolsLoading } = useGetPools({
accountAddress: input.accountAddress,
accountAddress: input.accountAddress || undefined,
});

const isolatedPoolComptrollerAddresses = useMemo(
Expand All @@ -68,7 +68,9 @@ const useGetPendingRewards = (input: TrimmedGetPendingRewardsInput, options?: Op

// Get XVS vesting vault pool count
const { data: getXvsVaultPoolCountData, isLoading: isGetXvsVaultPoolCountLoading } =
useGetXvsVaultPoolCount();
useGetXvsVaultPoolCount({
enabled: options?.enabled,
});
const xvsVestingVaultPoolCount = getXvsVaultPoolCountData?.poolCount || 0;

// Sort addresses to output the same data when providing them in a different
Expand Down

0 comments on commit a1f8d20

Please sign in to comment.