Skip to content

Conversation

@gantunesr
Copy link
Member

@gantunesr gantunesr commented Jul 28, 2025

Description

Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:

  1. What is the reason for the change? The AddressQRCode component currently uses a history.push call to navigate to its respective account details page. This is erroneous because account details uses history.goBack which just picks the page it came from which is AddressQRCode.
  2. What is the improvement/solution? Use history.goBack in the AddressQRCode component.

Cherry-pick from: #34381

Fixes: #34607

Manual testing steps

  1. Build from this branch.
  2. Navigate to an account's address qr code page, navigate back to the
    account details page, hit back again.
  3. Observe that the navigation leads you back to the home page.

Screenshots/Recordings

Before

Screen.Recording.2025-07-17.at.4.13.13.PM.mov

After

Screen.Recording.2025-07-17.at.4.23.26.PM.mov

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.

…vigation (#34381)

## **Description**

Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change? The `AddressQRCode` component
currently uses a `history.push` call to navigate to its respective
account details page. This is erroneous because account details uses
`history.goBack` which just picks the page it came from which is
`AddressQRCode`.
2. What is the improvement/solution? Use `history.goBack` in the
`AddressQRCode` component.

## **Manual testing steps**

1. Build from this branch.
2. Navigate to an account's address qr code page, navigate back to the
account details page, hit back again.
3. Observe that the navigation leads you back to the home page.

## **Screenshots/Recordings**

### **Before**


https://github.com/user-attachments/assets/e238f5fc-4dc4-4901-b137-984b06d85130

### **After**


https://github.com/user-attachments/assets/da2e140e-9455-4612-93ef-66ec730e4dc1

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
@gantunesr gantunesr requested a review from a team as a code owner July 28, 2025 19:52
@github-actions
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.

@metamaskbot metamaskbot added team-accounts-framework Accounts Framework team INVALID-PR-TEMPLATE PR's body doesn't match template labels Jul 28, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (2 files, +5 -11)
  • 📁 ui/
    • 📁 pages/
      • 📁 multichain-accounts/
        • 📁 address-qr-code/
          • 📄 address-qr-code.test.tsx +4 -9
          • 📄 address-qr-code.tsx +1 -2

@metamaskbot
Copy link
Collaborator

Builds ready [d995897]
UI Startup Metrics (1251 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1251112513725812891346
load107798611985111091159
domContentLoaded106896011895311031152
domInteractive18134671641
firstPaint66178117343110881146
backgroundConnect21119733614212229
firstReactRender21144662435
getState1034171327
initialActions40568516
loadScripts86575898952899946
setupStore74233814
WebpackHomeuiStartup23801824288320424792775
load18601361232718919312216
domContentLoaded18481354231519219222190
domInteractive2013202221561
firstPaint186672127208205302
backgroundConnect49134968032278
firstReactRender1678938264183327
getState2532565614220
initialActions9217223615
loadScripts18431350230419119172178
setupStore236240431742
FirefoxBrowserifyHomeuiStartup14991284213116015611865
load12861110168610713331457
domContentLoaded12861110168610713331457
domInteractive1193560696106328
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2613105132763
firstReactRender292166122963
getState1932334213157
initialActions40667312
loadScripts12641097166710513141432
setupStore12316521854
WebpackHomeuiStartup17961531384226518852117
load15071328193514015891781
domContentLoaded15061327193514015891780
domInteractive100343926297289
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect291887113447
firstReactRender53426755762
getState132255271536
initialActions6022322418
loadScripts14821307190513715661753
setupStore2252354914190
Benchmark value 1252 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1077 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1068 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 212 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 5 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 865 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 230 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 16 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 947 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2381 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1860 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1849 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 50 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 9 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1844 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2775 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2217 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2191 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 61 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 278 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 220 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 15 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2179 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 1499 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1286 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1286 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 119 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 19 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 1265 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 12 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1865 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 328 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 63 exceeds gate value 55 for firefox browserify home p95 firstReactRender
Benchmark value 157 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 54 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1797 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1507 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1507 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 101 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 29 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 53 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 7 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1483 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 23 exceeds gate value 13 for firefox webpack home mean setupStore
Benchmark value 2117 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1781 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1780 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 289 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 62 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 36 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 18 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 1753 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 190 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 1752ms | Sum of p95 exceeds: 2750.8ms
Sum of all benchmark exceeds: 4502.8ms

@DDDDDanica DDDDDanica changed the title fix: update address QR code navigation to prevent infinite loop of navigation fix: update address QR code navigation to prevent infinite loop of navigation cherry-pick cp-13.0.0 Jul 29, 2025
@DDDDDanica DDDDDanica merged commit 11ecde4 into Version-v13.0.0 Jul 29, 2025
279 of 281 checks passed
@DDDDDanica DDDDDanica deleted the fix/cp/qr-navigation branch July 29, 2025 00:53
@github-actions github-actions bot locked and limited conversation to collaborators Jul 29, 2025
@metamaskbot metamaskbot added the release-13.0.0 Issue or pull request that will be included in release 13.0.0 (also called 12.24.0) label Aug 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-13.0.0 Issue or pull request that will be included in release 13.0.0 (also called 12.24.0) team-accounts-framework Accounts Framework team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants