Skip to content

Commit f080264

Browse files
committed
chore: minor tweak
1 parent 259ecd5 commit f080264

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,16 @@ abstract contract DisputeKitClassicBase is IDisputeKit, Initializable, UUPSProxi
229229
bytes32 key = bytes32(uint256(courtID)); // Get the ID of the tree.
230230

231231
drawnAddress = sortitionModule.draw(key, _coreDisputeID, _nonce);
232-
233-
if (drawnAddress != address(0)) {
232+
if (drawnAddress == address(0)) {
234233
// Sortition can return 0 address if no one has staked yet.
235-
if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {
236-
round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));
237-
alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;
238-
} else {
239-
drawnAddress = address(0);
240-
}
234+
return drawnAddress;
235+
}
236+
237+
if (_postDrawCheck(round, _coreDisputeID, drawnAddress)) {
238+
round.votes.push(Vote({account: drawnAddress, commit: bytes32(0), choice: 0, voted: false}));
239+
alreadyDrawn[localDisputeID][localRoundID][drawnAddress] = true;
240+
} else {
241+
drawnAddress = address(0);
241242
}
242243
}
243244

0 commit comments

Comments
 (0)