-
Notifications
You must be signed in to change notification settings - Fork 16
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 useDAOProposalById #1317
Conversation
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 think we should extract the conversion code instead of copying it
eg: create gnoToAppProposal
and cosmwasmToAppProposal
and use it in both "proposals" and "proposalById" hooks
Done |
New hook: https://github.com/TERITORI/teritori-dapp/blob/feat-use-dao-proposal-by-id/packages/hooks/dao/useDAOProposalById.ts#L23
It uses existing backend stuff
listProposals
(Cosmos) andgetProposalJSON
(Gno)Pretty the same as
useDAOProposals
, but for "proposal by id": https://github.com/TERITORI/teritori-dapp/blob/feat-use-dao-proposal-by-id/packages/hooks/dao/useDAOProposals.ts#L49