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

chore: implementing Firebase messaging on iOS/Android #10184

Open Jonathansoufer opened 3 days ago

Jonathansoufer commented 3 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 endorse using Charles Proxy instead.

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 3 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 3 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 3 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
github-actions[bot] commented 3 days ago

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 51c53d00cb3d943e1eed16eb4916432e1cfbd5d0 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/36e06c75-9a14-44a1-95f5-dde2370516f6

[!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
codecov-commenter commented 3 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 (ea14ef7) to head (51c53d0). Report is 5 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 #10184 +/- ## ========================================== + Coverage 49.50% 49.51% +0.01% ========================================== Files 1438 1439 +1 Lines 34674 34707 +33 Branches 3853 3860 +7 ========================================== + Hits 17166 17186 +20 - Misses 16426 16434 +8 - Partials 1082 1087 +5 ```

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

github-actions[bot] commented 1 day ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 62e8dfb9baa2a4c84d27d110cc1440dbc892e195 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3e269d42-5964-407f-885a-33a26924ccb3

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

github-actions[bot] commented 8 hours ago

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1eda810f2ed43c391cba879c86e61d549e2776c0 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c7a2c228-ad8b-4e80-a682-03e94bdb51a9

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