Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable react-query cache in latest tx and blocks #732

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/732.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable react-query cache in the latest tx and blocks
11 changes: 10 additions & 1 deletion src/app/pages/ParatimeDashboardPage/LatestBlocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ export const LatestBlocks: FC<{ scope: SearchScope }> = ({ scope }) => {
// Listing the latest consensus blocks is not yet implemented.
// We should use useGetConsensusBlocks()
}
const blocksQuery = useGetRuntimeBlocks(network, layer, { limit })
const blocksQuery = useGetRuntimeBlocks(
network,
layer,
{ limit },
{
query: {
cacheTime: 0,
},
},
)

return (
<Card>
Expand Down
11 changes: 10 additions & 1 deletion src/app/pages/ParatimeDashboardPage/LatestTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ export const LatestTransactions: FC<{ scope: SearchScope }> = ({ scope }) => {
// Listing the latest consensus transactions is not yet supported.
// We should use useGetConsensusTransactions()
}
const transactionsQuery = useGetRuntimeTransactions(network, layer, { limit })
const transactionsQuery = useGetRuntimeTransactions(
network,
layer,
{ limit },
{
query: {
cacheTime: 0,
},
},
)

return (
<Card>
Expand Down