Skip to content

Commit

Permalink
fix: review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
totraev committed Oct 4, 2024
1 parent 285102d commit d9e9169
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 42 deletions.
33 changes: 0 additions & 33 deletions src/app/context/mempool/BtcHeightProvider.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/hooks/useDelegations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
getDelegations,
type PaginatedDelegations,
} from "@/app/api/getDelegations";
import { ONE_MINUTE } from "@/app/constants";
import { useError } from "@/app/context/Error/ErrorContext";
import { useWallet } from "@/app/context/wallet/WalletProvider";
import { ErrorState } from "@/app/types/errors";
Expand All @@ -24,7 +25,7 @@ export function useDelegations({ enabled = true }: { enabled?: boolean } = {}) {
? lastPage?.pagination?.next_key
: null,
initialPageParam: "",
refetchInterval: 60000, // 1 minute
refetchInterval: ONE_MINUTE,
enabled: Boolean(publicKeyNoCoord) && enabled,
select: (data) => {
const flattenedData = data.pages.reduce<PaginatedDelegations>(
Expand Down
13 changes: 5 additions & 8 deletions src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import React from "react";

import { ErrorProvider } from "./context/Error/ErrorContext";
import { StakingStatsProvider } from "./context/api/StakingStatsProvider";
import { BtcHeightProvider } from "./context/mempool/BtcHeightProvider";
import { WalletProvider } from "./context/wallet/WalletProvider";
import { AppState } from "./state";

Expand All @@ -21,13 +20,11 @@ function Providers({ children }: React.PropsWithChildren) {
<ErrorProvider>
<WalletProvider>
<AppState>
<BtcHeightProvider>
<StakingStatsProvider>
<ReactQueryStreamedHydration>
{children}
</ReactQueryStreamedHydration>
</StakingStatsProvider>
</BtcHeightProvider>
<StakingStatsProvider>
<ReactQueryStreamedHydration>
{children}
</ReactQueryStreamedHydration>
</StakingStatsProvider>
</AppState>
</WalletProvider>
</ErrorProvider>
Expand Down

0 comments on commit d9e9169

Please sign in to comment.