metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

feat: notifications integration sdk

Open Jonathansoufer opened this issue 1 year ago • 6 comments

Description

This PR implements all the REDUX flows (Actions, Reducers, Sagas, Controllers usage) to power Notifications UI.

Related issues

Fixes: N/A

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

  • [x] I’ve followed MetaMask Coding Standards.
  • [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 format if applicable
  • [x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • [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.

Jonathansoufer avatar May 17 '24 15:05 Jonathansoufer

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.

github-actions[bot] avatar May 17 '24 15:05 github-actions[bot]

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Network access npm/@protobufjs/[email protected] 🚫
Network access npm/[email protected] 🚫
Network access npm/[email protected] 🚫
Network access npm/[email protected] 🚫
Deprecated npm/@types/[email protected]
  • Reason: This is a stub types definition for Redux (https://github.com/reactjs/redux). Redux provides its own type definitions, so you don't need @types/redux installed!
🚫
Network access npm/[email protected] 🚫
New author npm/@metamask/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@firebase/[email protected] 🚫
Network access npm/@grpc/[email protected] 🚫
Network access npm/@grpc/[email protected] 🚫
Network access npm/@grpc/[email protected] 🚫
Network access npm/@grpc/[email protected] 🚫
Network access npm/@grpc/[email protected] 🚫
Install scripts npm/[email protected]
  • Install script: postinstall
  • Source: node scripts/postinstall
🚫
Network access npm/[email protected] 🚫
Network access npm/[email protected] 🚫
Network access npm/[email protected] 🚫
Network access npm/[email protected] 🚫
Network access npm/@metamask/[email protected] 🚫
Network access npm/@metamask/[email protected] 🚫

View full report↗︎

Next steps

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

What is a deprecated package?

The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.

Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

socket-security[bot] avatar May 22 '24 10:05 socket-security[bot]

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 32f1fa5e755da73da72b05ba1e4e0f848569c73c Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/02f1c2fc-07c5-46bd-9bc4-fc994f8e8f51

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

github-actions[bot] avatar Jun 18 '24 22:06 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

Prithpal-Sooriya avatar Jun 28 '24 11:06 Prithpal-Sooriya

Codecov Report

Attention: Patch coverage is 46.56085% with 505 lines in your changes missing coverage. Please review.

Project coverage is 49.58%. Comparing base (b2cce87) to head (0bfac2c). Report is 1 commits behind head on main.

Files Patch % Lines
app/util/notifications/notification.util.ts 32.37% 84 Missing and 10 partials :warning:
app/actions/notification/pushNotifications.ts 30.15% 44 Missing :warning:
app/components/UI/Notification/List/index.tsx 12.82% 33 Missing and 1 partial :warning:
app/util/notifications/hooks/useNotifications.ts 66.25% 23 Missing and 4 partials :warning:
app/components/Views/Notifications/index.tsx 5.26% 18 Missing :warning:
app/selectors/pushNotifications/index.tsx 58.53% 17 Missing :warning:
.../notifications/notification-states/stake/stake.tsx 34.61% 17 Missing :warning:
...p/components/Views/Notifications/Details/index.tsx 33.33% 13 Missing and 3 partials :warning:
...cationsSettings/NotificationOptionToggle/index.tsx 0.00% 15 Missing :warning:
app/util/notifications/push-permissions.ts 6.25% 15 Missing :warning:
... and 40 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9673      +/-   ##
==========================================
- Coverage   49.67%   49.58%   -0.09%     
==========================================
  Files        1450     1489      +39     
  Lines       34888    35461     +573     
  Branches     3950     4037      +87     
==========================================
+ Hits        17330    17585     +255     
- Misses      16456    16756     +300     
- Partials     1102     1120      +18     

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

codecov-commenter avatar Jul 10 '24 11:07 codecov-commenter

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0c51d8ff7a7ff69259248c0e381ffa288e1b446f Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ee628ab7-08ad-4fca-bede-4cd8c34d6b21

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

github-actions[bot] avatar Jul 10 '24 12:07 github-actions[bot]

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 50d4b33fff037fe30d492e16222974e5e822c539 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/621f555a-b5f4-40c5-88a7-7ddbbf63f71e

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

github-actions[bot] avatar Jul 12 '24 15:07 github-actions[bot]