Skip to content
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

fix (cherry-pick): increase signing or submitting alert severity to danger (#29140) #29192

Merged

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Dec 13, 2024

Description

Cherry-pick of #29140 for release 12.9.2.

Open in GitHub Codespaces

Related issues

Fixes: #29138

Manual testing steps

  1. Go to this page...

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.

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

This PR addresses an issue where users are currently able to submit
multiple Smart Transaction (STX) requests while one is still pending in
the redesigned confirmation flow. This functionality is already
correctly implemented in the legacy confirmation flow, and the
redesigned flow is updated to match this behaviour.

**Changes Introduced:**
- Updates the alert text to match the copy used in the legacy
confirmation flow.
- Increases the severity of the alert from `Warning` to `Danger`.
- Ensures that dangerous banner alerts block the confirm button to avoid
user actions until resolved.

<!--
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?
-->

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

Fixes: #29138

1. Submit a STX
2. Trigger a new transaction

[wait_submitted_tx.webm](https://github.com/user-attachments/assets/0eff285e-46b1-409f-8041-4c99fef89839)

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

- [ ] 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 Dec 13, 2024
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 December 13, 2024 10:48
@vinistevam vinistevam requested review from a team as code owners December 13, 2024 10:48
@@ -411,4 +411,73 @@ describe('Contract Interaction Confirmation Alerts', () => {
await screen.findByTestId('alert-modal-action-showGasFeeModal'),
).toHaveTextContent('Update gas options');
});

it('displays the alert for signing and submitting alerts', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The difference between the lines changed is because this test only exists in the main branch.

@metamaskbot
Copy link
Collaborator

Builds ready [f56ab57]
Page Load Metrics (1887 ± 142 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint29729361816457219
domContentLoaded160928701855290139
load161829261887295142
domInteractive257944178
backgroundConnect676322311
firstReactRender17103462914
getState4491194
initialActions01000
loadScripts115124181360283136
setupStore690192211
uiStartup185631682157339163

@danjm danjm merged commit 02cb6d6 into Version-v12.9.2 Dec 13, 2024
87 of 89 checks passed
@danjm danjm deleted the cherry-pick-fix-signing-submit-alert-severity branch December 13, 2024 17:17
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants