Skip to content

Conversation

orenyodfat
Copy link
Contributor

No description provided.

Proposal memory proposal = proposals[_proposalId];
require(proposal.proposedMember != address(0), "not a valid proposal");
require(fundings[proposal.proposedMember].state == MemeberState.Candidate, "proposal already been executed");
require(membersState[proposal.proposedMember] == MemeberState.Candidate, "proposal already been executed");
Copy link
Contributor

Choose a reason for hiding this comment

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

if memberState is "candidate", that means that the proposal is already executed? Maybe change the name of the state to something more meaningful then (like "executed"?)

override
returns(bool) {
Proposal memory proposal = proposals[_proposalId];
require(proposal.proposedMember != address(0), "not a valid proposal");
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe give a more specific error message here?


mapping(bytes32=>Proposal) public proposals;
mapping(address=>MemberFund) public fundings;
mapping(address=>MemeberState) public membersState;
Copy link
Contributor

Choose a reason for hiding this comment

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

"MemberState" not "MemeberState"

require(proposal.proposedMember != address(0), "no member to redeem");
require(!fundings[proposal.proposedMember].rageQuit, "member already rageQuit");
require(fundings[proposal.proposedMember].state == MemeberState.Accepted, "member not accepeted");
require(membersState[proposal.proposedMember] == MemeberState.Accepted, "member not accepeted");
Copy link
Contributor

Choose a reason for hiding this comment

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

accepted, not accepted

require(membersState[proposer] != MemeberState.Candidate, "already a candidate");
require(membersState[proposer] != MemeberState.Accepted, "accepted and not redeemed yet");
require(avatar.nativeReputation().balanceOf(proposer) == 0, "already a member");
require(_feeAmount >= minFeeToJoin, "_feeAmount should be >= then the minFeeToJoin");
Copy link
Contributor

Choose a reason for hiding this comment

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

"than" not "then"

require(fundings[proposer].state != MemeberState.Candidate, "already a candidate");
require(fundings[proposer].state != MemeberState.Accepted, "accepted and not redeemed yet");
require(membersState[proposer] != MemeberState.Candidate, "already a candidate");
require(membersState[proposer] != MemeberState.Accepted, "accepted and not redeemed yet");
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a subject to the error message so we know what it is about?

address proposer = msg.sender;
require(fundings[proposer].state != MemeberState.Candidate, "already a candidate");
require(fundings[proposer].state != MemeberState.Accepted, "accepted and not redeemed yet");
require(membersState[proposer] != MemeberState.Candidate, "already a candidate");
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a subject to the error message so we know what it is about? ("proposer is already a candidate")

ben-kaufman
ben-kaufman previously approved these changes Aug 4, 2020
@orenyodfat orenyodfat marked this pull request as ready for review August 8, 2020 17:14
@orenyodfat orenyodfat requested a review from leviadam as a code owner August 8, 2020 17:14
@orenyodfat orenyodfat merged commit 780bbed into master-2 Aug 8, 2020
@orenyodfat orenyodfat deleted the only_join branch August 8, 2020 17:17
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