RefundEscrow's events renamed (#1418)
* fixes #1414
(cherry picked from commit 844a96d0b9)
This commit is contained in:
@ -11,7 +11,7 @@ import "./ConditionalEscrow.sol";
|
|||||||
contract RefundEscrow is ConditionalEscrow {
|
contract RefundEscrow is ConditionalEscrow {
|
||||||
enum State { Active, Refunding, Closed }
|
enum State { Active, Refunding, Closed }
|
||||||
|
|
||||||
event Closed();
|
event RefundsClosed();
|
||||||
event RefundsEnabled();
|
event RefundsEnabled();
|
||||||
|
|
||||||
State private _state;
|
State private _state;
|
||||||
@ -57,7 +57,7 @@ contract RefundEscrow is ConditionalEscrow {
|
|||||||
function close() public onlyPrimary {
|
function close() public onlyPrimary {
|
||||||
require(_state == State.Active);
|
require(_state == State.Active);
|
||||||
_state = State.Closed;
|
_state = State.Closed;
|
||||||
emit Closed();
|
emit RefundsClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -54,7 +54,7 @@ contract('RefundEscrow', function ([_, primary, beneficiary, refundee1, refundee
|
|||||||
await shouldFail.reverting(this.escrow.close({ from: beneficiary }));
|
await shouldFail.reverting(this.escrow.close({ from: beneficiary }));
|
||||||
|
|
||||||
const { logs } = await this.escrow.close({ from: primary });
|
const { logs } = await this.escrow.close({ from: primary });
|
||||||
expectEvent.inLogs(logs, 'Closed');
|
expectEvent.inLogs(logs, 'RefundsClosed');
|
||||||
});
|
});
|
||||||
|
|
||||||
context('closed state', function () {
|
context('closed state', function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user