feat(wallet): fix Verify Recovery Phrase crash from removed shuffledArray#846
Merged
QuantumExplorer merged 1 commit intoJul 17, 2026
Conversation
…rray The seed-phrase verification step shuffled the words via -[NSArray shuffledArray], a category method formerly provided by DashSync's NSArray+Dash. That method was dropped during the DashSync teardown, so at runtime the selector no longer resolves and the app aborts with "-[__NSArrayM shuffledArray]: unrecognized selector" the moment the user reaches the Verify Recovery Phrase screen (Backup / Show Recovery Phrase flow). Shuffle in-place with GameplayKit's GKRandomSource instead — the header already imports GameplayKit (which the old category wrapped), so this drops the last dependency on the removed category with no behavior change.
|
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 ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Reported via TestFlight (9.0.0 build 9) — the app crashes the moment the user reaches the Verify Recovery Phrase screen (Backup / Show Recovery Phrase flow):
The seed-phrase verification step shuffled the words via
-[NSArray shuffledArray], a category method formerly provided by DashSync'sNSArray+Dash. That method was dropped during the DashSync teardown, so at runtime the selector no longer resolves and the app aborts. This is deterministic — it affects every user who reaches the verification step, which is exactly the "make sure you've backed up your wallet" flow called out in the beta release notes.What was done?
Shuffle in-place with GameplayKit's
GKRandomSourceinstead — the header already imports GameplayKit (which the old category wrapped), so this drops the last dependency on the removed category with no behavior change.DWSeedPhraseModel.m:68This was the only remaining call site of
shuffledArrayin the codebase.How Has This Been Tested?
BackupSeedPhraseViewController.actionButtonAction→DWVerifySeedPhraseViewController controllerWithSeedPhrase:→DWVerifySeedPhraseModel initWithSeedPhrase:→DWSeedPhraseModel initByShufflingSeedPhrase:.shuffledArrayis not defined anywhere reachable (removed fromNSArray+Dash), and this is its only caller.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only