Skip to content

Commit

Permalink
test: bond escalation integration
Browse files Browse the repository at this point in the history
  • Loading branch information
moebius committed Dec 5, 2023
1 parent 856e4f5 commit bd0a826
Show file tree
Hide file tree
Showing 2 changed files with 480 additions and 467 deletions.
15 changes: 7 additions & 8 deletions solidity/contracts/modules/dispute/BondEscalationModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,14 @@ contract BondEscalationModule is Module, IBondEscalationModule {

bool _won = ORACLE.disputeStatus(_disputeId) == IOracle.DisputeStatus.Won;

_params.accountingExtension.pay({
_requestId: _dispute.requestId,
_payer: _won ? _dispute.proposer : _dispute.disputer,
_receiver: _won ? _dispute.disputer : _dispute.proposer,
_token: _params.bondToken,
_amount: _params.bondSize
});

if (_won) {
_params.accountingExtension.pay({
_requestId: _dispute.requestId,
_payer: _dispute.proposer,
_receiver: _dispute.disputer,
_token: _params.bondToken,
_amount: _params.bondSize
});
_params.accountingExtension.release({
_requestId: _dispute.requestId,
_bonder: _dispute.disputer,
Expand Down
Loading

0 comments on commit bd0a826

Please sign in to comment.