-
Notifications
You must be signed in to change notification settings - Fork 21
Should not attempt to mint if _reputation == 0 #707
Copy link
Copy link
Open
Description
See line 329 of ContributionRewardExt. All the other reward types follow the right pattern except reputation. The idea is to be clear and consistent in the code and to avoid what I am guessing will be a tx when there are 0 reputation to be minted.
require(
Controller(
avatar.owner()).mintReputation(_reputation, _beneficiary, address(avatar)));
if (_reputation != 0) {
emit RedeemReputation(address(avatar), _proposalId, _beneficiary, int256(_reputation));
}
}
should be (note also adding a missing revert string):
if (_reputation != 0) {
require(
Controller(
avatar.owner()).mintReputation(_reputation, _beneficiary, address(avatar)),
"with an error message");
emit RedeemReputation(address(avatar), _proposalId, _beneficiary, int256(_reputation));
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels