Skip to content

Commit

Permalink
Merge branch 'develop' into feature/clean-todos
Browse files Browse the repository at this point in the history
  • Loading branch information
gfournieriExec committed Jun 3, 2024
2 parents 0f1f6b5 + 1fcee14 commit 64d3117
Show file tree
Hide file tree
Showing 4 changed files with 354 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## vNEXT
- Claim task part 2 - Add voucher tests. (#21)
- Claim task part 1 - Solidity with minimal tests. (#20)
- Compute deal price with proper volume. (#19)
- Refactor voucher tests file. (#18)
Expand Down
8 changes: 4 additions & 4 deletions contracts/mocks/IexecPocoMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ contract IexecPocoMock is ERC20 {
if (shouldRevertOnClaim) {
revert("IexecPocoMock: Failed to claim");
}
// This simulates non existent tasks.
// This simulates non existent task/deal.
if (taskId != mockTaskId) {
revert(); // no reason, same as PoCo.
}
task.status = IexecLibCore_v5.TaskStatusEnum.FAILED;
_mint(deal.sponsor, deal.app.price + deal.dataset.price + deal.workerpool.price);
}

function claimBoost(bytes32, uint256 taskIndex) external {
function claimBoost(bytes32 dealId, uint256 taskIndex) external {
if (shouldRevertOnClaim) {
revert("IexecPocoMock: Failed to claim boost");
}
// This simulates non existent tasks.
if (taskIndex != mockTaskIndex) {
// This simulates non existent task/deal.
if (dealId != mockDealId || taskIndex != mockTaskIndex) {
revert("PocoBoost: Unknown task"); // same as PoCo.
}
task.status = IexecLibCore_v5.TaskStatusEnum.FAILED;
Expand Down
Loading

0 comments on commit 64d3117

Please sign in to comment.