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

WIP: Feat: Offchain DAO creation #957

Closed
wants to merge 29 commits into from

Conversation

selankon
Copy link
Collaborator

@selankon selankon commented Aug 3, 2023

Description

This PR is developed on the vocdoni offChain plugin context.

The branch implement changes on the DAO creation form to add the option to create offChain proposals with a executive committee.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran all tests with success and extended them if necessary.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have tested my code on the test network.

@selankon selankon requested a review from sepehr2github August 3, 2023 06:57
@CLAassistant
Copy link

CLAassistant commented Aug 3, 2023

CLA assistant check
All committers have signed the CLA.

@emmdim emmdim self-requested a review August 3, 2023 09:56
@selankon selankon force-pushed the f/offchain-DAO-creation branch 3 times, most recently from 70d2a5a to ce547ff Compare August 7, 2023 11:05
@selankon selankon changed the base branch from develop to f/offchain-plugin August 8, 2023 10:36
@selankon selankon force-pushed the f/offchain-DAO-creation branch 2 times, most recently from b5c67e2 to 98ec3b1 Compare August 10, 2023 07:59
@selankon selankon force-pushed the f/offchain-DAO-creation branch from 98ec3b1 to 92665b4 Compare August 11, 2023 09:20
@selankon selankon force-pushed the f/offchain-plugin branch 2 times, most recently from 9bc270a to f889286 Compare September 1, 2023 09:05
@selankon selankon force-pushed the f/offchain-DAO-creation branch from 0d1bd50 to cf37dcf Compare September 1, 2023 11:36
@selankon selankon force-pushed the f/offchain-DAO-creation branch 6 times, most recently from e9774ec to 5d23c8f Compare September 20, 2023 08:29
Copy link

@elboletaire elboletaire left a comment

Choose a reason for hiding this comment

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

Some of the useMemo and useCallbacks used are not necessary. Ensure you try any changes to these methods, since I can only speak for the code I've seen... I tried to check all the affected methods to ensure I'm not saying it wrong, but I could be wrong in some of them... so double-check it please.

package.json Outdated Show resolved Hide resolved
src/components/addCommitteeMembers/index.tsx Show resolved Hide resolved
src/components/filteredAddressList/index.tsx Show resolved Hide resolved
src/containers/goLive/committee.tsx Show resolved Hide resolved
src/context/createDao.tsx Show resolved Hide resolved
src/context/createDao.tsx Outdated Show resolved Hide resolved
src/context/createDao.tsx Outdated Show resolved Hide resolved
src/components/addCommitteeMembers/row.tsx Show resolved Hide resolved
Comment on lines +241 to +273
const defineCommitteeIsValid = useMemo(() => {
if (
!committee ||
!committee.length ||
errors.committee ||
errors.committeeMinimumApproval ||
errors.executionExpirationMinutes ||
errors.executionExpirationHours ||
errors.executionExpirationDays
)
return false;
return true;
}, [
committee,
errors.committee,
errors.committeeMinimumApproval,
errors.executionExpirationMinutes,
errors.executionExpirationHours,
errors.executionExpirationDays,
]);

const proposalCreationIsValid = useMemo(() => {
// required fields not dirty
// if multisig
if (membership === 'multisig') {
if (!['multisig', 'anyone'].includes(eligibilityType)) {
return false;
}
return true;
} else {
return !errors.eligibilityTokenAmount;
}
}, [eligibilityType, errors.eligibilityTokenAmount, membership]);

Choose a reason for hiding this comment

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

No need to use useMemo here.

@selankon selankon force-pushed the f/offchain-DAO-creation branch 2 times, most recently from 9dfb36b to d0e2461 Compare September 27, 2023 09:44
@selankon selankon force-pushed the f/offchain-plugin branch 2 times, most recently from 3723975 to af00d3e Compare September 27, 2023 10:36
@selankon selankon force-pushed the f/offchain-DAO-creation branch from d0e2461 to 32d3c90 Compare September 27, 2023 10:38
@selankon selankon force-pushed the f/offchain-DAO-creation branch from 32d3c90 to 264140e Compare September 27, 2023 12:16
@selankon
Copy link
Collaborator Author

Closed in favour to #1074

@selankon selankon closed this Oct 30, 2023
@selankon selankon deleted the f/offchain-DAO-creation branch November 8, 2023 12:00
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