Skip to content

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Dec 11, 2025

Description

This PR hide shield coverage footer when user change payment method
crypto to crypto transaction confirmation screen since currently rule
engine doesn't cover this tx yet.
Also refactor useEnableShieldCoverageChecks to handle hide/show
coverage footer

Open in GitHub Codespaces

Changelog

CHANGELOG entry: hide shield coverage footer in shield approval
transaction

Related issues

Fixes:

Manual testing steps

  1. Subscribe to shield with crypto
  2. go to shield settings screen and change payment method to other
    crypto
  3. shield approval confirmation screen should not show footer coverage
    indicator

Screenshots/Recordings

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.

Note

Hides the shield coverage footer for shield payment method approval transactions by refactoring the coverage-check hook to expose isShowCoverageIndicator, updating footer/indicator usage, and adjusting tests.

  • Confirmations UI
    • Footer (footer.tsx): Use isShowCoverageIndicator for footer shadow styling; continue rendering ShieldFooterCoverageIndicator.
    • Shield Coverage Indicator (shield-footer-coverage-indicator.tsx): Rely on isShowCoverageIndicator to render; remove local transaction-type checks; keep pause handling for animation severity.
  • Hook (useEnableShieldCoverageChecks)
    • Compute isShowCoverageIndicator based on: basic functionality + SHIELD subscription status, confirmation type (signature/transaction), and exclude TransactionType.shieldSubscriptionApprove.
    • Return { isEnabled, isPaused, isShowCoverageIndicator }.
  • Tests
    • Update mocks to include isShowCoverageIndicator and switch to renderHookWithConfirmContextProvider.
    • Ensure indicator renders when coverage indicator is enabled.

Written by Cursor Bugbot for commit 4245ba4. This will update automatically on new commits. Configure here.


Co-authored-by: Howard Braham [email protected] 334815a

…p-13.13.0 (#38754)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

<!--
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?
2. What is the improvement/solution?
-->

This PR hide shield coverage footer when user change payment method
crypto to crypto transaction confirmation screen since currently rule
engine doesn't cover this tx yet.
Also refactor `useEnableShieldCoverageChecks` to handle hide/show
coverage footer

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38754?quickstart=1)

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: hide shield coverage footer in shield approval
transaction

Fixes:

1. Subscribe to shield with crypto
2. go to shield settings screen and change payment method to other
crypto
3. shield approval confirmation screen should not show footer coverage
indicator

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [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.

- [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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Hides the shield coverage footer for shield approval transactions and
refactors visibility into `useEnableShieldCoverageChecks`, updating
related components and tests.
>
> - **Confirmations UI**
>   - **Hook `useEnableShieldCoverageChecks`**:
> - Adds `isShowCoverageIndicator` derived from subscription status,
basic functionality, and confirmation type; excludes
`TransactionType.shieldSubscriptionApprove`.
>     - Continues to expose `isEnabled` and `isPaused`.
>   - **Footer `footer.tsx`**:
> - Uses `isShowCoverageIndicator` to conditionally apply footer shadow.
>   - **`ShieldFooterCoverageIndicator`**:
> - Renders based on `isShowCoverageIndicator`; removes local
transaction-type checks; adjusts animation severity using `isPaused`.
> - **Tests**
> - Update mocks to include `isShowCoverageIndicator` and switch to
`renderHookWithConfirmContextProvider` helpers.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3635dcc. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Howard Braham <[email protected]>
@runway-github runway-github bot requested review from a team as code owners December 11, 2025 23:23
@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Dec 11, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (5 files, +34 -19)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 footer/
              • 📁 shield-footer-coverage-indicator/
                • 📄 shield-footer-coverage-indicator.test.tsx +1 -0
                • 📄 shield-footer-coverage-indicator.tsx +2 -10
                • 📄 footer.tsx +2 -3
        • 📁 hooks/
          • 📁 transactions/
            • 📄 useEnableShieldCoverageChecks.test.ts +5 -5
            • 📄 useEnableShieldCoverageChecks.ts +24 -1

🔐 @MetaMask/web3auth (5 files, +34 -19)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 footer/
              • 📁 shield-footer-coverage-indicator/
                • 📄 shield-footer-coverage-indicator.test.tsx +1 -0
                • 📄 shield-footer-coverage-indicator.tsx +2 -10
                • 📄 footer.tsx +2 -3
        • 📁 hooks/
          • 📁 transactions/
            • 📄 useEnableShieldCoverageChecks.test.ts +5 -5
            • 📄 useEnableShieldCoverageChecks.ts +24 -1

@metamaskbot
Copy link
Collaborator

Builds ready [4245ba4]
UI Startup Metrics (1293 ± 121 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12931025162312113631512
load1079857144311311521268
domContentLoaded1073850143511211471261
domInteractive2715164232285
firstPaint5049513313999601211
backgroundConnect22319926216235251
firstReactRender311970103451
getState41131432646110
initialActions105113
loadScripts85665512071069261044
setupStore1353251523
numNetworkReqs271890201883
BrowserifyPower User HomeuiStartup19731538274223820872432
load1016888155612410331308
domContentLoaded1005880154012410231297
domInteractive32171222331107
firstPaint56510215483989481307
backgroundConnect272202835144231684
firstReactRender52407275762
getState18314871759185251
initialActions109112
loadScripts79568612301158131080
setupStore16104371739
numNetworkReqs78652252673136
WebpackStandard HomeuiStartup83870399575874981
load65157381666697783
domContentLoaded64657081266693778
domInteractive2716101202386
firstPaint27287794204268747
backgroundConnect1066271021
firstReactRender3121209253241
getState261463113448
initialActions103111
loadScripts64356881064691772
setupStore1152741318
numNetworkReqs26990191881
WebpackPower User HomeuiStartup15471215211821717201978
load66958995080686863
domContentLoaded66158394381680857
domInteractive33171272629111
firstPaint29493926215336742
backgroundConnect105759219433560
firstReactRender55427885971
getState17214425419176219
initialActions102112
loadScripts65858193579678848
setupStore1597191541
numNetworkReqs77632302473136
FirefoxBrowserifyStandard HomeuiStartup13191095198215914191598
load107392213108611331227
domContentLoaded107292113098711321227
domInteractive58301353083115
firstPaint------
backgroundConnect50202974952156
firstReactRender2418110102234
getState137115161046
initialActions103012
loadScripts104690612497911111173
setupStore146232251037
numNetworkReqs281885202482
BrowserifyPower User HomeuiStartup27131708568077726944449
load1320956330250713202643
domContentLoaded1320949330150713202642
domInteractive159331221230106932
firstPaint------
backgroundConnect182221106256136859
firstReactRender57352182459110
getState25065948204236789
initialActions2043423
loadScripts1256938265143412252457
setupStore1164928182103677
numNetworkReqs76551602773148
WebpackStandard HomeuiStartup16071357225016216931934
load13131123184510813741476
domContentLoaded13131123184510813701476
domInteractive71291763492133
firstPaint------
backgroundConnect62172594572166
firstReactRender26217272738
getState15788141553
initialActions103122
loadScripts12801102181310113331411
setupStore196116211671
numNetworkReqs281886202882
WebpackPower User HomeuiStartup31342055546887939384925
load15911157310950117812825
domContentLoaded15911156310950117802825
domInteractive11831100113993416
firstPaint------
backgroundConnect189241117249206936
firstReactRender71363475070180
getState330681038264525854
initialActions30841026
loadScripts15041123309244216612728
setupStore83694615267386
numNetworkReqs77531682870146
📊 Page Load Benchmark Results

Current Commit: 4245ba4 | Date: 12/11/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±38ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 738ms (±36ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±10ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 38ms 1.02s 1.33s 1.09s 1.33s
domContentLoaded 738ms 36ms 710ms 1.00s 764ms 1.00s
firstPaint 77ms 10ms 60ms 160ms 88ms 160ms
firstContentfulPaint 77ms 10ms 60ms 160ms 88ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

@HowardBraham HowardBraham merged commit 148c190 into release/13.13.0 Dec 12, 2025
175 of 178 checks passed
@HowardBraham HowardBraham deleted the cherry-pick-13-13-0-334815a branch December 12, 2025 00:05
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2025
@metamaskbot metamaskbot added the release-13.13.0 Issue or pull request that will be included in release 13.13.0 label Dec 12, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-13.13.0 on PR, as PR was cherry-picked in branch 13.13.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.13.0 Issue or pull request that will be included in release 13.13.0 team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants