-
Notifications
You must be signed in to change notification settings - Fork 5.5k
release(runway): cherry-pick fix: shield change payment method crypto don't show coverage footer #38791
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
+34
−19
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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 [](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]>
Collaborator
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (5 files, +34 -19)
🔐 @MetaMask/web3auth (5 files, +34 -19)
|
Collaborator
Builds ready [4245ba4]
UI Startup Metrics (1293 ± 121 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
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.)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
useEnableShieldCoverageChecksto handle hide/showcoverage footer
Changelog
CHANGELOG entry: hide shield coverage footer in shield approval
transaction
Related issues
Fixes:
Manual testing steps
crypto
indicator
Screenshots/Recordings
Before
After
Pre-merge author checklist
Docs and MetaMask
Extension Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
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.footer.tsx): UseisShowCoverageIndicatorfor footer shadow styling; continue renderingShieldFooterCoverageIndicator.shield-footer-coverage-indicator.tsx): Rely onisShowCoverageIndicatorto render; remove local transaction-type checks; keep pause handling for animation severity.useEnableShieldCoverageChecks)isShowCoverageIndicatorbased on: basic functionality + SHIELD subscription status, confirmation type (signature/transaction), and excludeTransactionType.shieldSubscriptionApprove.{ isEnabled, isPaused, isShowCoverageIndicator }.isShowCoverageIndicatorand switch torenderHookWithConfirmContextProvider.Written by Cursor Bugbot for commit 4245ba4. This will update automatically on new commits. Configure here.
Co-authored-by: Howard Braham [email protected] 334815a