-
Notifications
You must be signed in to change notification settings - Fork 7
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
Skip useDelegateVote #1641
Skip useDelegateVote #1641
Conversation
✅ Deploy Preview for fractal-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -16,7 +15,7 @@ const useDelegateVote = () => { | |||
successCallback, | |||
}: { | |||
delegatee: string; | |||
votingTokenContract: VotesERC20 | LockRelease; | |||
votingTokenContract: LockRelease; |
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.
Can downscope the type here to just LockRelease, because we'll skip over this useDelegateVote
hook completely from the DelegateModal
and just call useTransaction
directly.
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.
Took me a while to get this, but now that I do, I'm wondering what this hook is truly meant for. Specifically, why did you choose to directly use contractCallViem
for votingTokenContract
but use delegateVote
for lockReleaseContract
(in DelegateModal
)?
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.
@DarksightKellar I also do not know why this useDelegateVote
hook exists!! I plan on getting rid of it entirely when I tackle the LockRelease
typechain type.
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.
Ah good to know!
…VotesERC20 contract address, also switch to using the viem contract
087151c
to
c9d9cbe
Compare
Please review and merge #1639 first.