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: add my delegatee to Delegates page #1110

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

Sekhmet
Copy link
Member

@Sekhmet Sekhmet commented Jan 21, 2025

Summary

This is supported for delegate-registry and governor-subgraph.

Closes: https://github.com/snapshot-labs/workflow/issues/334

How to test

  1. Go to http://localhost:8080/#/sn:0x009fedaf0d7a480d21a27683b0965c0f8ded35b3f1cac39827a25a06a8a682a4/delegates
  2. Sign in with Starknet wallet.
  3. You see your delegation.
  4. Go to Ethereum tab.
  5. Connect with Ethereum wallet.
  6. You see your delegation.
  7. Go to: http://localhost:8080/#/s:cow.eth/delegates
  8. You see your delegation.
  9. You can undelegate from context menu (it delegates to zero address).
  10. Once undelegated (modal shows confirmed status) UI refetches latest data (so your delegation should disappear and delegators counts and VP should update for your previous delegatee).

Screenshots

image image

@Sekhmet Sekhmet requested review from wa0x6e and bonustrack January 22, 2025 13:27
@Sekhmet Sekhmet marked this pull request as ready for review January 22, 2025 13:27
@wa0x6e
Copy link
Contributor

wa0x6e commented Jan 22, 2025

Should we exclude delegations to the empty address 0x0000000000000000000000000000000000000000 ?

@wa0x6e
Copy link
Contributor

wa0x6e commented Jan 22, 2025

What's the 0.11% percentage based on ? From the full list below, 0.11% is more around 70k vCOW than 9

Screenshot 2025-01-22 at 22 59 21

@Sekhmet
Copy link
Member Author

Sekhmet commented Jan 22, 2025

@wa0x6e it's percentage of your VP relative to total VP this delegatee got.

@wa0x6e
Copy link
Contributor

wa0x6e commented Jan 22, 2025

Seems like the graphql delegates fetching is broken and always return an empty delegate list for ethereum

https://sekhmet-my-delegatee-preview-snapshot-devnet.on-fleek.app/#/sn:0x009fedaf0d7a480d21a27683b0965c0f8ded35b3f1cac39827a25a06a8a682a4/delegates

It works on prod: https://snapshot.box/#/sn:0x009fedaf0d7a480d21a27683b0965c0f8ded35b3f1cac39827a25a06a8a682a4/delegates

@Sekhmet Sekhmet force-pushed the sekhmet/my-delegatee branch from 410e6ea to f468c98 Compare January 23, 2025 12:19
apps/ui/src/components/SpaceDelegates.vue Outdated Show resolved Hide resolved
@bonustrack
Copy link
Member

To undelegate with an ERC20 Votes token you need to delegate to 0x0000000000000000000000000000000000000000 instead of self. The option to undelegate should appear even when I delegate to myself.

@Sekhmet Sekhmet force-pushed the sekhmet/my-delegatee branch from 7556bf9 to beba92e Compare January 27, 2025 09:12
@Sekhmet Sekhmet requested a review from wa0x6e January 27, 2025 09:14
@Sekhmet
Copy link
Member Author

Sekhmet commented Jan 27, 2025

Updated, also converted delegatee fetching to use vue-query as previous PR was merged. With this change when you undelegate after modal triggers confirmation data will be refetched (delegatee list and your own delegatee).

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

tACK

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.

3 participants