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

Poll latest proposals #225

Open
statictype opened this issue Jul 4, 2023 · 1 comment
Open

Poll latest proposals #225

statictype opened this issue Jul 4, 2023 · 1 comment

Comments

@statictype
Copy link
Contributor

The app should fetch the latest proposals for a setup

  • on page load
  • after a transaction is finalized
  • on a regular interval in case it was approved by someone else

Right now we use React Query to ratify and cancel proposals and re-fetch the latest ones from multisig pallet storage on success. The block needs to be finalized before the proposals state changes, so in order for React Query to properly update we need to wait.

@peetzweg
Copy link
Member

peetzweg commented Jul 5, 2023

One capability of react-query which helps with this would be the options you could pass to a useQuery how fast data becomes stale and or the interval it should just be refetched automatically.

https://tanstack.com/query/latest/docs/react/reference/useQuery

Can't sent a direct link to the section but check out:

refetchInterval
refetchIntervalInBackground
refetchOnWindowFocus
etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants