Skip to content

fix: deeplink handling issue when the app is closed#8469

Merged
sethkfman merged 4 commits into
mainfrom
fix_handleDeeplinks-issue-when-the-app-is-closed
Jan 31, 2024
Merged

fix: deeplink handling issue when the app is closed#8469
sethkfman merged 4 commits into
mainfrom
fix_handleDeeplinks-issue-when-the-app-is-closed

Conversation

@omridan159

@omridan159 omridan159 commented Jan 30, 2024

Copy link
Copy Markdown
Contributor

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

  1. Go to this page...

Screenshots/Recordings

Before

After

Screen.Recording.2024-01-30.at.17.33.37.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • 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.

@omridan159 omridan159 requested a review from a team as a code owner January 30, 2024 15:55
@github-actions

Copy link
Copy Markdown
Contributor

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.

@codecov-commenter

codecov-commenter commented Jan 30, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (0efe1c6) 40.60% compared to head (720c5ed) 40.61%.
Report is 4 commits behind head on main.

Files Patch % Lines
app/components/Nav/App/index.js 0.00% 9 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@omridan159 omridan159 added team-sdk-deprecated DEPRECATED: please use "team-wallet-integrations" instead needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jan 31, 2024

@abretonc7s abretonc7s left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useEffect dependencies

Comment thread app/components/Nav/App/index.js Outdated
Comment thread app/components/Nav/App/index.js Outdated
abretonc7s
abretonc7s previously approved these changes Jan 31, 2024

@abretonc7s abretonc7s left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@omridan159 omridan159 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Jan 31, 2024
@sonarqubecloud

Copy link
Copy Markdown

@deeeed deeeed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread app/components/Nav/App/index.js Outdated
Comment thread app/components/Nav/App/index.js Outdated
@christopherferreira9

Copy link
Copy Markdown
Contributor

Android:

Screen.Recording.2024-01-31.at.15.27.39.mov

iOS:

Screen.Recording.2024-01-31.at.15.28.51.mov

Works as expected now.

@github-actions

Copy link
Copy Markdown
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/a141ffc7-8798-4cac-98fc-56669c0202a5
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@christopherferreira9 christopherferreira9 added QA Passed QA testing has been completed and passed QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. QA in Progress QA has started on the feature. labels Jan 31, 2024

@sethkfman sethkfman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sethkfman sethkfman merged commit f5d21bd into main Jan 31, 2024
@sethkfman sethkfman deleted the fix_handleDeeplinks-issue-when-the-app-is-closed branch January 31, 2024 23:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 31, 2024
@github-actions github-actions Bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 31, 2024
@metamaskbot metamaskbot added release-7.17.0 Issue or pull request that will be included in release 7.17.0 release-7.16.0 Issue or pull request that will be included in release 7.16.0 and removed release-7.17.0 Issue or pull request that will be included in release 7.17.0 labels Jan 31, 2024
@metamaskbot

Copy link
Copy Markdown
Collaborator

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.16.0 Issue or pull request that will be included in release 7.16.0 team-sdk-deprecated DEPRECATED: please use "team-wallet-integrations" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Deeplinks don't work: Network with chain id 1 notr found in your wallet

7 participants