From fda1f8c52465e7af2e0515143c92978fd6114e99 Mon Sep 17 00:00:00 2001 From: thesn10 <38666407+thesn10@users.noreply.github.com> Date: Tue, 19 May 2026 19:47:21 +0200 Subject: [PATCH] feat(descro): add dispute_raised_at field and DISPUTE_TIMEOUT_SECS constant --- programs/descro/src/constants.rs | 2 +- programs/descro/src/instructions/create_escrow.rs | 1 + programs/descro/src/state.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/descro/src/constants.rs b/programs/descro/src/constants.rs index be6ed13..b489fef 100644 --- a/programs/descro/src/constants.rs +++ b/programs/descro/src/constants.rs @@ -1 +1 @@ -// reserved for future constants +pub const DISPUTE_TIMEOUT_SECS: i64 = 14 * 24 * 60 * 60; // 14 days diff --git a/programs/descro/src/instructions/create_escrow.rs b/programs/descro/src/instructions/create_escrow.rs index b262324..38c7263 100644 --- a/programs/descro/src/instructions/create_escrow.rs +++ b/programs/descro/src/instructions/create_escrow.rs @@ -45,5 +45,6 @@ pub fn handler( escrow.bump = ctx.bumps.escrow_account; escrow.vault_bump = ctx.bumps.vault; escrow.escrow_id = escrow_id; + escrow.dispute_raised_at = None; Ok(()) } diff --git a/programs/descro/src/state.rs b/programs/descro/src/state.rs index aa227ad..8502580 100644 --- a/programs/descro/src/state.rs +++ b/programs/descro/src/state.rs @@ -11,6 +11,7 @@ pub struct EscrowAccount { pub bump: u8, pub vault_bump: u8, pub escrow_id: u64, + pub dispute_raised_at: Option, } #[derive(AnchorSerialize, AnchorDeserialize, Clone, PartialEq, InitSpace, Debug)]