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

refactor: Connection class #7895

Closed
wants to merge 7 commits into from
Closed

refactor: Connection class #7895

wants to merge 7 commits into from

Conversation

abretonc7s
Copy link
Contributor

@abretonc7s abretonc7s commented Nov 21, 2023

Description

Refactor sdk Connection class to be split into multiple handlers.

Related issues

Fixes: #

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

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.

@abretonc7s abretonc7s force-pushed the feat/deeplink-priority branch from 69a7877 to 8f89cd9 Compare November 23, 2023 12:37
@abretonc7s abretonc7s changed the title feat: force deeplink priority to reconnect refactor: Connection class Nov 23, 2023
@abretonc7s abretonc7s marked this pull request as ready for review November 23, 2023 12:38
@abretonc7s abretonc7s requested a review from a team as a code owner November 23, 2023 12:38
@abretonc7s abretonc7s added needs-qa Any New Features that needs a full manual QA prior to being added to a release. team-sdk SDK team labels Nov 23, 2023
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/58d77c73-d071-4271-a1ce-a5a575eb1e07
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@christopherferreira9 christopherferreira9 added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 23, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

Codecov Report

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

Comparison is base (69c79df) 37.39% compared to head (36a82e2) 37.38%.

Files Patch % Lines
...ore/SDKConnect/handlers/handleConnectionMessage.ts 1.61% 61 Missing ⚠️
.../core/SDKConnect/handlers/handleConnectionReady.ts 1.75% 56 Missing ⚠️
app/core/SDKConnect/handlers/handleSendMessage.ts 3.03% 32 Missing ⚠️
app/core/SDKConnect/handlers/checkPermissions.ts 3.33% 29 Missing ⚠️
...core/SDKConnect/handlers/handleBatchRpcResponse.ts 3.70% 26 Missing ⚠️
app/core/SDKConnect/handlers/setupBridge.ts 5.26% 18 Missing ⚠️
app/core/SDKConnect/Connection.ts 0.00% 8 Missing ⚠️
app/core/SDKConnect/SDKConnect.ts 0.00% 6 Missing ⚠️
app/core/SDKConnect/handlers/handleRpcOverwrite.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7895      +/-   ##
==========================================
- Coverage   37.39%   37.38%   -0.02%     
==========================================
  Files        1052     1059       +7     
  Lines       28175    28199      +24     
  Branches     2517     2518       +1     
==========================================
+ Hits        10536    10542       +6     
- Misses      17040    17058      +18     
  Partials      599      599              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

omridan159
omridan159 previously approved these changes Nov 23, 2023
Copy link

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 12 Code Smells

2.1% 2.1% Coverage
0.0% 0.0% Duplication

christopherferreira9 pushed a commit that referenced this pull request Nov 30, 2023
## **Description**

- Depends on Connection Refactor PR
#7895
- Adds android sdk `metamask_connectSign` + `metamask_batch`
- Improve loading status

## **Related issues**

Fixes: #

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.
@abretonc7s abretonc7s closed this Mar 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. team-sdk SDK team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants