Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-babylonlabs committed Sep 14, 2024
1 parent be52fbc commit ff8b65e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/app/context/api/DelegationsPointsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ interface PointsContextType {
error: Error | null;
}

interface DelegationsPointsProviderProps {
children: React.ReactNode;
publicKeyNoCoord: string;
delegationsAPI: Delegation[];
isWalletConnected: boolean;
address: string;
}

const MAX_DELEGATION_POINTS_BATCH_SIZE = 60;
const DelegationsPointsContext = createContext<PointsContextType | undefined>(
undefined,
);
Expand All @@ -25,16 +34,6 @@ export const useDelegationsPoints = () => {
return context;
};

interface DelegationsPointsProviderProps {
children: React.ReactNode;
publicKeyNoCoord: string;
delegationsAPI: Delegation[];
isWalletConnected: boolean;
address: string;
}

const MAX_DELEGATION_POINTS_BATCH_SIZE = 60;

export const DelegationsPointsProvider: React.FC<
DelegationsPointsProviderProps
> = ({
Expand Down Expand Up @@ -82,6 +81,7 @@ export const DelegationsPointsProvider: React.FC<
!isGeoBlocked,
refetchInterval: 300000, // Refetch every 5 minutes
refetchOnWindowFocus: false,
retry: 1,
});

useEffect(() => {
Expand Down

0 comments on commit ff8b65e

Please sign in to comment.