DXgovernance / davi-monorepo

https://davi-monorepo-davi.vercel.app
8 stars 12 forks source link

Fix: subsequent votes not updating voting power #269

Closed dcrescimbeni closed 1 year ago

dcrescimbeni commented 1 year ago

Description

Increasing the voting power now updates the total votes of the proposal and option.

(disregard the window showing the vote impact since this video is done hardcoding the voting power since the feature it's not implemented)

https://www.loom.com/share/fc38d581da884b65a4c2424a28bd5332

Also, there are quite a lot of changes due to a refactor to use @derivedFrom property to make the relationships between entities instead of copying and pushing to an array.

Members that have 0 voting power aren't deleted since that might break when trying to query votes of a member that is no longer active. Updated the useGetMemberList query to reflect that change.

Closes #249

Type of change

How Has This Been Tested?

Manual testing. Every entity is the same before and after the changes.

To test it, you should hardcode the voting power of the setVote function and modify the code to allow you to keep voting after a member has already voted.

Checklist:

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
davi ❌ Failed (Inspect) Mar 6, 2023 at 8:36PM (UTC)