set escrow ongoing 0 after decision

This commit is contained in:
fbock
2024-08-28 14:15:18 +02:00
parent a5894ae230
commit d65a95830f

View File

@ -1021,7 +1021,7 @@ impl CoordinatorDB {
// set the winning robohash in the db
pub async fn resolve_escrow(&self, offer_id: &str, winner_robohash: &str) -> Result<()> {
sqlx::query("UPDATE taken_offers SET escrow_winner_robohash = ? WHERE offer_id = ?")
sqlx::query("UPDATE taken_offers SET escrow_ongoing = 0, escrow_winner_robohash = ? WHERE offer_id = ?")
.bind(winner_robohash)
.bind(offer_id)
.execute(&*self.db_pool)