fix: include Mantle operator fee in Activity Details network fee#33643
fix: include Mantle operator fee in Activity Details network fee#33643adaOctopus wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No other tags are warranted: the changes are scoped to gas fee calculation utilities and activity adapters, not touching swap flows, account management, browser, snaps, network management, or other areas. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ce00a4e. Configure here.
| if (layer1GasFee) { | ||
| return getFeesFromHexFn(addHexes(receiptL2Fee, layer1GasFee) as Hex); | ||
| } | ||
| return getFeesFromHexFn(receiptL2Fee); |
There was a problem hiding this comment.
Receipt L1 fee omitted on confirm
Medium Severity
After a tx is mined, calculateGasEstimate adds layer1GasFee to the receipt L2 fee but never falls back to txReceipt.l1Fee. Activity Details now uses that fallback via getLocalTransactionFees, so the same confirmed OP Stack–style tx can show a higher network fee in Activity than on the confirmation/summary path when meta has no layer1GasFee but the receipt includes l1Fee.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ce00a4e. Configure here.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #33643 +/- ##
=======================================
Coverage 84.61% 84.62%
=======================================
Files 6200 6201 +1
Lines 166650 166692 +42
Branches 40774 40781 +7
=======================================
+ Hits 141017 141067 +50
+ Misses 15984 15976 -8
Partials 9649 9649 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|





Test plan
Note
Low Risk
Localized fee math and display changes with unit tests; L1 preference avoids double-counting on OP Stack–style chains.
Overview
Aligns network fee display with pre-confirm estimates on L2 chains (especially Mantle) by including L1 data and operator costs, not only L2
gasUsed × effectiveGasPrice.Activity Details (
getLocalTransactionFees) now addslayer1GasFeewhen present (TransactionController, includes Mantle operator fee), otherwise receiptl1Fee.layer1GasFeewins overl1Feeso L1 is not double-counted when both exist.Confirmation UI (
calculateGasEstimate): when fees are derived from receipt gas price,layer1GasFeeis still added to the L2 total (same behavior as the estimate path).Pre-commit sets
NODE_OPTIONSto an 8GB heap solint-stagedeslint matchesyarn lintand avoids OOM on the default ~2GB limit.Reviewed by Cursor Bugbot for commit ce00a4e. Bugbot is set up for automated code reviews on this repo. Configure here.