Skip to content

fix: display network switch notification for bridge screen #31037

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 3 commits into from
Mar 21, 2025

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Mar 17, 2025

Description

This PR aims to display the network switch notification when users try to bridge a token on a network other than the current selected one, informing the user that a switch network hanppended.

Open in GitHub Codespaces

Related issues

Fixes: #30925

Manual testing steps

  1. Enable Popular network view
  2. Select a token on a network other than the current selected one
  3. Start Bridge

Screenshots/Recordings

switch-notification.webm

Before

After

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.

@vinistevam vinistevam added the team-confirmations Push issues to confirmations team label Mar 17, 2025
Copy link
Contributor

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.

@vinistevam vinistevam marked this pull request as ready for review March 17, 2025 10:50
@hesterbruikman
Copy link

@vinistevam would this switch notification continue to appear when there is no 'actual' network switch? I believe there is benefit in giving the user feedback of the network that they will interact with based on the token selection also in the case of having no global network.

I ask because Wallet UX is working on removing the GNS and I'd like to understand if this toast will remain visible.

@vinistevam
Copy link
Contributor Author

vinistevam commented Mar 17, 2025

@vinistevam would this switch notification continue to appear when there is no 'actual' network switch? I believe there is benefit in giving the user feedback of the network that they will interact with based on the token selection also in the case of having no global network.

I ask because Wallet UX is working on removing the GNS and I'd like to understand if this toast will remain visible.

@hesterbruikman
If there is no network switch this notification won't be displayed, it's part of the current logic. This PR is specifically addressing a missing condition so it was set to display as the extension switches the network but the notification was not visible when the user is on the bridge screen.

@metamaskbot
Copy link
Collaborator

Builds ready [cdeddc6]
Page Load Metrics (3558 ± 1106 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint178912824325822781094
domContentLoaded170412544289022751092
load180213048355823031106
domInteractive281171121244117
backgroundConnect1111515613333160
firstReactRender432361064622
getState3674327517283
initialActions01000
loadScripts128311349216021391027
setupStore1848213911354
uiStartup232215135651435331697
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 71 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@vinistevam vinistevam added this pull request to the merge queue Mar 21, 2025
Merged via the queue into main with commit e61196a Mar 21, 2025
76 checks passed
@vinistevam vinistevam deleted the fix/network-switch-notification-bridge branch March 21, 2025 10:52
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2025
@metamaskbot metamaskbot added the release-12.16.0 Issue or pull request that will be included in release 12.16.0 label Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.16.0 Issue or pull request that will be included in release 12.16.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Network switch notification is not displayed for Bridge transactions
5 participants