diff --git a/daemon/src/maker_cfd.rs b/daemon/src/maker_cfd.rs index aa80248..ce4d749 100644 --- a/daemon/src/maker_cfd.rs +++ b/daemon/src/maker_cfd.rs @@ -442,8 +442,6 @@ impl Actor { tracing::info!("Lock transaction published with txid {}", txid); - // TODO: It's a bit suspicious to load this just to get the - // refund timelock let cfd = load_cfd_by_order_id(order_id, &mut conn).await?; self.monitor_actor @@ -453,6 +451,12 @@ impl Actor { }) .await?; + self.oracle_actor + .do_send_async(oracle::MonitorAttestation { + event_id: cfd.order.oracle_event_id, + }) + .await?; + Ok(()) } @@ -602,12 +606,6 @@ impl Actor { .await? .with_context(|| format!("Announcement {} not found", cfd.order.oracle_event_id))?; - self.oracle_actor - .do_send_async(oracle::MonitorAttestation { - event_id: offer_announcement.id, - }) - .await?; - let contract_future = setup_contract::new( self.takers.clone().into_sink().with(move |msg| { future::ok(maker_inc_connections::TakerMessage { diff --git a/daemon/src/taker_cfd.rs b/daemon/src/taker_cfd.rs index 5870670..115b5f1 100644 --- a/daemon/src/taker_cfd.rs +++ b/daemon/src/taker_cfd.rs @@ -407,12 +407,6 @@ impl Actor { .await? .with_context(|| format!("Announcement {} not found", oracle_event_id))?; - self.oracle_actor - .do_send_async(oracle::MonitorAttestation { - event_id: announcement.id, - }) - .await?; - let contract_future = setup_contract::roll_over( self.send_to_maker .clone() @@ -522,8 +516,6 @@ impl Actor { tracing::info!("Lock transaction published with txid {}", txid); - // TODO: It's a bit suspicious to load this just to get the - // refund timelock let cfd = load_cfd_by_order_id(order_id, &mut conn).await?; self.monitor_actor @@ -533,6 +525,12 @@ impl Actor { }) .await?; + self.oracle_actor + .do_send_async(oracle::MonitorAttestation { + event_id: cfd.order.oracle_event_id, + }) + .await?; + Ok(()) }