Skip to content

Commit

Permalink
test: fix (most) unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moebius committed Nov 21, 2023
1 parent feede2c commit 4cdfe06
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 381 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"package.json": "sort-package-json"
},
"dependencies": {
"@defi-wonderland/prophet-core-contracts": "0.0.0-d05a00d0",
"@defi-wonderland/prophet-core-contracts": "0.0.0-1ae08a81",
"@defi-wonderland/solidity-utils": "0.0.0-3e9c8e8b",
"@openzeppelin/contracts": "^4.9.3",
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
Expand Down
10 changes: 2 additions & 8 deletions solidity/contracts/modules/dispute/BondEscalationModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ contract BondEscalationModule is Module, IBondEscalationModule {
if (_escalation.status == BondEscalationStatus.None) {
if (block.timestamp > _params.bondEscalationDeadline) revert BondEscalationModule_BondEscalationOver();

// Note: this imitates the way _disputeId is calculated on the Oracle, it must always match
_escalation.status = BondEscalationStatus.Active;
_escalation.disputeId = _disputeId;
emit BondEscalationStatusUpdated(_dispute.requestId, _disputeId, BondEscalationStatus.Active);
Expand All @@ -85,6 +84,7 @@ contract BondEscalationModule is Module, IBondEscalationModule {
});

emit ResponseDisputed({
_requestId: _dispute.requestId,
_responseId: _dispute.responseId,
_disputeId: _disputeId,
_dispute: _dispute,
Expand Down Expand Up @@ -164,11 +164,7 @@ contract BondEscalationModule is Module, IBondEscalationModule {
}

// TODO: Emit event
// emit DisputeStatusChanged({
// _disputeId: _disputeId,
// _dispute: _dispute,
// _status: _status
// });
// emit DisputeStatusChanged({_disputeId: _disputeId, _dispute: _dispute, _status: _status});
}

////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -256,8 +252,6 @@ contract BondEscalationModule is Module, IBondEscalationModule {
IOracle.Dispute calldata _dispute,
bool _forDispute
) internal view returns (RequestParameters memory _params) {
if (_disputeId == 0) revert BondEscalationModule_DisputeDoesNotExist();

BondEscalation memory _escalation = _escalations[_dispute.requestId];

if (_disputeId != _escalation.disputeId) {
Expand Down
Loading

0 comments on commit 4cdfe06

Please sign in to comment.