Skip to content

Conversation

@huggingbot
Copy link
Member

Description

Adds client-side migration to assign dataType column values to legacy seedless onboarding secrets. This categorizes backed-up data as PrimarySrp, ImportedSrp, or ImportedPrivateKey.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/SL-350

Manual testing steps

  1. Create a new wallet via social login and verify migration version is set
  2. Unlock an existing social login wallet with legacy secrets and verify dataType is assigned
  3. Import a new SRP/private key and verify correct dataType is passed

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.

@metamaskbot metamaskbot added the team-onboarding Onboarding team label Dec 8, 2025
@github-actions github-actions bot added the size-L label Dec 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeIdentity, SmokeWalletPlatform
  • Risk Level: medium
  • AI Confidence: 75%
click to see 🤖 AI reasoning details

The PR introduces a seedless onboarding migration system that adds data type tracking to social login secrets. Key changes include:

  1. Authentication.ts (CRITICAL): New migration logic (runSeedlessOnboardingMigrations, migrateSeedlessDataTypes) that runs during login flows for seedless/OAuth users, assigning PrimarySrp/ImportedSrp/ImportedPrivateKey types to legacy secrets.

  2. MultiSRP actions: When importing SRP via social login, now passes dataType: EncAccountDataType.ImportedSrp to the SeedlessOnboardingController.

  3. Onboarding state: New Redux state (seedlessOnboardingMigrationVersion) and action (setSeedlessOnboardingMigrationVersion) to track which migrations have been applied.

  4. DeleteWalletModal & usePromptSeedlessRelogin: Reset migration version when deleting wallet to ensure fresh state for new users.

The changes primarily affect:

  • Social/seedless login authentication flows
  • Multi-SRP import functionality
  • Wallet deletion/reset flows

Selected tags rationale:

  • SmokeAccounts: Multi-SRP import changes, account management impacted
  • SmokeIdentity: Seedless onboarding relates to identity/account syncing features, multi-srp.spec.ts in identity tests
  • SmokeWalletPlatform: Core wallet functionality, multi-SRP export/import tests

The risk is medium because:

  • Changes are well-contained to seedless onboarding flows
  • Includes comprehensive unit tests
  • Migration only runs for existing seedless users
  • Has error handling that logs but doesn't crash on failure

No E2E tests specifically exist for seedless/social login flows (grep found no matches), so we test related account management and identity sync features that would exercise similar code paths.

View GitHub Actions results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants