Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion contracts/escrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ mod propchain_escrow {
fee_rate_bps: u16,
/// Fee recipient account
fee_recipient: Option<AccountId>,
/// Escrow analytics data
analytics: EscrowAnalytics,
/// Unique participant tracking for analytics
/// Aggregated escrow analytics for dashboard display
analytics: EscrowAnalytics,
/// Tracks unique participants: AccountId -> bool
Expand Down Expand Up @@ -344,12 +347,12 @@ mod propchain_escrow {
large_transfer_requests: Mapping::default(),
large_transfer_request_count: 0,
escrow_active_large_transfer: Mapping::default(),
// 0 means "use global constant from propchain_traits::constants"
large_transfer_threshold: 0,
very_large_transfer_threshold: 0,
tax_compliance_contract,
fee_rate_bps: 0,
fee_recipient: None,
analytics: EscrowAnalytics::default(),
analytics: EscrowAnalytics {
total_created: 0,
total_released: 0,
Expand Down
22 changes: 21 additions & 1 deletion contracts/escrow/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,24 @@ pub struct EscrowAnalytics {
pub total_disputes_resolved: u64,
/// Number of unique participants (buyers + sellers)
pub unique_participants: u64,
}
}

impl Default for EscrowAnalytics {
fn default() -> Self {
Self {
total_created: 0,
total_released: 0,
total_refunded: 0,
total_disputed: 0,
total_active: 0,
total_volume: 0,
total_released_volume: 0,
total_fees_collected: 0,
average_escrow_amount: 0,
average_dispute_resolution_time: 0,
total_disputes_resolved: 0,
unique_participants: 0,
}
}
}
}
1 change: 0 additions & 1 deletion contracts/staking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1566,5 +1566,4 @@ fn set_early_withdrawal_penalty_max_cap() {
assert_eq!(vesting_after_claim.claimable_at_block(200), 0);
assert_eq!(vesting_after_claim.claimable_at_block(300), 500);
}
}

Loading