Skip to content

fix: resolve onboarding unlock flow and UI issues#156

Merged
sallymoc merged 8 commits into
devfrom
fix/ui-ux-issues
May 11, 2026
Merged

fix: resolve onboarding unlock flow and UI issues#156
sallymoc merged 8 commits into
devfrom
fix/ui-ux-issues

Conversation

@alez04
Copy link
Copy Markdown
Contributor

@alez04 alez04 commented May 4, 2026

Summary

  • fix Manage Accounts name alignment and input spacing
  • validate onboarding import passphrases earlier
  • prevent redirecting to Unlock right after successful onboarding

Testing

  • npm run lint
  • npm run build

@alez04 alez04 requested review from ahmed-tarek-salem and sallymoc and removed request for sallymoc May 4, 2026 13:16
Comment thread src/pages/onboarding/import-seed.tsx Outdated
setStatus(t('onboarding.errors.passphraseRequired'))
return
}
if (step === 2 && variant !== 'add-address' && passphrase.length < 12) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace 12 magic number with an app constant

Comment thread src/pages/onboarding/import-seed.tsx Outdated
return
}
if (variant !== 'add-address' && passphrase.length < 12) {
setStatus(t('onboarding.errors.passphraseTooShort'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace 12 magic number with an app constant

Comment thread src/pages/onboarding/import-vault.tsx Outdated
return
}
if (step === 2 && passphrase.length < 12) {
setStatus(t('onboarding.errors.passphraseTooShort'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace 12 magic number by an app constant

Comment thread src/pages/onboarding/import-vault.tsx Outdated
return
}
if (passphrase.length < 12) {
setStatus(t('onboarding.errors.passphraseTooShort'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace 12 magic number by an app constant

Comment thread src/locales/de.json Outdated
"selectFile": "Wähle eine Tresor-Datei aus.",
"passphraseRequired": "Passwort ist erforderlich.",
"invalidSourcePassphrase": "Ungültiges Quell-Tresor-Passwort.",
"importFailed": "Web-Wallet-Tresor konnte nicht importiert werden.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@alez04 This key is not longer reference in the code. Please remove it here and from all 8 locale files (en, es, de, fr, ru, tr, vi, zh).

Comment thread src/pages/onboarding/import-vault.tsx Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@alez04 Please remove the .trim() calls at lines 215, 244, 247 in this file. The rest of the codebase (unlock.tsx, create-wallet.tsx, import-seed.tsx, passphrase-auth.tsx) passes the passphrase verbatim to openBrowserVault. Trimming here means the stored vault passphrase differs from what the user typed, and unlock won't match. Standard crypto-wallet practice is to not trim passwords.

alez04 and others added 3 commits May 11, 2026 14:43
…ault APIs

- Add validatePassphraseStrength helper in src/lib/passphrase.ts with
  private MIN_PASSPHRASE_LENGTH constant; both required and min-length
  checks evaluate on the trimmed value.
- Migrate all 6 onboarding call sites (create-wallet, import-seed,
  import-vault) to the helper.
- Remove .trim() mutations before vault encrypt/decrypt APIs so the
  raw passphrase reaches openBrowserVault, validateVaultPassphrase,
  rotatePassphrase, getSeedForSigning, importAndUnlock, and the dApp
  signer in the background. .trim() is now used only for emptiness
  checks and ternary discriminators.
- Drop the redundant MIN_PASSPHRASE_LENGTH export from constants.ts.
@sallymoc sallymoc merged commit f76c0ee into dev May 11, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants