Skip to content

Commit

Permalink
Fix #36
Browse files Browse the repository at this point in the history
Fix #36
  • Loading branch information
ben-kaufman committed Nov 7, 2023
1 parent f2a4d00 commit ece4e19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/HATArbitrator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ contract HATArbitrator is IHATArbitrator, Ownable {
];

if (
submitClaimRequest.submittedAt == 0 ||
block.timestamp <=
submitClaimRequest.submittedAt + submitClaimRequestReviewPeriod
) {
Expand All @@ -491,7 +492,7 @@ contract HATArbitrator is IHATArbitrator, Ownable {
delete submitClaimRequests[_internalClaimId];
token.safeTransfer(
submitClaimRequest.submitter,
bondsNeededToStartDispute
submitClaimRequest.bond
);

emit SubmitClaimRequestExpired(_internalClaimId);
Expand Down
5 changes: 5 additions & 0 deletions test/hatarbitrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1079,5 +1079,10 @@ contract("Registry Arbitrator", (accounts) => {
assert.equal(await token.balanceOf(accounts[0]), web3.utils.toWei("1000"));
assert.equal(await token.balanceOf(hatArbitrator.address), web3.utils.toWei("0"));
assert.equal(await token.balanceOf(expertCommittee), web3.utils.toWei("0"));

await assertFunctionRaisesException(
hatArbitrator.refundExpiredSubmitClaimRequest(web3.utils.randomHex(32), { from: accounts[1] }),
"ClaimReviewPeriodDidNotEnd"
);
});
});

0 comments on commit ece4e19

Please sign in to comment.