Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
fix: avoid placeholderData option in queryClient (#1078)
Browse files Browse the repository at this point in the history
* fix: remove placeholderData setup in query client

* chore: bump wagmi, viem and usehooks-ts
  • Loading branch information
agualis committed Sep 16, 2024
1 parent 79a224e commit 1136a3e
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 132 deletions.
13 changes: 0 additions & 13 deletions app/react-query.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@ export const queryClient = new QueryClient({
}),
})

queryClient.setDefaultOptions({
queries: {
/* Avoids problems in simulation and build queries when the user navigates away from the page while waiting for a tx confirmation.
Without this option, navigating to another tab and coming back was causing useRemoveLiquidityBuildCallDataQuery to be undefined leading to unexpected thrown errors.
This is equivalent to setting the old keepPreviousData: true option
More info:
https://github.com/TanStack/query/discussions/6460
*/
placeholderData: (prev: any) => prev,
},
})

export function ReactQueryClientProvider({ children }: { children: ReactNode | ReactNode[] }) {
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
"tinycolor2": "^1.6.0",
"use-debounce": "^10.0.0",
"use-sound": "^4.0.1",
"usehooks-ts": "^2.9.2",
"viem": "^2.19.3",
"wagmi": "^2.12.5"
"usehooks-ts": "^3.1.0",
"viem": "^2.21.6",
"wagmi": "^2.12.11"
},
"devDependencies": {
"@apollo/experimental-nextjs-app-support": "^0.8.0",
Expand Down
Loading

0 comments on commit 1136a3e

Please sign in to comment.