Skip to content

Commit fe6cbec

Browse files
author
francois branciard
committed
fix event name issue #33
1 parent f624ca8 commit fe6cbec

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

contracts/IexecAPI.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "rlc-token/contracts/RLC.sol";
77

88
contract IexecAPI is OwnableOZ, IexecHubAccessor, IexecCallbackInterface
99
{
10-
event WorkOrder (address woid);
10+
event WorkOrderActivated (address woid);
1111
event WithdrawRLCFromIexecAPI(address to, uint256 amount);
1212
event ApproveIexecHub (address iexecHub, uint256 amount);
1313
event DepositRLCOnIexecHub (address iexecHub, uint256 amount);
@@ -34,7 +34,7 @@ contract IexecAPI is OwnableOZ, IexecHubAccessor, IexecCallbackInterface
3434
public
3535
{
3636
address woid = iexecHubInterface.buyForWorkOrder(_marketorderIdx, _workerpool, _app, _dataset, _params, _callback, _beneficiary);
37-
emit WorkOrder(woid);
37+
emit WorkOrderActivated(woid);
3838
}
3939

4040
function workOrderCallback(

test/byFunctions/IexecAPI/buyForWorkOrder.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ contract('IexecHub', function(accounts) {
348348
woid = events[0].args.woid;
349349
assert.strictEqual(events[0].args.workerPool, aWorkerPoolInstance.address, "check workerPool");
350350

351+
events = await Extensions.getEventsPromise(aIexecAPIInstance.WorkOrderActivated({}),1,constants.EVENT_WAIT_TIMEOUT);
352+
assert.strictEqual(events[0].args.woid, woid, "check woid");
353+
351354
checkBalance = await aIexecHubInstance.checkBalance.call(aIexecAPIInstance.address);
352355
assert.strictEqual(checkBalance[0].toNumber(), 0, "check stake of the aIexecAPIInstance.address");
353356
assert.strictEqual(checkBalance[1].toNumber(), 100, "check stake locked of the aIexecAPIInstance.address");

0 commit comments

Comments
 (0)