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

fix: use checksum addresses in delegations #5

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

ChaituVR
Copy link
Member

Fixes #7

  • Using the checksummed address to calculate delegation voting power

How to test

  • Try this query
query ($first: Int!, $skip: Int!, $orderBy: Delegate_orderBy!, $orderDirection: OrderDirection!, $governance: String!) {
  delegates(
    first: $first
    skip: $skip
    orderBy: $orderBy
    orderDirection: $orderDirection
    where: {tokenHoldersRepresentedAmount_gte: 0, governance: $governance}
  ) {
    id
    user
    delegatedVotes
    delegatedVotesRaw
    tokenHoldersRepresentedAmount
  }
  governance(id: $governance) {
    delegatedVotes
    totalDelegates
  }
}

variable

{
  "orderBy": "delegatedVotes",
  "orderDirection": "desc",
  "skip": 0,
  "first": 40,
  "governance": "moxie.eth"
}

Before the fix, it will return empty delegations. and after fix it will return delegations

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

tACK

@Sekhmet Sekhmet merged commit 3594434 into master Nov 27, 2024
1 check passed
@Sekhmet Sekhmet deleted the fix-use-checksummed-addresses branch November 27, 2024 12:55
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.

bug: delegates page is empty
2 participants