-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat: implement tx history for perps #39445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (15 files, +1903 -5)
|
Builds ready [ea32709]
UI Startup Metrics (1301 ± 102 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ba8b5de to
911b4e3
Compare
Builds ready [911b4e3]
UI Startup Metrics (1326 ± 100 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
911b4e3 to
f47f8f3
Compare
179e38e to
11c1595
Compare
Builds ready [11c1595]
UI Startup Metrics (1290 ± 119 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [2d7d166]
UI Startup Metrics (1317 ± 117 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
064e2e3 to
ede6099
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
| return { | ||
| text: `${transaction.fill.realizedPnl.startsWith('-') ? '-' : '+'}$${transaction.fill.realizedPnl.replace(/^[+-]/u, '')}`, | ||
| color: getTransactionAmountColor(transaction.fill.realizedPnl), | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color mismatch for positive PnL without prefix
Medium Severity
When realizedPnl lacks a sign prefix, the display text adds a '+' sign but getTransactionAmountColor returns neutral color instead of green. This creates inconsistent UI where a visibly positive amount displays in neutral color rather than success color. The funding transaction logic (lines 70-76) correctly handles this case inline but the PnL path delegates to a utility that expects prefixed values.
| > | ||
| {amountDisplay.text} | ||
| </Text> | ||
| </Box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing timestamp display in transaction cards
Medium Severity
The TransactionCard comment states "amount + time on right" and the Box element is labeled "Right side: Amount and time", but only the amount is rendered. The timestamp field from PerpsTransaction is never displayed, leaving users unable to see when transactions occurred. Transaction history UIs require timestamps for users to understand temporal context.
Builds ready [ede6099]
UI Startup Metrics (1398 ± 91 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|


Description
Implements transaction history UI for perpetual futures trading, enabling users to view and filter their trading activity.
Key changes:
Architecture:
Changelog
CHANGELOG entry: Implements transaction history UI for perps
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
perps_history.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds new perps activity route and new UI components/utilities for rendering and filtering transaction history; risk is mostly UI/UX regressions and navigation/i18n edge cases rather than core funds handling.
Overview
Adds perps transaction history UI, including a reusable
TransactionCard, aPerpsRecentActivitywidget on the perps tab (with “See All”), and a new fullPerpsActivityPageatPERPS_ACTIVITY_ROUTEwith type filtering and date-grouped sections.Introduces perps transaction types plus mock transaction data, and adds utilities for grouping/filtering transactions and selecting display colors; also expands perps i18n strings for new labels/statuses and updates tests/baselines accordingly.
Written by Cursor Bugbot for commit ede6099. This will update automatically on new commits. Configure here.