diff --git a/ui/components/app/perps/perps-view.test.tsx b/ui/components/app/perps/perps-view.test.tsx index 69ae4e431729..89df2de13622 100644 --- a/ui/components/app/perps/perps-view.test.tsx +++ b/ui/components/app/perps/perps-view.test.tsx @@ -203,6 +203,31 @@ describe('PerpsView', () => { ).toBeInTheDocument(); }); + it('filters out order and funding transactions from Recent Activity', () => { + // mockTransactions contains trades (tx-001, tx-002, tx-002b), + // a funding entry (tx-003), orders (tx-004 to tx-004d), and a deposit (tx-005) + jest.mocked(usePerpsTransactionHistory).mockReturnValueOnce({ + transactions: mocks.mockTransactions, + isLoading: false, + error: null, + refetch: jest.fn(), + }); + + renderWithProvider(, mockStore); + + // Trade and deposit cards should be shown + expect(screen.getByTestId('transaction-card-tx-001')).toBeInTheDocument(); + expect(screen.getByTestId('transaction-card-tx-005')).toBeInTheDocument(); + + // Funding and order cards must not appear in Recent Activity + expect( + screen.queryByTestId('transaction-card-tx-003'), + ).not.toBeInTheDocument(); + expect( + screen.queryByTestId('transaction-card-tx-004'), + ).not.toBeInTheDocument(); + }); + it('shows watchlist when mock watchlist symbols match market data', () => { renderWithProvider(, mockStore); diff --git a/ui/components/app/perps/perps-view.tsx b/ui/components/app/perps/perps-view.tsx index 0f028811413f..8aeadceea3f5 100644 --- a/ui/components/app/perps/perps-view.tsx +++ b/ui/components/app/perps/perps-view.tsx @@ -68,11 +68,25 @@ export const PerpsView: React.FC = () => { } = usePerpsLiveMarketData(); const { - transactions: recentActivityTransactions, + transactions: allRecentActivityTransactions, isLoading: recentActivityLoading, error: recentActivityError, } = usePerpsTransactionHistory(); + // Recent Activity shows only trade executions, deposits, and withdrawals. + // Open orders are already surfaced in PerpsPositionsOrders above. + // Funding payments belong in the full activity page. + const recentActivityTransactions = useMemo( + () => + allRecentActivityTransactions.filter( + (tx) => + tx.type === 'trade' || + tx.type === 'deposit' || + tx.type === 'withdrawal', + ), + [allRecentActivityTransactions], + ); + // Show only user-placed limit orders resting on the orderbook. // Excludes: // - isTrigger: TP/SL trigger orders