Skip to content

DAO-1983 (C3/6): Migrate hooks — collective rewards & fund (batch 1)#2094

Open
TravellerOnTheRun wants to merge 1 commit into
dao-1983-c2from
dao-1983-c3
Open

DAO-1983 (C3/6): Migrate hooks — collective rewards & fund (batch 1)#2094
TravellerOnTheRun wants to merge 1 commit into
dao-1983-c2from
dao-1983-c3

Conversation

@TravellerOnTheRun

Copy link
Copy Markdown
Contributor

Why

Once defaults come from real block time, hooks should stop repeating the old AVERAGE_BLOCKTIME import. This batch migrates the first set of collective-rewards and related hooks to inherit the QueryClient default, and uses refetchInterval: false where a query is backed by our HTTP APIs or should not poll on a timer.

What to check

  • Collective rewards surfaces still update after on-chain actions.
  • No new periodic traffic to backend routes from these hooks.

Stack

C3 builds on C2 (provider + defaults). Merge after C2 is on your target branch.

… (DAO-1983 C3/6)

Stop passing AVERAGE_BLOCKTIME; inherit QueryClient default. Explicit
refetchInterval: false where queries are API-backed or should not poll.
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA fdf9693.
Ensure 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 Files

None

@TravellerOnTheRun TravellerOnTheRun self-assigned this Apr 13, 2026
@TravellerOnTheRun TravellerOnTheRun requested a review from a team April 13, 2026 12:50
import { useEffect, useState } from 'react'

import { AVERAGE_BLOCKTIME } from '@/lib/constants'
import { useBlockTime } from '@/shared/context/BlockTimeContext'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure you wrapped this into a provider necessary for t his hook

args: [address!],
query: {
refetchInterval: AVERAGE_BLOCKTIME,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing refetchInterval assumes the global QueryClient default is applied here. Can you confirm this hook picks up that default? Otherwise polling stops entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants