fix: deeplink handling issue when the app is closed#8469
Conversation
|
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. |
…ssue-when-the-app-is-closed
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8469 +/- ##
=======================================
Coverage 40.60% 40.61%
=======================================
Files 1239 1239
Lines 29978 29995 +17
Branches 2868 2870 +2
=======================================
+ Hits 12174 12182 +8
- Misses 17107 17115 +8
- Partials 697 698 +1 ☔ View full report in Codecov by Sentry. |
abretonc7s
left a comment
There was a problem hiding this comment.
useEffect dependencies
|
|
Android: Screen.Recording.2024-01-31.at.15.27.39.moviOS: Screen.Recording.2024-01-31.at.15.28.51.movWorks as expected now. |
|
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a141ffc7-8798-4cac-98fc-56669c0202a5 |
|
Missing release label release-7.16.0 on PR. Adding release label release-7.16.0 on PR and removing other release labels(release-7.17.0), as PR was cherry-picked in branch 7.16.0. |

Description
This PR addresses a deeplink navigation issue found in MetaMask Mobile v7.10.0 and above (LINK TO THE BUG). The update introduces key improvements for handling deeplinks:
Issue Overview:
Previously, deeplinks failed to function correctly when the MetaMask app was not running in the background. This was caused by premature route navigation attempts before the app completed its loading process.
Implemented Solutions:
Conditional Deeplink Queueing:
A queue system for deeplinks has been implemented. Deeplinks that are triggered by branch.io events are queued if the app is not fully initialized. This queued processing ensures that deeplinks are handled correctly only once the app loads completely.
Immediate Handling When the App Loaded:
For instances where the app is already loaded, deeplinks from branch.io events are processed immediately and normally, without queuing. This ensures direct and standard handling of deeplinks in an active app state.
Related issues
Fixes #8466
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2024-01-30.at.17.33.37.mov
Pre-merge author checklist
Pre-merge reviewer checklist