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

feat: add account syncing #14291

Merged
merged 22 commits into from
Apr 9, 2025
Merged

feat: add account syncing #14291

merged 22 commits into from
Apr 9, 2025

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Mar 28, 2025

Description

This PR adds account syncing to the mobile client.
This feature, that is currently live on extension, syncs EVM accounts & their names between devices.
With this PR, account syncing will effectively work between extension and mobile!

This PR:

  • Moves importAdditionalAccounts so that it occurs after every kind of onboarding. This is important for account syncing as we rely on this to be complete before actually dispatching account syncing. This is done to prevent race conditions that adds accounts at the same time. The same logic is currently applied on extension with the _addAccountsWithBalance method.
  • Adds a new useAccountSyncing hook
  • Uses this hook in useIdentityEffects so that it reactively dispatches account syncing when all pre-requisites are met.
  • Adds new identity Bitrise iOS and Android workflows, and adds new E2E tests for account syncing

Related issues

Fixes:

Manual testing steps

  1. Create a new wallet, note the SRP down
  2. Finish onboarding, then add and rename accounts
  3. Delete your wallet
  4. Onboard again, this time by importing the SRP from step 1
  5. Verify that your previously created and renamed accounts are here

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@mathieuartu mathieuartu added the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 7, 2025
Copy link
Contributor

github-actions bot commented Apr 7, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 8431a25
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/8a48aa39-af31-4f36-a12b-046ee2ccfbe7

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@mathieuartu mathieuartu changed the title feat: add account sync POC [WIP] feat: add account syncing Apr 7, 2025
@mathieuartu mathieuartu added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 7, 2025
Copy link
Contributor

github-actions bot commented Apr 7, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 39ae0f6
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9293a40e-50f7-4c7d-a823-d955180569cb

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 66.56%. Comparing base (44bb493) to head (bdd3296).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
app/core/Engine/Engine.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14291      +/-   ##
==========================================
+ Coverage   66.29%   66.56%   +0.26%     
==========================================
  Files        2248     2251       +3     
  Lines       48037    48144     +107     
  Branches     6766     6782      +16     
==========================================
+ Hits        31848    32047     +199     
+ Misses      14172    14076      -96     
- Partials     2017     2021       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Apr 8, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: a1a97e1
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/01776172-ad95-42d6-bcc0-9c2a5cde23cc

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@mathieuartu mathieuartu added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 8, 2025
Copy link
Contributor

github-actions bot commented Apr 8, 2025

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 75d4590
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d02a57c6-61fa-4477-a1c3-6d4b02fe5e97

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@mathieuartu mathieuartu marked this pull request as ready for review April 8, 2025 19:02
@mathieuartu mathieuartu requested review from a team as code owners April 8, 2025 19:02
Copy link
Contributor

@cmd-ob cmd-ob left a comment

Choose a reason for hiding this comment

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

Validated e2e and locally

@mathieuartu mathieuartu added this pull request to the merge queue Apr 9, 2025
Merged via the queue into main with commit 0aeae78 Apr 9, 2025
55 of 57 checks passed
@mathieuartu mathieuartu deleted the feat/add-account-sync branch April 9, 2025 11:16
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
@metamaskbot metamaskbot added the release-7.45.0 Issue or pull request that will be included in release 7.45.0 label Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.45.0 Issue or pull request that will be included in release 7.45.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants