Skip to content

Commit

Permalink
Merge pull request #64 from hats-finance/fix-36
Browse files Browse the repository at this point in the history
Fix #36
  • Loading branch information
jellegerbrandy committed Dec 4, 2023
2 parents 19117c0 + ece4e19 commit 929a3eb
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 @@ -488,6 +488,7 @@ contract HATArbitrator is IHATArbitrator, Ownable {
];

if (
submitClaimRequest.submittedAt == 0 ||
block.timestamp <=
submitClaimRequest.submittedAt + submitClaimRequestReviewPeriod
) {
Expand All @@ -497,7 +498,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 @@ -1084,5 +1084,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 929a3eb

Please sign in to comment.