Skip to content

Commit 9da9204

Browse files
authored
Merge pull request #351 from Markadrian6399/feature/issue-31-trade-detail-view
feat: trade detail view with timeline, actions, and export (Issue #31)
2 parents ade9219 + ad3e333 commit 9da9204

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

frontend/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,7 @@ import { enforceHttps, monitorTlsConnection } from '../security/src/ssl.js';
10011001
initHelpNav();
10021002
initKeyboardNavigation();
10031003
initForms();
1004+
initTradeDetailForm();
10041005
initSmoothScroll();
10051006
initFocusManagement();
10061007
checkReducedMotion();

indexer/src/models.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,40 @@ pub struct FeesWithdrawnData {
8383
pub to: String,
8484
}
8585

86+
// =============================================================================
87+
// Trade Detail View (Issue #31)
88+
// =============================================================================
89+
90+
#[derive(Debug, Clone, Serialize, Deserialize)]
91+
pub struct TradeTimelineEntry {
92+
pub status: String,
93+
pub ledger: i64,
94+
pub timestamp: Option<DateTime<Utc>>,
95+
pub transaction_hash: Option<String>,
96+
}
97+
98+
#[derive(Debug, Clone, Serialize, Deserialize)]
99+
pub struct TradeDetailResponse {
100+
pub trade_id: i64,
101+
pub seller: String,
102+
pub buyer: String,
103+
pub amount: i64,
104+
pub fee: Option<i64>,
105+
pub seller_payout: Option<i64>,
106+
pub arbitrator: Option<String>,
107+
pub status: String,
108+
pub created_at: DateTime<Utc>,
109+
pub updated_at: Option<DateTime<Utc>>,
110+
pub timeline: Vec<TradeTimelineEntry>,
111+
pub transaction_history: Vec<Event>,
112+
pub metadata: Option<serde_json::Value>,
113+
}
114+
115+
#[derive(Debug, Clone, Serialize, Deserialize)]
116+
pub struct TradeDetailQuery {
117+
pub viewer: Option<String>,
118+
}
119+
86120
#[derive(Debug, Clone, Serialize, Deserialize)]
87121
pub struct EventQuery {
88122
pub limit: Option<i64>,

0 commit comments

Comments
 (0)