v0.5.533
Fix: Archive Only Closed Positions + Filters & Detail Modal
Archive Logic Fixed
The archive was incorrectly moving ALL filled trades out of Trade History, leaving it empty. Now it only archives:
- Failed, rejected, cancelled orders (never executed)
- Filled trades for closed positions (sold or market resolved) — checked via on-chain position data
Filled trades for positions you still hold stay in Trade History where they belong.
Archive Display
- Now uses
renderFilteredTablewith search, filters (Side, Outcome, Status), and sort by date - Clicking a row opens the detail modal — same as live trading tab
- Shows P&L and Cost columns
- Proper empty state: "Only trades for closed positions (sold or resolved markets) are archived"
Archive GET Endpoint
- Added pagination (
page,pageSizeparams) withtotalPagesin response - Added filters (
side,status,searchquery params)