fix: flaky test Request Queuing Dapp 1, Switch Tx -> Dapp 2 Send Tx should queue signTypedData tx after eth_sendTransaction confirmation and signTypedData confirmation should target the correct network after eth_sendTransaction is confirmed @no-mmi#26794
Merged
hjetpoluru merged 1 commit intodevelopfrom Aug 30, 2024
Merged
Conversation
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26794 +/- ##
========================================
Coverage 70.13% 70.13%
========================================
Files 1417 1417
Lines 49440 49440
Branches 13833 13833
========================================
Hits 34672 34672
Misses 14768 14768 ☔ View full report in Codecov by Sentry. |
Collaborator
Builds ready [a6114ad]
Page Load Metrics (1701 ± 95 ms)
Bundle size diffs
|
chloeYue
approved these changes
Aug 30, 2024
Contributor
chloeYue
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the fix !
hjetpoluru
approved these changes
Aug 30, 2024
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
There is a race condition which happens when we trigger a Send from Dapp 1 (Localhost 7777) and quickly switch to Dapp 0 (Localhost 8545) and trigger a Sign there.
What happens is that the network for the first Send, is taken for the one on Dapp 0 (localhost 8545), so when we try to find the correct network (7777) in the Send screen fails (see artifacts below).
To mitigate this race condition, after we trigger the Send from Dapp 1 (Localhost 7777) we wait until the popup is open and then switch to Dapp 0 and proceed with the Sign action (Localhost 8545).
Related issues
Fixes: #26795
Manual testing steps
yarn test:e2e:single test/e2e/tests/request-queuing/dapp1-send-dapp2-signTypedData.spec.js --browser=chrome --retries=10 --stop-after-one-failure=trueScreenshots/Recordings
Notice the Send has Localhost 8545, but it should be Localhost 7777
Pre-merge author checklist
Pre-merge reviewer checklist