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

chore: refactor polls #2859

Merged
merged 3 commits into from
May 15, 2023
Merged

chore: refactor polls #2859

merged 3 commits into from
May 15, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented May 15, 2023

What does this PR do?

🤖 Generated by Copilot at dbab92f

Refactored the Snapshot component to use a worker for fetching proposal data, renamed some variables and functions for clarity, and added a new handler function to the snapshot-relay worker. These changes improve the performance, readability, and consistency of the code.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at dbab92f

  • Replace useSpaceQuery hook with useQuery hook that calls getSnapshotProposal function to fetch proposal data from snapshot-relay worker (link,link)
  • Add conditional check to return null if proposal data is falsy in Snapshot component (link)
  • Add getSpaceId handler function to snapshot-relay worker that queries Snapshot API for proposal data and returns JSON response (link)
  • Rename snapshotId parameter to proposalId in generateSnapshotAccount function and documentation to avoid confusion with Snapshot API (link,link)
  • Rename PROPOSAL_CREATOR_TESTNET_PRIVATE_KEY environment variable to TESTNET_PROPOSAL_CREATOR_PRIVATE_KEY in snapshot-relay worker .dev.vars file to match naming convention (link)

Emoji

🆕🔧📝

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview May 15, 2023 3:46pm
ui ✅ Ready (Inspect) Visit Preview May 15, 2023 3:46pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
web ⬜️ Ignored (Inspect) Visit Preview May 15, 2023 3:46pm

@vercel vercel bot temporarily deployed to Preview – ui May 15, 2023 15:01 Inactive
@vercel vercel bot temporarily deployed to Preview – web May 15, 2023 15:04 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 15, 2023 15:04 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 15, 2023 15:36 Inactive
@vercel vercel bot temporarily deployed to Preview – web May 15, 2023 15:39 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 15, 2023 15:40 Inactive
@bigint bigint enabled auto-merge (squash) May 15, 2023 15:43
@bigint bigint disabled auto-merge May 15, 2023 15:45
@bigint bigint enabled auto-merge (squash) May 15, 2023 15:45
@vercel vercel bot temporarily deployed to Preview – prerender May 15, 2023 15:46 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 15, 2023 15:46 Inactive
@bigint bigint merged commit 04a116b into main May 15, 2023
@bigint bigint deleted the refactor-polls branch May 15, 2023 15:52
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.

1 participant