Conversation
…ring migration\n\n- Keep WalletConfig.isLegacyWallet in copy() to ensure legacy flow\n- Sanitize legacy wallet names (non-alnum except _) and ensure uniqueness\n- Use sanitized, unique name in restore flow; delete legacy after success\n\nCloses: #none
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ign submodules and pubspec to latest workspace state\n- No app code changes
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Visit the preview URL for this PR (updated for commit 578c7f5): https://walletrc--pull-3207-merge-b4jyiuxc.web.app (expires Wed, 29 Oct 2025 15:45:00 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
…ving uniqueness\n\nPrevents duplicate wallets by avoiding premature suffixing during legacy migration.
| _log.info( | ||
| 'Migration successful. ' | ||
| 'Deleting legacy wallet ${event.wallet.name}', | ||
| 'Deleting legacy wallet ${workingWallet.name}', |
There was a problem hiding this comment.
Summary
WalletConfig.isLegacyWalletincopy()so legacy wallets route toAuthRestoreRequested.AuthBloc._onRestore; delete legacy entry after success.Why
Fixes a critical bug where some users can't log into wallets created with old versions and the wallet disappears.
Testing
Notes
No API changes. Static analysis passes for changed files.
Note
Sanitizes and de-duplicates legacy wallet names during migration, preserves
isLegacyWalletinWalletConfig.copy(), and updates restore flow to use sanitized names.AuthBloc._onRestoreto handle legacy wallets:_walletsRepository.sanitizeLegacyMigrationName()and attempt sign-in first._walletsRepository.resolveUniqueWalletName()and useworkingWalletfor registration and metadata setup.sanitizeLegacyMigrationName,resolveUniqueWalletName, andsanitizeAndResolveLegacyWalletNametolib/blocs/wallets_repository.dart.WalletConfig.isLegacyWalletincopy(); keepWallet.copyWithAPI.pubspec.yamlversion to0.9.3+1.Written by Cursor Bugbot for commit 578c7f5. This will update automatically on new commits. Configure here.