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] useDaoContext hook #3

Open
ivelin opened this issue Sep 5, 2022 · 2 comments
Open

[FEAT] useDaoContext hook #3

ivelin opened this issue Sep 5, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@ivelin
Copy link
Collaborator

ivelin commented Sep 5, 2022

Is your feature request related to a problem? Please describe.
When users navigate into pages that offer information and transactions in the context of a Kali DAO, they usually need to know the chain id and address of the DAO in order to fetch the correct underlying data and respectively submit contract write transactions correctly. This information is also used to make sure that the user is connected to the chain where the DAO is hosted before submitting a contract write transaction.

The hook can also offer a method to create a URL pre-populated with the DAO context parameters to be used in links to pages with a specific DAO context.

Describe the solution you'd like
Provide a react hook that extracts chain ID and address from router router correctly. Each app may provide its own configuration settings how the hook should map router params to values.

Describe alternatives you've considered
Currently each app handles its own way of parameterizing DAO context for pages, extract the context and create links. It makes it error prone and repetitive, especially when apps want to cross-link to each other's pages. For example when a SporosDAO app page (DAO projects) wants to link to a Kali DAO page (DAO registration page).

@ivelin ivelin added the enhancement New feature or request label Sep 5, 2022
@audsssy
Copy link

audsssy commented Sep 8, 2022

Would it be possible to also add other basic DAO related info, e.g., name(), symbol(), decimals(), in addition to chain ID and address, for UI purposes?

Usage of proposed data is not universal on all pages, so I'm not sure if it makes sense to create a separate hook or consolidate into this one.

@ivelin
Copy link
Collaborator Author

ivelin commented Sep 13, 2022

Would it be possible to also add other basic DAO related info, e.g., name(), symbol(), decimals(), in addition to chain ID and address, for UI purposes?

Yes, these are pretty common and won't cost any additional round-trips to pull.

Usage of proposed data is not universal on all pages, so I'm not sure if it makes sense to create a separate hook or consolidate into this one.

Proposals can get complicated. Maybe keep this one clean and simple for basic DAO info. Need to think how to introduce proposal context in a hook. It think it ties to keeping subgraph updated, so that json structures are pulled quickly for any proposal by ID and have all the data the UI would expect. Currently the subgraph does not correctly pull ProjectManagement data and is only deployed on Goerli. We should probably open a separate issue to discuss how to manage extension type proposals. I talked to another developer today who is building a Kali extension for Gnosis. Hopefully one of many to come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants