From 081defa21f3482e3776b86b957812c8337b12898 Mon Sep 17 00:00:00 2001 From: green <40367733+greenlucid@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:39:15 +0200 Subject: [PATCH] fix: dont increment appealCount b/ computing appealCost --- contracts/examples/CentralizedArbitratorWithAppeal.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/examples/CentralizedArbitratorWithAppeal.sol b/contracts/examples/CentralizedArbitratorWithAppeal.sol index bda8f2a..cd080b0 100644 --- a/contracts/examples/CentralizedArbitratorWithAppeal.sol +++ b/contracts/examples/CentralizedArbitratorWithAppeal.sol @@ -122,7 +122,6 @@ contract CentralizedArbitratorWithAppeal is IArbitrator { function appeal(uint256 _disputeID, bytes memory _extraData) public payable override { Dispute storage dispute = disputes[_disputeID]; - dispute.appealCount++; uint256 requiredAmount = appealCost(_disputeID, _extraData); if (msg.value < requiredAmount) { @@ -137,6 +136,7 @@ contract CentralizedArbitratorWithAppeal is IArbitrator { revert AfterAppealPeriodEnd(block.timestamp, dispute.appealPeriodEnd); } + dispute.appealCount++; dispute.status = DisputeStatus.Waiting; emit AppealDecision(_disputeID, dispute.arbitrated);