fix: redirection issue after chain switch on sign request#8496
Merged
christopherferreira9 merged 1 commit intoMar 4, 2024
Merged
Conversation
…n request and right after it a personal_sign request
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 ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8496 +/- ##
==========================================
+ Coverage 40.62% 40.66% +0.04%
==========================================
Files 1239 1240 +1
Lines 29989 30015 +26
Branches 2870 2873 +3
==========================================
+ Hits 12182 12206 +24
- Misses 17109 17110 +1
- Partials 698 699 +1 ☔ View full report in Codecov by Sentry. |
|
|
When will this pull request be merged? |
Contributor
|
Looking good. Tested for both iOS and Android. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Issue Link: MetaMask/metamask-mobile#7878
Summary:
This PR addresses a redirection issue in MetaMask Mobile where users were prematurely redirected back to the dApp following a chain switch request, without waiting for the completion of a personal_sign request.
Key Points:
Problem: After initiating a chain switch as part of a personal_sign request, users were redirected back to the dApp immediately, rather than after the personal_sign request was completed. This led to a disjointed user experience.
Solution: We've introduced a mechanism to check for any pending personal_sign requests. The wallet will now redirect users back to the dApp only after these requests have been fully processed (either approved or denied).
Implementation:
This update ensures a seamless integration between MetaMask Mobile and dApps, enhancing user experience by aligning redirection behavior with the expected transaction flow.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2024-02-01.at.10.54.46.mov
Pre-merge author checklist
Pre-merge reviewer checklist