|
|
@ -270,9 +270,7 @@ impl Actor { |
|
|
|
let mut conn = self.db.acquire().await?; |
|
|
|
let mut cfd = load_cfd_by_order_id(order_id, &mut conn).await?; |
|
|
|
cfd.state = CfdState::ContractSetup { |
|
|
|
common: CfdStateCommon { |
|
|
|
transition_timestamp: SystemTime::now(), |
|
|
|
}, |
|
|
|
common: CfdStateCommon::default(), |
|
|
|
}; |
|
|
|
|
|
|
|
append_cfd_state(&cfd, &mut conn, &self.cfd_feed_actor_inbox).await?; |
|
|
@ -323,9 +321,7 @@ impl Actor { |
|
|
|
let mut conn = self.db.acquire().await?; |
|
|
|
let mut cfd = load_cfd_by_order_id(order_id, &mut conn).await?; |
|
|
|
cfd.state = CfdState::Rejected { |
|
|
|
common: CfdStateCommon { |
|
|
|
transition_timestamp: SystemTime::now(), |
|
|
|
}, |
|
|
|
common: CfdStateCommon::default(), |
|
|
|
}; |
|
|
|
|
|
|
|
append_cfd_state(&cfd, &mut conn, &self.cfd_feed_actor_inbox).await?; |
|
|
@ -477,9 +473,7 @@ impl Actor { |
|
|
|
let mut conn = self.db.acquire().await?; |
|
|
|
let mut cfd = load_cfd_by_order_id(order_id, &mut conn).await?; |
|
|
|
cfd.state = CfdState::PendingOpen { |
|
|
|
common: CfdStateCommon { |
|
|
|
transition_timestamp: SystemTime::now(), |
|
|
|
}, |
|
|
|
common: CfdStateCommon::default(), |
|
|
|
dlc: dlc.clone(), |
|
|
|
attestation: None, |
|
|
|
}; |
|
|
@ -520,9 +514,7 @@ impl Actor { |
|
|
|
let mut conn = self.db.acquire().await?; |
|
|
|
let mut cfd = load_cfd_by_order_id(order_id, &mut conn).await?; |
|
|
|
cfd.state = CfdState::Open { |
|
|
|
common: CfdStateCommon { |
|
|
|
transition_timestamp: SystemTime::now(), |
|
|
|
}, |
|
|
|
common: CfdStateCommon::default(), |
|
|
|
dlc: dlc.clone(), |
|
|
|
attestation: None, |
|
|
|
collaborative_close: None, |
|
|
|