Skip to content

Commit

Permalink
fix(t2cr): should only allow calling execute request of no one contested
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricexit committed Nov 23, 2018
1 parent 64bd110 commit f00b6ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contracts/standard/permission/ArbitrableTokenList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,16 @@ contract ArbitrableTokenList is PermissionInterface, Arbitrable {
* @param _tokenID The tokenID of the token with the request to execute.
*/
function executeRequest(bytes32 _tokenID) external {
// TODO: Prevent execution if anyone made some contribution to a dispute. In that case, force using feeTimeoutFirstRound().
Token storage token = tokens[_tokenID];
require(token.lastAction > 0, "The specified token was never submitted.");
Request storage request = token.requests[token.requests.length - 1];
require(token.lastAction + timeToChallenge > now, "The time to challenge has not passed yet.");
require(!request.disputed, "The specified token is disputed.");
require(
request.challengeRewardBalance == request.challengeReward,
"Only callable if no one contests the request."
);


if (token.status == TokenStatus.RegistrationRequested)
token.status = TokenStatus.Registered;
Expand Down

0 comments on commit f00b6ff

Please sign in to comment.