chore: memoize Swaps QuoteRow rendering#33392
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33392 +/- ##
========================================
Coverage 84.40% 84.40%
========================================
Files 6133 6134 +1
Lines 163917 163814 -103
Branches 40007 39988 -19
========================================
- Hits 138354 138274 -80
+ Misses 16054 16050 -4
+ Partials 9509 9490 -19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
This is a performance optimization (React.memo on QuoteRowView, moving selector calls up to the list level) and a structural refactoring of the bridge quote display UI. The changes affect:
SmokeSwap is selected because the bridge-action-smoke.spec.ts directly tests the bridge flow (ETH to Base bridge) which exercises the QuoteSelectorView. The quote list and row components are part of the bridge quote selection UI that users interact with during a bridge transaction. SmokeConfirmations is selected per the SmokeSwap tag description: "When selecting SmokeSwap, also select SmokeConfirmations (transaction confirmations are part of the flow)." No other tags are needed as the changes are isolated to the Bridge QuoteSelectorView UI components with no impact on other wallet flows. Performance Test Selection: |
|



Description
Reduces unnecessary Bridge quote-row work during quote updates. Currency and destination-token selectors now run once in
QuoteListinstead of once per row, while a memoized presentational row receives primitive display props and skips rendering when its quote values are unchanged.Automated validation:
yarn jest app/components/UI/Bridge/components/QuoteSelectorView/— 70 tests passed.yarn lint:tsc— passed.QuoteRow.tsx.Changelog
CHANGELOG entry: null
Related issues
Fixes: #31367
Manual testing steps
Screenshots/Recordings
Before
N/A — internal performance change with no visual impact.
After
N/A — internal performance change with no visual impact.
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist