MetaMask / metamask-mobile

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

feat: MetaMask Firebase messaging integration #10150

Closed Jonathansoufer closed 3 days ago

Jonathansoufer commented 5 days ago

Description

This PR aims to handle ONLY the addition of Firebase related libraries to our codebase as well implements iOS and Android specific setup to enable Push Notifications FCM on MetaMask Mobile. No changes on consuming Push Notifications will take place on THIS PR since we're breaking this implementation down. No visual changes are introduced as well nor ways to test it, since the video updated is just to increase the understanding of what the changes will empower.

Documentation used for implementing it, here

ATTENTION: Flipper DOESN'T work with Firebase, so we're disabling it in favor of Charles Proxy

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

https://github.com/MetaMask/metamask-mobile/assets/44679989/dd9f7570-a4cb-4831-9cb2-23bc5ce920a4

Pre-merge author checklist

Pre-merge reviewer checklist

github-actions[bot] commented 5 days ago

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.

socket-security[bot] commented 5 days ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@react-native-firebase/app@20.1.0 Transitive: environment +9 637 kB salakar
npm/@react-native-firebase/messaging@20.1.0 None 0 268 kB salakar

View full report↗︎

socket-security[bot] commented 5 days ago

🚨 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
New author npm/clone-deep@2.0.2 🚫

View full report↗︎

Next steps

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.

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/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/clone-deep@2.0.2
codecov-commenter commented 5 days ago

Codecov Report

Attention: Patch coverage is 55.26316% with 17 lines in your changes missing coverage. Please review.

Project coverage is 49.51%. Comparing base (81bcdb2) to head (5a8be34). Report is 7 commits behind head on main.

Files Patch % Lines
app/util/notifications/methods/fcmHelper.ts 55.26% 10 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10150 +/- ## ========================================== - Coverage 49.52% 49.51% -0.02% ========================================== Files 1430 1439 +9 Lines 34567 34712 +145 Branches 3823 3862 +39 ========================================== + Hits 17121 17187 +66 - Misses 16376 16436 +60 - Partials 1070 1089 +19 ```

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

sonarcloud[bot] commented 4 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud