diff --git a/crates/autopilot/src/on_settlement_event_updater.rs b/crates/autopilot/src/on_settlement_event_updater.rs index ab2da19e97..8d1135411c 100644 --- a/crates/autopilot/src/on_settlement_event_updater.rs +++ b/crates/autopilot/src/on_settlement_event_updater.rs @@ -177,11 +177,6 @@ impl Inner { tracing::debug!(?hash, ?update, "updating settlement details for tx"); - Postgres::update_settlement_details(&mut ex, update.clone()) - .await - .with_context(|| format!("insert_settlement_details: {update:?}"))?; - ex.commit().await?; - { // temporary to debug and compare with current implementation // TODO: use instead of current implementation @@ -203,6 +198,11 @@ impl Inner { ); } + Postgres::update_settlement_details(&mut ex, update.clone()) + .await + .with_context(|| format!("insert_settlement_details: {update:?}"))?; + ex.commit().await?; + Ok(true) }