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

fix(dao): proposals list invalidation #1310

Merged
merged 5 commits into from
Oct 21, 2024
Merged

fix(dao): proposals list invalidation #1310

merged 5 commits into from
Oct 21, 2024

Conversation

WaDadidou
Copy link
Collaborator

@WaDadidou WaDadidou commented Oct 17, 2024

Actually, we have to reload the page, after a proposal action, to see the new status.
This fix refetch the proposals correctly

Start

Let's click on Approve !
image

Without the fix, only the vote status is refreshed, not the whole proposal.

Here, we see the "Voted" gauge is still at "0"
image

With the fix, the proposal is refresh

Here, we see the fresh proposal status with the votes gauge "1/1" and so the Execute action is available
image

Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for testitori ready!

Name Link
🔨 Latest commit 1ad03ea
🔍 Latest deploy log https://app.netlify.com/sites/testitori/deploys/6716e3d12969910008f94a63
😎 Deploy Preview https://deploy-preview-1310--testitori.netlify.app
📱 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.

Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 1ad03ea
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/6716e3d1ae45e90008575c61
😎 Deploy Preview https://deploy-preview-1310--teritori-dapp.netlify.app
📱 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.

MikaelVallenet
MikaelVallenet previously approved these changes Oct 18, 2024
Copy link
Collaborator

@MikaelVallenet MikaelVallenet left a comment

Choose a reason for hiding this comment

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

LGTM

@WaDadidou WaDadidou self-assigned this Oct 18, 2024
Copy link
Collaborator

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

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

there is an invalidation mechanism and it was working previously, you shouldn't have to pass this refetch can you check the invalidateQueries call instead please

@WaDadidou
Copy link
Collaborator Author

there is an invalidation mechanism and it was working previously, you shouldn't have to pass this refetch can you check the invalidateQueries call instead please

This doesn't work here: https://github.com/TERITORI/teritori-dapp/blob/fix-refetch-proposal/packages/components/dao/ProposalActions.tsx#L118

@n0izn0iz
Copy link
Collaborator

okay, can you try to fix this then?

@WaDadidou
Copy link
Collaborator Author

WaDadidou commented Oct 21, 2024

okay, can you try to fix this then?

I tried but I didn't succeed.
I verified that the queries keys matches and tried without the hook.
It's out of the scope of Launchpad, so I don't priorize this PR

@WaDadidou
Copy link
Collaborator Author

Fixed properly

packages/hooks/dao/useDAOProposals.ts Outdated Show resolved Hide resolved
packages/hooks/dao/useDAOProposals.ts Outdated Show resolved Hide resolved
@n0izn0iz n0izn0iz changed the title Fix: DAO Proposals: refetch proposal after action fix(dao): proposals list invalidation Oct 21, 2024
@n0izn0iz n0izn0iz merged commit 82e2681 into main Oct 21, 2024
21 of 22 checks passed
@n0izn0iz n0izn0iz deleted the fix-refetch-proposal branch October 21, 2024 23:55
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.

3 participants