Skip to content

fix: fix network name displayed on confirmation page header#23702

Merged
jpuri merged 2 commits intodevelopfrom
network_name_fix
Mar 27, 2024
Merged

fix: fix network name displayed on confirmation page header#23702
jpuri merged 2 commits intodevelopfrom
network_name_fix

Conversation

@jpuri
Copy link
Copy Markdown
Contributor

@jpuri jpuri commented Mar 25, 2024

Description

fix network name displayed on confirmation page header. network name are displayed wrong in 2 cases:

  1. custom network
  2. custom network with chain_id same as already defined network

Related issues

Fixes: #23686

Manual testing steps

  1. Enable redesign locally
  2. Add custom network
  3. Submit a personal sign on custom network and check header

Screenshots/Recordings

Screenshot 2024-03-25 at 9 42 50 PM
Screenshot 2024-03-25 at 9 42 32 PM

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

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.

@jpuri jpuri added team-confirmations-secure-ux-PR PRs from the confirmations team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) confirmation-redesign labels Mar 25, 2024
@jpuri jpuri requested a review from a team as a code owner March 25, 2024 16:16
@github-actions
Copy link
Copy Markdown
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.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [473d8d2]
Page Load Metrics (808 ± 475 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint694291368943
domContentLoaded990312311
load572560808990475
domInteractive990302311
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.81%. Comparing base (87d98ea) to head (473d8d2).
Report is 29 commits behind head on develop.

❗ Current head 473d8d2 differs from pull request most recent head f868cf3. Consider uploading reports for the commit f868cf3 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #23702   +/-   ##
========================================
  Coverage    68.81%   68.81%           
========================================
  Files         1169     1169           
  Lines        44376    44379    +3     
  Branches     11874    11878    +4     
========================================
+ Hits         30536    30539    +3     
  Misses       13840    13840           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

if (providerType === NETWORK_TYPES.RPC || type === NETWORK_TYPES.RPC) {
const { nickname } = confirmationNetwork;
if (providerConfig.type === NETWORK_TYPES.RPC) {
networkDisplayName = nickname ?? t('privateNetwork');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[double-checking] if there wasn't confirmationNetwork found and if providerConfig.type === NETWORK_TYPES.RPC), would we want to set networkDisplayName to t('privateNetwork')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, providerConfig.type === NETWORK_TYPES.RPC) is true for custom networks.

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
@jpuri jpuri requested a review from digiwand March 26, 2024 14:34
@jpuri jpuri merged commit 3dbe2e6 into develop Mar 27, 2024
@jpuri jpuri deleted the network_name_fix branch March 27, 2024 09:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 27, 2024
@metamaskbot metamaskbot added the release-11.15.0 Issue or pull request that will be included in release 11.15.0 label Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

confirmation-redesign release-11.15.0 Issue or pull request that will be included in release 11.15.0 team-confirmations-secure-ux-PR PRs from the confirmations team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Bug]: Confirmations Re-design - Network Name not correct in signature headers

5 participants