Skip to content

[Subgraph] Handle initiative unregistration#1195

Open
cyril-dfi wants to merge 2 commits intomainfrom
initiatives-filtering
Open

[Subgraph] Handle initiative unregistration#1195
cyril-dfi wants to merge 2 commits intomainfrom
initiatives-filtering

Conversation

@cyril-dfi
Copy link
Copy Markdown
Collaborator

No description provided.

@cyril-dfi cyril-dfi marked this pull request as draft January 21, 2026 13:52
@cyril-dfi cyril-dfi marked this pull request as ready for review January 21, 2026 14:36
@cyril-dfi cyril-dfi linked an issue Jan 21, 2026 that may be closed by this pull request
enabled: !!userAddress,
queryKey: ["userVotedInitiatives", userAddress],
queryFn: async () => {
const history = await getUserAllocationHistory(userAddress!);
Copy link
Copy Markdown
Collaborator

@danielattilasimon danielattilasimon Mar 1, 2026

Choose a reason for hiding this comment

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

It's not a huge deal, but technically, this duplicates the fetching of user allocation history. It could be eliminated via a useUserAllocationHistory hook, which could be used in useBribingClaim & useUserVotedInitiatives.

This is really only a concern when the subgraph is being used (not the default behavior), since by default the data will be fetched from api.liquity.org, in which case the duplicate request will find the data in the browser's cache.

Copy link
Copy Markdown
Collaborator

@danielattilasimon danielattilasimon left a comment

Choose a reason for hiding this comment

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

Looks good! I've started redeploying the subgraph, it'll probably take a few days to propagate.

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.

[Subgraph] Handle initiative unregistration

2 participants