Skip to content

Commit f6b6139

Browse files
committed
fix: justification should not be part of the commitment (bad ux)
1 parent 51ef929 commit f6b6139

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

contracts/src/arbitration/dispute-kits/DisputeKitClassic.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ contract DisputeKitClassic is IDisputeKit, IEvidence, Initializable, UUPSProxiab
307307
for (uint256 i = 0; i < _voteIDs.length; i++) {
308308
require(round.votes[_voteIDs[i]].account == msg.sender, "The caller has to own the vote.");
309309
require(
310-
!hiddenVotes ||
311-
round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _justification, _salt)),
310+
!hiddenVotes || round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _salt)),
312311
"The commit must match the choice in courts with hidden votes."
313312
);
314313
require(!round.votes[_voteIDs[i]].voted, "Vote already cast.");

contracts/src/arbitration/dispute-kits/DisputeKitSybilResistant.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,7 @@ contract DisputeKitSybilResistant is IDisputeKit, IEvidence, Initializable, UUPS
325325
for (uint256 i = 0; i < _voteIDs.length; i++) {
326326
require(round.votes[_voteIDs[i]].account == msg.sender, "The caller has to own the vote.");
327327
require(
328-
!hiddenVotes ||
329-
round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _justification, _salt)),
328+
!hiddenVotes || round.votes[_voteIDs[i]].commit == keccak256(abi.encodePacked(_choice, _salt)),
330329
"The commit must match the choice in courts with hidden votes."
331330
);
332331
require(!round.votes[_voteIDs[i]].voted, "Vote already cast.");

0 commit comments

Comments
 (0)