Skip to content

Commit

Permalink
chore: Allow rollover even if the contract is expired
Browse files Browse the repository at this point in the history
This was a safe-guard added when the app triggered the rollover through the publicly exposed rollover api. Now that we have changed that it is convenient to rollover also expired contracts for support cases.
  • Loading branch information
holzeis committed May 21, 2024
1 parent 567266a commit 97c3aee
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions coordinator/src/node/rollover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ impl Rollover {
.first()
.context("oracle announcement to exist on signed contract")?;

let expiry_timestamp = OffsetDateTime::from_unix_timestamp(
oracle_announcement.oracle_event.event_maturity_epoch as i64,
)?;

if expiry_timestamp < OffsetDateTime::now_utc() {
bail!("Cannot rollover an expired position");
}

let margin_coordinator = offered_contract.offer_params.collateral;
let margin_trader = offered_contract.total_collateral - margin_coordinator;

Expand Down

0 comments on commit 97c3aee

Please sign in to comment.