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

[Bug]: Issues with contract interactions alerts #27118

Closed
bschorchit opened this issue Sep 13, 2024 · 4 comments
Closed

[Bug]: Issues with contract interactions alerts #27118

bschorchit opened this issue Sep 13, 2024 · 4 comments
Assignees
Labels
regression-RC-12.3.0 Regression bug that was found in release candidate (RC) for release 12.3.0 release-blocker This bug is blocking the next release Sev2-normal Normal severity; minor loss of service or inconvenience. team-confirmations Push issues to confirmations team type-bug

Comments

@bschorchit
Copy link

bschorchit commented Sep 13, 2024

Describe the bug

There are a few incorrect behaviors of the new alert system. More detail will be added here.

  1. Misleading copy for review alerts modal (claiming potential fund loss even when no risk of fund loss) - video below.
  2. Existing modal for the generic alert - screenshot below

Expected behavior

  1. Expected UI to be added here
  2. No modal should exist for the generic banner alert

Screenshots/Recordings

  1. Misleading copy for review alerts modal:
Untitled.mov
  1. Existing modal for the generic alert
    image

Steps to reproduce

Case 1

  1. Go to test dapp
  2. Don't have funds
  3. Trigger malicious mint erc20 on Sepolia
  4. Click on Review alerts

Case 2

  1. Go to test dapp
  2. Trigger malicious contract interaction on Ethereum
  3. Click on Review alerts

Error messages or log output

No response

Detection stage

During release testing

Version

12.3

Build type

None

Browser

Brave

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@bschorchit bschorchit added type-bug Sev2-normal Normal severity; minor loss of service or inconvenience. release-blocker This bug is blocking the next release team-confirmations Push issues to confirmations team regression-RC-12.3.0 Regression bug that was found in release candidate (RC) for release 12.3.0 labels Sep 13, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Sep 13, 2024
@metamaskbot metamaskbot added regression-RC-12.3 Regression bug that was found in release candidate (RC) for release 12.3 and removed regression-RC-12.3.0 Regression bug that was found in release candidate (RC) for release 12.3.0 labels Sep 13, 2024
@bschorchit bschorchit changed the title [Bug]: Issues with alert system [Bug]: Issues with new alert system Sep 13, 2024
@bschorchit bschorchit changed the title [Bug]: Issues with new alert system [Bug]: Issues with contract interactions alerts Sep 13, 2024
@seaona
Copy link
Contributor

seaona commented Sep 13, 2024

hi there @bschorchit is the alert system supposed to be in 12.3.0? I'm not able to see it in the RC build from the branch 🤔

@bschorchit
Copy link
Author

bschorchit commented Sep 13, 2024

Hey @seaona, it is :) but only for signatures and for contract interactions transactions (the general confirmation, not the custom confirmations we have for specific methods) for new installs or users that go to Settings > Experimental > Improved transaction requests.
Update: what I said above for transactions is not happening, although the toggle is present. I've opened an issue for it here: #27139

@bschorchit bschorchit added regression-RC-12.3.0 Regression bug that was found in release candidate (RC) for release 12.3.0 and removed regression-RC-12.3 Regression bug that was found in release candidate (RC) for release 12.3 labels Sep 16, 2024
@seaona
Copy link
Contributor

seaona commented Sep 16, 2024

thank you @bschorchit I wanted to try it out, and was getting really confused on why it didn't appear

@benjisclowder
Copy link
Contributor

Fixed by #27354.

@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Sep 24, 2024
vinistevam added a commit that referenced this issue Sep 26, 2024
…7205)

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

## **Description**

This PR aims to apply fixes and improvements to the Alert System in
general and specific alerts such as SIWE and contract interaction.


**Fixes:**

1- Display a more generic and toned-down message on the friction modal.

2- Show alerts before the Confirm Alert Modal (final friction modal)
when there is a danger alert.

3- Fixed CTA button when the alert has not been acknowledged.


**Fixes from UX QA feedback**

[Figma](https://www.figma.com/design/gcwF9smHsgvFWQK83lT5UU/Confirmation-redesign-V4?node-id=3293-2791&t=fX0ohLSzAelDEDvM-1)
- Change the Danger icon to `security-search` icon when button is
`Review Alerts` or `Review Alert` - ✔️
- Remove blockaid dedicated alert modal - ✔️
- Remove the “tooltip icon” whenever an alert is present -
✔️
- Always display a critical alert first when a critical alert is
present:
  - Inline alerts - ✔️
  - Multiple Alert Modal - ✔️
- Disable the CTA "Review Alerts" whenever a blocking alert is present -
✔️
- Add "Got it" for blocking alerts. (this button will be responsible for
closing the modal) - ✔️
- Remove the close `X` button - ✔️


<!--
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/27205?quickstart=1)

## **Related issues**

Fixes: #27132
#27147
#27118

## **Manual testing steps**

**Case 1**

1. Go to test dapp
2. Don't have funds
3. Trigger malicious mint erc20 on Sepolia
4. Click on Review alerts

**Case 2**
1. Go to test dapp
2. Trigger malicious contract interaction on Ethereum
3. Click on Review alerts

**Case 3**
1. Go to test dapp
2. Click on Sign In With Ethereum - Bad Domain
3. Click Confirm

**Case 4**
1. Deploy an ERC721 contract from the test dapp
2. Trigger a transaction with a nonce +1, so it's not confirmed
3. Now trigger a Mint
4. Click on the alerts (there are 2)
5. Navigate to the 2nd alert
6. Click got it --> MM broke

## **Screenshots/Recordings**

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



![image](https://github.com/user-attachments/assets/213ad2ed-2556-443e-905b-17b92ac08b56)


[alert-fix.webm](https://github.com/user-attachments/assets/f8d42db8-cc7d-448b-ad8f-20a789829122)


[mint-without-funds.webm](https://github.com/user-attachments/assets/5e913290-79af-4432-b30a-b3a09891fba9)

[Contract Interaction and
Alerts.webm](https://github.com/user-attachments/assets/929a79da-eefc-44d8-b350-a165ff92300f)


### **Before**

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

### **After**

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

## **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/develop/.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/develop/.github/guidelines/LABELING_GUIDELINES.md)).
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-RC-12.3.0 Regression bug that was found in release candidate (RC) for release 12.3.0 release-blocker This bug is blocking the next release Sev2-normal Normal severity; minor loss of service or inconvenience. team-confirmations Push issues to confirmations team type-bug
Projects
Archived in project
Development

No branches or pull requests

5 participants