-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Operators and Nominator Roles Verification #577
Conversation
✅ Deploy Preview for dev-astral ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Description updated to latest commit (d649cfc) |
PR Review
Code feedback:✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
We just need to get you the role IDs as everything else should already be in place here @marc-aurele-besner? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few small questions / comments left
@EmilFattakhov for your comment in .env.sample These values should not be on this file, since this PR does not have any GitHub OpenID logic, the GitHub implementation is #578. To answer your question, atm I only implemented the OpenID connect flow in the subsequent PR, but I did not implement any specific logic, waiting to know what will make sense. |
Co-authored-by: Emil Fattakhov <[email protected]>
I already set up the roles in the dev discord server, so as soon as this PR is merged on staging, it should be testable with the dev server. For production, indeed, we will need to create the "Verified X" role and communicate with me the role ID 👍 |
User description
Add Operators and Nominator Roles Verification
This add role verification logic for Operators and Nominators
Type
Enhancement, Bug fix
Description
Changes walkthrough
gql.ts
Update GraphQL Queries and Functions for Role Checks
explorer/gql/gql.ts
CheckRole
GraphQL query to include checks for operator andnominator roles.
graphql
function to use the updatedCheckRole
querystructure.
graphql.ts
Update GraphQL Types for Role Verification
explorer/gql/graphql.ts
CheckRoleQuery
type to include operator and nominatorfields.
GetDiscordRoles.tsx
Refactor Discord Role Components and Logic
explorer/src/components/WalletSideKick/GetDiscordRoles.tsx
GetDiscordRoles
component to handle multiple roles andrenamed it to
SubspaceWalletFlow
.DiscordFlow
component for Discord connection logic.query.ts
Update GraphQL Query for Role Checks
explorer/src/components/WalletSideKick/query.ts
QUERY_CHECK_ROLE
toQUERY_CHECK_ROLES
and updated it to checkfor multiple roles.
discord.ts
Enhance Discord Authentication for Multiple Roles
explorer/src/utils/auth/providers/discord.ts
operator, nominator).
subspace.ts
Update Subspace Provider for Role Verification
explorer/src/utils/auth/providers/subspace.ts
nominator).
index.ts
Add Utility Functions for Discord Role Management
explorer/src/utils/auth/vcs/discord/index.ts
Discord.
index.ts
Update Subspace VCS for Multiple Role Checks
explorer/src/utils/auth/vcs/subspace/index.ts