diff --git a/daemon/src/maker_cfd.rs b/daemon/src/maker_cfd.rs index fd3c5b3..51df511 100644 --- a/daemon/src/maker_cfd.rs +++ b/daemon/src/maker_cfd.rs @@ -445,6 +445,9 @@ impl Actor { let new_state = cfd.handle(CfdStateChangeEvent::CommitTxSent)?; insert_new_cfd_state_by_order_id(cfd.order.id, new_state, &mut conn).await?; + self.cfd_feed_actor_inbox + .send(load_all_cfds(&mut conn).await?)?; + Ok(()) } diff --git a/daemon/src/model/cfd.rs b/daemon/src/model/cfd.rs index d665a72..fd6c7a0 100644 --- a/daemon/src/model/cfd.rs +++ b/daemon/src/model/cfd.rs @@ -322,7 +322,7 @@ impl Display for CfdState { write!(f, "Open") } CfdState::PendingCommit { .. } => { - write!(f, "Pending Committ") + write!(f, "Pending Commit") } CfdState::OpenCommitted { .. } => { write!(f, "Open Committed") @@ -624,8 +624,9 @@ impl Cfd { } pub fn commit_tx(&self) -> Result { - let dlc = if let CfdState::Open { dlc, .. } | CfdState::PendingOpen { dlc, .. } = - self.state.clone() + let dlc = if let CfdState::Open { dlc, .. } + | CfdState::PendingOpen { dlc, .. } + | CfdState::PendingCommit { dlc, .. } = self.state.clone() { dlc } else { @@ -652,7 +653,7 @@ impl Cfd { let signed_commit_tx = finalize_spend_transaction( dlc.commit.0, - &dlc.commit.2, + &dlc.lock.1, (our_pubkey, our_sig), (counterparty_pubkey, counterparty_sig), )?; diff --git a/daemon/src/taker_cfd.rs b/daemon/src/taker_cfd.rs index d990bc9..602ddee 100644 --- a/daemon/src/taker_cfd.rs +++ b/daemon/src/taker_cfd.rs @@ -370,6 +370,9 @@ impl Actor { let new_state = cfd.handle(CfdStateChangeEvent::CommitTxSent)?; insert_new_cfd_state_by_order_id(cfd.order.id, new_state, &mut conn).await?; + self.cfd_feed_actor_inbox + .send(load_all_cfds(&mut conn).await?)?; + Ok(()) }