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

feat: consume new snapshot relay for polls #2789

Merged
merged 12 commits into from
May 3, 2023
Merged

feat: consume new snapshot relay for polls #2789

merged 12 commits into from
May 3, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented May 3, 2023

  • feat: init snapshot relay
  • feat: add mvp snapshot relay
  • chore: update bootstrap command
  • doc: update readme
  • chore: add network check
  • chore: consume new snapshot-relay

What does this PR do?

🤖 Generated by Copilot at f7f00a6

Refactored the useCreatePoll hook to use a custom relay worker for creating polls on Snapshot. Fixed a visual bug in the EnableMessages component. Added a constant for the relay worker URL.

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 f7f00a6

  • Refactored the useCreatePoll hook to use a custom relay worker instead of the snapshot client (link, link)
  • Removed unused dependencies from useCreatePoll.tsx (link)
  • Added axios and SNAPSHOR_RELAY_WORKER_URL dependencies to useCreatePoll.tsx (link)
  • Changed the createPoll function to use axios.post to send the poll data to the relay worker and return the response data (link)
  • Added the SNAPSHOR_RELAY_WORKER_URL constant to the constants.ts file to store the URL of the relay worker (link)
    • Used the IS_PRODUCTION and IS_MAINNET flags to determine the appropriate URL for the environment (link)
  • Fixed a visual bug in the EnableMessages component (link)
    • Removed the border-green-400/20 class from the Card component in EnableMessages.tsx to make the border opacity consistent with the background opacity (link)

Emoji

🐛🔧♻️

@vercel
Copy link

vercel bot commented May 3, 2023

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

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview May 3, 2023 7:11am
ui ✅ Ready (Inspect) Visit Preview May 3, 2023 7:11am
web ✅ Ready (Inspect) Visit Preview May 3, 2023 7:11am

@vercel vercel bot temporarily deployed to Preview – prerender May 3, 2023 07:08 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 3, 2023 07:08 Inactive
@bigint bigint merged commit f9b709a into main May 3, 2023
@bigint bigint deleted the snapshot-relay branch May 3, 2023 07:16
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.

None yet

1 participant