Skip to content

feat: Improve content of banner for errors and warning#25058

Merged
pedronfigueiredo merged 3 commits intodevelopfrom
pnf/1758
Jun 6, 2024
Merged

feat: Improve content of banner for errors and warning#25058
pedronfigueiredo merged 3 commits intodevelopfrom
pnf/1758

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

@pedronfigueiredo pedronfigueiredo commented Jun 5, 2024

Description

This PR fixes the logic for PPOM banners, hardcoding the Warning banners for any reason. Error and Malicious banners are still dependent on the reasons.

Open in GitHub Codespaces

Related issues

Fixes: #1758

Manual testing steps

  1. Open up metamask test-dapp.
  2. Connect wallet
  3. Open the console
  4. Issue a transaction that approves USDT to unverified contract by invoking that transaction for example:
window.ethereum.sendAsync({
  "method": "eth_sendTransaction",
  "params": [
    {
          "from": "INSERT_YOUR_WALLET_ADDRESS",
           "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
          "data": "0x095ea7b3000000000000000000000000b208222089e9c48f3a0680b91be5a79d79ad429effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
    }
  ],
  "timestamp": 1693229271999
})

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Jun 5, 2024
@pedronfigueiredo pedronfigueiredo self-assigned this Jun 5, 2024
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner June 5, 2024 11:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 5, 2024

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.

jpuri
jpuri previously approved these changes Jun 5, 2024
matthewwalsh0
matthewwalsh0 previously approved these changes Jun 5, 2024
jpuri
jpuri previously approved these changes Jun 5, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [88f614d]
Page Load Metrics (52 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6711185115
domContentLoaded9171121
load43715284
domInteractive9171121
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 112 Bytes (0.00%)
  • common: 125 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.46%. Comparing base (f9d9bde) to head (88f614d).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25058   +/-   ##
========================================
  Coverage    65.45%   65.46%           
========================================
  Files         1352     1352           
  Lines        53971    53975    +4     
  Branches     14004    14006    +2     
========================================
+ Hits         35326    35330    +4     
  Misses       18645    18645           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pedronfigueiredo pedronfigueiredo merged commit a37816d into develop Jun 6, 2024
@pedronfigueiredo pedronfigueiredo deleted the pnf/1758 branch June 6, 2024 12:58
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2024
@metamaskbot metamaskbot added release-12.1.0 Issue or pull request that will be included in release 12.1.0 release-12.0.0 Issue or pull request that will be included in release 12.0.0 and removed release-12.1.0 Issue or pull request that will be included in release 12.1.0 labels Jun 6, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-12.0.0 on PR. Adding release label release-12.0.0 on PR and removing other release labels(release-12.1.0), as PR was added to branch 12.0.0 when release was cut.

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

Labels

release-12.0.0 Issue or pull request that will be included in release 12.0.0 team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants