fix: Recent activity fields display orders and funding payments#41446
fix: Recent activity fields display orders and funding payments#41446HowardBraham merged 4 commits intomainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [4e7df56]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 0 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
The perps home tab was showing order and funding transactions in the Recent Activity section. Only trades, deposits, and withdrawals should appear there — open orders are already shown in the Positions/Orders section, and funding payments belong in the full activity page. Adds a useMemo filter in perps-view.tsx and a regression test.
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (2 files, +40 -1)
|
Automated fix-bug run — TAT-2793
Worker reportTAT-2793 Fix Report — Filter perps Recent ActivityRoot Cause
As a result, order and funding payment entries appeared in the Recent Activity Bug location: FixAdded a const recentActivityTransactions = useMemo(
() =>
allRecentActivityTransactions.filter(
(tx) =>
tx.type === 'trade' ||
tx.type === 'deposit' ||
tx.type === 'withdrawal',
),
[allRecentActivityTransactions],
);Open orders are already surfaced in Files Changed
Tests
Evidence
Recipe workflow diagramflowchart TD
%% Verify fix: Recent Activity shows only trades/deposits/withdrawals
__entry__(["ENTRY"]) --> node_nav
node_nav[["nav<br/>perps/navigate-perps-tab"]]
node_scroll_to_activity["scroll-to-activity<br/>scroll"]
node_screenshot_before["screenshot-before<br/>screenshot"]
node_assert_no_order_cards["assert-no-order-cards<br/>eval_sync"]
node_check_no_orders["check-no-orders<br/>eval_sync"]
node_check_no_funding["check-no-funding<br/>eval_sync"]
node_screenshot_final["screenshot-final<br/>screenshot"]
node_done(["done<br/>PASS"])
node_nav --> node_scroll_to_activity
node_scroll_to_activity --> node_screenshot_before
node_screenshot_before --> node_assert_no_order_cards
node_assert_no_order_cards --> node_check_no_orders
node_check_no_orders --> node_check_no_funding
node_check_no_funding --> node_screenshot_final
node_screenshot_final --> node_done
|
Builds ready [933e8f8]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 0 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
@abretonc7s FYI here is the error CLIENT_NOT_INITIALIZED, this is likely unrelated to this PR
|
Builds ready [923da36]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
|
Builds ready [3277fc7]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|




Description
The perps home tab Recent Activity section was displaying order and funding
payment entries alongside trade executions and deposits. Only trades,
deposits, and withdrawals should appear there — open orders are already shown
in the Positions/Orders section above, and funding payments belong on the full
activity page.
Root cause:
perps-view.tsxpassed the unfiltered result ofusePerpsTransactionHistory()directly to<PerpsRecentActivity>. The hookreturns all transaction types (
trade,order,funding,deposit,withdrawal). Added auseMemofilter to keep onlytrade,deposit, andwithdrawalbefore rendering.Changelog
CHANGELOG entry: Fixed a bug causing order and funding transactions to appear in the perps Recent Activity section
Related issues
Fixes: TAT-2793
Manual testing steps
PERPS_ENABLED=truein.metamaskrc+perpsEnabledVersionremote flag)Screenshots/Recordings
Before
Recording:
before.mp4(recipe run against unfixed code — wallet has no live data so empty-state path taken)After
Recording:
after.mp4— recipe validates notransaction-card-order-*ortransaction-card-funding-*elements appear in[data-testid="perps-recent-activity"]. All 7 recipe nodes PASS.Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk UI logic change that only filters which transaction types are shown in the Perps home Recent Activity list; minimal surface area and covered by a new unit test.
Overview
Fixes the Perps home Recent Activity list to exclude
orderandfundingentries by filtering theusePerpsTransactionHistory()results to onlytrade,deposit, andwithdrawalbefore rendering.Adds a regression test in
perps-view.test.tsxasserting that trade/deposit cards render while funding/order cards do not appear.Reviewed by Cursor Bugbot for commit 3277fc7. Bugbot is set up for automated code reviews on this repo. Configure here.