There was an error while loading. Please reload this page.
1 parent 251b918 commit 2666394Copy full SHA for 2666394
1 file changed
src/components/transactions/GovVote/GovVoteActions.tsx
@@ -294,7 +294,13 @@ export const GovVoteActions = ({
294
success: true,
295
});
296
297
+ // The relay indexes the VoteEmitted event asynchronously, so this immediate
298
+ // refetch usually races ahead of the indexer. Refetch again after a short
299
+ // delay to pick up the freshly-cast vote.
300
queryClient.invalidateQueries({ queryKey: queryKeysFactory.governanceCache });
301
+ setTimeout(() => {
302
+ queryClient.invalidateQueries({ queryKey: queryKeysFactory.governanceCache });
303
+ }, 8000);
304
return;
305
} catch (err) {
306
// Relayer temporarily down — fall back to a self-paid vote. Any other relay
0 commit comments