-
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
feat: integrate contract registries #370
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
a0137f9
to
70a9eb5
Compare
9bb935c
to
45c5ce0
Compare
9210c61
to
fd9de9a
Compare
fd9de9a
to
1b54632
Compare
1b54632
to
2c8b44b
Compare
2c8b44b
to
170a144
Compare
170a144
to
7d83d00
Compare
7d83d00
to
409b872
Compare
409b872
to
07576e6
Compare
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.
@ctrlc03 thanks, just some comments and questions
07576e6
to
bba7671
Compare
bba7671
to
49d3b08
Compare
49d3b08
to
c3370a8
Compare
@@ -29,7 +26,7 @@ import { getSemaphoreProof } from "~/utils/semaphore"; | |||
|
|||
import type { IVoteArgs, MaciContextType, MaciProviderProps } from "./types"; | |||
import type { PCD } from "@pcd/pcd-types"; | |||
import type { EIP1193Provider } from "viem"; | |||
import type { IPollData } from "~/utils/fetchPoll"; |
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.
I would suggest to put the IPollData
to the ~/utils/types
@@ -410,15 +408,14 @@ export const MaciProvider: React.FC<MaciProviderProps> = ({ children }: MaciProv | |||
|
|||
/// check the poll data and tally data | |||
useEffect(() => { | |||
setIsLoading(true); | |||
|
|||
// if we have the subgraph url then it means we can get the poll data through there | |||
if (config.maciSubgraphUrl) { |
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.
check if the user provided the maci subgraph url here, do we need a callback reminding user to provide the url if they don't? (instead of fetching the contract data as a backup method, we just remind them to provide the url)
isApproved?: boolean; | ||
isLoading?: boolean; | ||
} | ||
|
||
export const ApplicationItem = ({ | ||
id, | ||
index, |
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.
why rename id
to index
?
deleteBallot: () => void; | ||
ballotContains: (id: string) => Vote | undefined; | ||
ballotContains: (index: number) => Vote | undefined; |
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.
ballotContains
should also be receiving projectIndex
? maybe we should name the arguments in consistency
() => (rawReturn.data && rawReturn.data.length > 0) || (refetchedData && refetchedData.length > 0), | ||
[rawReturn.data, refetchedData], | ||
); | ||
// determine whether the project is approved ornot |
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.
typo: approved or not
|
||
<i className="text-sm">Applications can be edited and approved until the Application period ends.</i> | ||
</p> | ||
<i className="text-sm">Applications can be edited and approved until the Application period ends.</i> |
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.
we cannot edit now, right? thinking about remove the "edited" wording, add it back only after we have this function?
* @param id - the application ID | ||
* @returns the application | ||
*/ | ||
export async function fetchApplicationById(registryAddress: string, id: string): Promise<IRequest> { |
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.
I don't quite understand the difference between fetchApplicationById
and fetchApplicationByProjectId
?(=> what's the difference between project id and application id?) for me to imagine the need of the organizer, should be
- fetch application by recipient address (since the payout page might need this, or in the future if we wanna build a page for the applicants to manage their uploaded application)
- fetch application by project id = application id (for display single application detail on the
/projects/:projectId
page - fetch application by request id (? (maybe be used on the organizer managing applications page?)
/** | ||
* Whether it was approved or not | ||
*/ | ||
initialized?: boolean; |
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.
just a question: why this is called initialized
instead of something like isApproved
?
…ter-registries fix: clear selected checkbox after approved
Integrate contract registries into the interface.
To fix:
To finish:
re #263