Skip to content

Commit

Permalink
fix(t2cr): reset paid fees after dispute is resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricexit committed Nov 20, 2018
1 parent 572ff2b commit f722025
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions contracts/standard/permission/ArbitrableTokenList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,12 @@ contract ArbitrableTokenList is PermissionInterface, Arbitrable {
winner = Party.Challenger;

// Update token state
if(winner == Party.Requester)
// Execute Request
if(winner == Party.Requester) // Execute Request
if (token.status == TokenStatus.RegistrationRequested)
token.status = TokenStatus.Registered;
else
token.status = TokenStatus.Absent;
else
// Revert to previous state.
else // Revert to previous state.
if (token.status == TokenStatus.RegistrationRequested)
token.status = TokenStatus.Absent;
else if (token.status == TokenStatus.ClearingRequested)
Expand All @@ -347,10 +345,11 @@ contract ArbitrableTokenList is PermissionInterface, Arbitrable {
token.parties[uint(Party.Challenger)].send(token.challengeReward + token.paidFees[uint(Party.Challenger)]);
}


token.lastAction = now;
token.challengeRewardBalance = 0;
token.challengeReward = 0; // Clear challengeReward once a dispute is resolved.
token.paidFees[uint(Party.Requester)] = 0;
token.paidFees[uint(Party.Challenger)] = 0;
token.challengeReward = 0; // Reset challengeReward once a dispute is resolved.

emit TokenStatusChange(token.parties[uint(Party.Requester)], token.parties[uint(Party.Challenger)], tokenID, token.status, token.disputed);
}
Expand Down

0 comments on commit f722025

Please sign in to comment.