Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fetch user votes before Oct #128

Open
gpxl-dev opened this issue Oct 12, 2023 · 0 comments
Open

Don't fetch user votes before Oct #128

gpxl-dev opened this issue Oct 12, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gpxl-dev
Copy link
Contributor

https://github.com/airswap/airswap-voter-rewards/blob/73bbaf2952ddea70f6ed5b829dd67be7eafa1321/src/features/votes/hooks/useUserVotes.ts#L6-L25

Votes query fetches every vote the user has made in the space. For production we only care about proposal groups since launch so should trim the search.

There's already a startTimestamp param for this that we can use, see below: https://github.com/airswap/airswap-voter-rewards/blob/73bbaf2952ddea70f6ed5b829dd67be7eafa1321/src/features/votes/hooks/useGroupedProposals.ts#L49-L52

https://github.com/airswap/airswap-voter-rewards/blob/73bbaf2952ddea70f6ed5b829dd67be7eafa1321/src/features/votes/hooks/useSnapshotConfig.ts#L3-L19

@gpxl-dev gpxl-dev added enhancement New feature or request good first issue Good for newcomers labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant