Skip to content

fix: cp-12.18.0 bridge activity log doesn't update and may show incorrect token amounts #32387

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

Merged
merged 12 commits into from
May 6, 2025

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Apr 29, 2025

Description

Fixes

  • remove caching for getTxStatus calls, which causes status fetches to only happen every 10 minutes
  • remove duplicate Bridge tx events
  • hide Bridge tx segments if txHistory is not available to show Failed/Completed transactions accurately
  • show "Bridge" instead of "Bridge to" if dest chain info is unavailable
  • In Popular Chains activity view, hide Bridge tx fiat values if the tx's chain is not the currentChainId. This prevents inaccurate values from being displayed and is also how Swap txs are displayed

Open in GitHub Codespaces

Related issues

Fixes: #32390 , #32477, #32266

Manual testing steps

  1. Use existing account with transactions on multiple networks
  2. Open Activity view and select "Popular networks"
  3. Token amounts and fiat values should be accurate for Bridge transactions

Screenshots/Recordings

Before / After

Before After
Screenshot 2025-05-05 at 12 12 27 PM Screenshot 2025-05-05 at 12 08 56 PM
Screenshot 2025-05-05 at 12 16 49 PM Screenshot 2025-05-05 at 12 14 03 PM
Screenshot 2025-05-05 at 12 17 00 PM Screenshot 2025-05-05 at 12 19 26 PM
Screenshot 2025-05-05 at 12 19 48 PM Screenshot 2025-05-05 at 12 20 46 PM

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@metamaskbot metamaskbot added the team-swaps-and-bridge For issues with Swaps or Bridging label Apr 29, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Apr 29, 2025

✨ Files requiring CODEOWNER review ✨

🔄 @MetaMask/swaps-engineers

  • ui/pages/bridge/hooks/useBridgeTokenDisplayData.ts

@metamaskbot
Copy link
Collaborator

Builds ready [8d8176c]
UI Startup Metrics (1189 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1189108814716212111327
load103494412025510561166
domContentLoaded102893911965410481159
domInteractive16133141628
firstPaint744134116939010431118
backgroundConnect7330479
firstReactRender20164252032
getState1253681728
initialActions001001
loadScripts79371096353814908
setupStore85182813
WebpackHomeuiStartup21571776264920623252489
load16811370210016117921976
domContentLoaded16731366208915717831942
domInteractive161176111444
firstPaint1706538564223280
backgroundConnect2910167223078
firstReactRender20056386118309357
getState134216211327
initialActions326145
loadScripts16681365206415517801917
setupStore217283282436
FirefoxBrowserifyHomeuiStartup13611192175911414201616
load12151032163012012851462
domContentLoaded12151032163012012841462
domInteractive1043822930114171
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2013102102030
firstReactRender22193332228
getState84526710
initialActions002001
loadScripts11981016161412112691450
setupStore841821869
WebpackHomeuiStartup15671378210314016211857
load13401192186312314031577
domContentLoaded13391192186312314031577
domInteractive83391552197125
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23158592444
firstReactRender37295253948
getState134307301032
initialActions002111
loadScripts13201177184612213811557
setupStore85172914
Benchmark value 2490 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Sum of mean exceeds: 0ms | Sum of p95 exceeds: 36ms
Sum of all benchmark exceeds: 36ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 34 Bytes (0%)
  • common: 0 Bytes (0%)

@micaelae micaelae changed the title fix: bridge EVM activity log items show incorrect token amounts fix: bridge EVM activity log items show incorrect token amounts cp-12.18.0 May 2, 2025
@micaelae micaelae changed the title fix: bridge EVM activity log items show incorrect token amounts cp-12.18.0 fix: bridge activity log doesn't update and may show incorrect token amounts cp-12.18.0 May 2, 2025
@micaelae micaelae changed the title fix: bridge activity log doesn't update and may show incorrect token amounts cp-12.18.0 fix: cp-12.18.0 bridge activity log doesn't update and may show incorrect token amounts May 3, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [08f6ed5]
UI Startup Metrics (1230 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1230109415867212661363
load106996614066511081175
domContentLoaded106396214006511021171
domInteractive18136181729
firstPaint69398115342310761135
backgroundConnect74244720
firstReactRender21144762039
getState1455192031
initialActions001001
loadScripts820716115262855910
setupStore85172814
WebpackHomeuiStartup21121674252717922502373
load16401259199114817531857
domContentLoaded16331251197914717451852
domInteractive151054101343
firstPaint1576034557170271
backgroundConnect3010266343158
firstReactRender18153393117301358
getState144319311422
initialActions319135
loadScripts16281248195514617431848
setupStore236386462234
FirefoxBrowserifyHomeuiStartup13551179178212213921645
load12041052164411412371489
domContentLoaded12041052164411312361480
domInteractive1013923529114155
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect20124872037
firstReactRender23195252327
getState84376826
initialActions002001
loadScripts11861036161711212211460
setupStore10419726634
WebpackHomeuiStartup15821391204615216651917
load13611176179814414371687
domContentLoaded13611176179814414371687
domInteractive82452272585141
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2416101102543
firstReactRender35296253745
getState95325926
initialActions102111
loadScripts13401160177614214201601
setupStore95394919
Benchmark value 1064 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 20 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 34 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1687 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1687 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Sum of mean exceeds: 5ms | Sum of p95 exceeds: 65ms
Sum of all benchmark exceeds: 70ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: -7.85 KiB (-0.15%)
  • ui: 11.4 KiB (0.16%)
  • common: -12.07 KiB (-0.13%)

@micaelae micaelae marked this pull request as ready for review May 5, 2025 19:36
@micaelae micaelae requested a review from a team as a code owner May 5, 2025 19:36
@micaelae micaelae enabled auto-merge May 5, 2025 19:48
@micaelae micaelae added this pull request to the merge queue May 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 5, 2025
@micaelae micaelae added this pull request to the merge queue May 5, 2025
@micaelae micaelae removed this pull request from the merge queue due to a manual request May 5, 2025
@micaelae micaelae added this pull request to the merge queue May 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2025
@micaelae micaelae added this pull request to the merge queue May 6, 2025
Merged via the queue into main with commit 9d8ba81 May 6, 2025
190 checks passed
@micaelae micaelae deleted the cp-12.18-bridge-evm-activity branch May 6, 2025 01:47
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-e2e-quality-gate team-swaps-and-bridge For issues with Swaps or Bridging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Bridge tx details show incorrect token amounts
4 participants