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

Subgraph mapping for recipient removal for simple/kleros recipient registry #478

Open
yuetloo opened this issue Mar 10, 2022 · 0 comments · Fixed by #538
Open

Subgraph mapping for recipient removal for simple/kleros recipient registry #478

yuetloo opened this issue Mar 10, 2022 · 0 comments · Fixed by #538
Assignees

Comments

@yuetloo
Copy link
Collaborator

yuetloo commented Mar 10, 2022

This issue was introduced by PR #473

The issue is to revisit the definition of the recipient entity in subgraph.

Currently, the "removeRecipient" mapping rule marked recipient as 'rejected' in the subgraph when the recipient was deleted from the contract. (note: this logic only applies to simple and Kleros registry, optimistic registry has different logic).

See RecipientMapping.ts, removeRecipient() function for the mark 'rejected' code.

Also, in the function getRegistryInfo() in file /api/recipient-registry.ts, the logic gets the recipientCount from the registry contract instead of from the subgraph because it cannot simply count the recipient records. The recipient entity in the subgraph does not store recipient entity. Instead it stores the operation( requests ) on recipients generated from the optimistic recipient registry.

Screen Shot 2022-03-10 at 11 09 11 AM

Will leave this issue to be tackled at a later time because the UI code that depends on the information is currently retrieving information that it needs from the contract directly as opposed to from the subgraph. This is to keep the scope of the original PR small.

@yuetloo yuetloo self-assigned this Mar 10, 2022
yuetloo pushed a commit that referenced this issue Apr 28, 2022
Wrap behavior when copying tx hash
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 a pull request may close this issue.

1 participant