DAO-1983 (C2/6): BlockTimeProvider + QueryClient default refetch#2093
Open
TravellerOnTheRun wants to merge 1 commit intodao-1983-c1from
Open
DAO-1983 (C2/6): BlockTimeProvider + QueryClient default refetch#2093TravellerOnTheRun wants to merge 1 commit intodao-1983-c1from
TravellerOnTheRun wants to merge 1 commit intodao-1983-c1from
Conversation
…O-1983 C2/6) Fetch average block time from Blockscout; set default refetch interval. Legacy AVERAGE_BLOCKTIME constant kept until call sites are migrated.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
cybervoid0
reviewed
Apr 14, 2026
| </BoosterProvider> | ||
| </BuilderContextProviderWithPrices> | ||
| </ConnectWalletProvider> | ||
| </BlockTimeProvider> |
Contributor
There was a problem hiding this comment.
wooooooooow! provider hell. Suggestion: use Zustand instead of providers. It reduces boilerplate and does't add extra providers
cybervoid0
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Hardcoded “refresh every 60s” and “assume N seconds per block” made the UI stale (on-chain data lagging real block time) and misleading for countdowns. This PR introduces a provider that loads the chain’s average block time, exposes it where needed, and sets React Query’s default
refetchIntervalso wagmi/on-chain reads can track the chain without every hook copying the same magic number.AVERAGE_BLOCKTIMEstays exported until later PRs finish migrating call sites—so the tree stays type-clean and CI stays green at each step.What to check
BlockTimeProviderafterQueryClientProvider.Stack
Depends on C1 (or
mainonce C1 is merged). Next: C3–C6 migrate hooks and finally remove the legacy constants.