Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: android sdk reconnection #7015

Merged
merged 3 commits into from
Aug 18, 2023
Merged

Conversation

elefantel
Copy link
Contributor

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add the appropiate QA label when dev review is completed
    • needs-qa: PR requires manual QA.
    • No QA/E2E only: PR does not require any manual QA effort. Prior to merging, ensure that you have successful end-to-end test runs in Bitrise.
    • Spot check on release build: PR does not require feature QA but needs non-automated verification. In the description section, provide test scenarios. Add screenshots, and or recordings of what was tested.
  5. Add QA Passed label when QA has signed off (Only required if the PR was labeled with needs-qa)
  6. Add your team's label, i.e. label starting with team- (or external-contributor label if your not a MetaMask employee)

Description
This PR fixes two issues:
• When a user cancels a connection request, the wallet was not redirecting back to the dapp
• After cancelling a connection request and making another connection request, the wallet was not showing the connection prompt. The reason for this is that the client info was persisted before the connection request was approved, and subsequent connection requests were perceived as reconnection - yet a bridge wasn't set up for that client id yet.

Screenshots/Recordings

dapp-reconnection.mp4

Issue

fixes #???

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@elefantel elefantel added team-sdk SDK team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Aug 17, 2023
@elefantel elefantel requested a review from a team as a code owner August 17, 2023 19:40
@github-actions
Copy link
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
Copy link

Codecov Report

Merging #7015 (a46fce2) into main (27fbcdf) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #7015      +/-   ##
==========================================
- Coverage   32.64%   32.64%   -0.01%     
==========================================
  Files         994      994              
  Lines       26638    26641       +3     
  Branches     2088     2088              
==========================================
  Hits         8697     8697              
- Misses      17527    17530       +3     
  Partials      414      414              
Files Changed Coverage Δ
app/core/SDKConnect/AndroidSDK/AndroidService.ts 0.00% <0.00%> (ø)

@sonarcloud
Copy link

sonarcloud bot commented Aug 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link
Member

@andreahaku andreahaku left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@abretonc7s abretonc7s left a comment

Choose a reason for hiding this comment

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

LGTM

@elefantel elefantel merged commit ddda0fd into main Aug 18, 2023
11 checks passed
@elefantel elefantel deleted the feature/android-sdk-connection branch August 18, 2023 09:01
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Aug 18, 2023
@metamaskbot metamaskbot added the release-7.6.0 Issue or pull request that will be included in release 7.6.0 label Aug 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.6.0 Issue or pull request that will be included in release 7.6.0 team-sdk SDK team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants