Skip to content

Commit 29e337b

Browse files
authored
refetch only if stale (#788)
* refetch only if stale * Create perfect-tables-do.md
1 parent bc65408 commit 29e337b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/perfect-tables-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wallet": patch
3+
---
4+
5+
refetch only if stale

apps/wallet/src/hooks/use-synchronized-refetch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ export function useSynchronizedRefetch(address: string) {
4848

4949
await Promise.all(
5050
activeQueries.map(async query => {
51-
await queryClient.invalidateQueries({ queryKey: query.queryKey })
5251
await queryClient.refetchQueries({
5352
queryKey: query.queryKey,
5453
exact: true,
54+
stale: true,
5555
})
5656
}),
5757
)

0 commit comments

Comments
 (0)