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

Skip useDelegateVote #1641

Merged
merged 2 commits into from
May 6, 2024
Merged

Skip useDelegateVote #1641

merged 2 commits into from
May 6, 2024

Conversation

adamgall
Copy link
Member

@adamgall adamgall commented May 5, 2024

Please review and merge #1639 first.

@adamgall adamgall self-assigned this May 5, 2024
Copy link

netlify bot commented May 5, 2024

Deploy Preview for fractal-dev ready!

Name Link
🔨 Latest commit c9d9cbe
🔍 Latest deploy log https://app.netlify.com/sites/fractal-dev/deploys/663928466f7cd3000809d0e6
😎 Deploy Preview https://deploy-preview-1641.app.dev.fractalframework.xyz
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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;
Copy link
Member Author

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.

Copy link
Contributor

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)?

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good to know!

Base automatically changed from remove-non-fractal-type-imports to develop May 6, 2024 18:54
@adamgall adamgall marked this pull request as ready for review May 6, 2024 18:56
adamgall added 2 commits May 6, 2024 14:58
…VotesERC20 contract address, also switch to using the viem contract
@adamgall adamgall force-pushed the skip-usedelegatevote branch from 087151c to c9d9cbe Compare May 6, 2024 18:58
@adamgall adamgall merged commit 882b290 into develop May 6, 2024
7 checks passed
@adamgall adamgall deleted the skip-usedelegatevote branch May 6, 2024 19:18
adamgall added a commit that referenced this pull request May 8, 2024
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 this pull request may close these issues.

2 participants