MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.03k stars 1.06k forks source link

feat: add dApp spam screen #10082

Open OGPoyraz opened 4 days ago

OGPoyraz commented 4 days ago

Description

This PR aims to add dApp spam screen to app.

Notes:

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1822

Manual testing steps

  1. Go to test-dapp
  2. Trigger 3x sign/transaction
  3. See modal appear
  4. Click "continue" to ignore this modal and behaviour
  5. Trigger 3x sign/transaction
  6. Click "block dapp" & "got it"
  7. Try sign/transaction - they will be blocked without error since they are considered & marked as "spam" by user
  8. Wait 1 minute to trigger or reset the situation

Screenshots/Recordings

https://github.com/MetaMask/metamask-mobile/assets/7644512/b2528e12-eef9-4ec8-9d56-64f6af19aba9

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

github-actions[bot] commented 4 days ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: aaca51b3a2d0d63fec868541f148fe61f26f7803 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ebd977ea-5ee9-4153-884d-b4c5966ecde1

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
sleepytanya commented 4 days ago

Tested on physical device: Bitrise build https://app.bitrise.io/build/088916f8-1921-44eb-b6fd-fa82780127bb?tab=artifacts Samsung S24+ Android 14

https://github.com/MetaMask/metamask-mobile/assets/104780023/2fdb474f-1d4c-4cda-b549-6f487dbeb0e3

codecov-commenter commented 2 days ago

Codecov Report

Attention: Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.

Project coverage is 49.68%. Comparing base (b013c71) to head (982d7af). Report is 125 commits behind head on main.

Files Patch % Lines
...p/components/Views/DappSpamModal/DappSpamModal.tsx 96.15% 1 Missing :warning:
app/core/RPCMethods/spam.ts 94.11% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10082 +/- ## ========================================== + Coverage 47.24% 49.68% +2.43% ========================================== Files 1370 1431 +61 Lines 33304 34530 +1226 Branches 3586 3816 +230 ========================================== + Hits 15736 17157 +1421 + Misses 16607 16309 -298 - Partials 961 1064 +103 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 days ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 28ab47a862413fcb300819f7dbe5347307818a2d Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b47949b1-8704-43e2-a1f3-49209322935e

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request
sonarcloud[bot] commented 2 days ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
98.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud