Repository navigation
fix(wallet): recovery phrase shows the active wallet; discoverable rename/remove on Wallets - #794
Merged
QuantumExplorer merged 1 commit intoJul 9, 2026
Conversation
…remove on Wallets rows View Recovery Phrase read the FIRST wallet WalletStorage enumerated, so with several wallets on device it could display another wallet's phrase — a dangerous backup. It now resolves the active wallet through the per-network registry (WalletEnvironment.activeWalletId, seeded on create/start/switch), falls back to the sole stored wallet on pre-registry installs, and shows nothing rather than the wrong phrase when the active wallet can't be resolved among several. The Wallets screen's rename and remove actions existed only in the long-press context menu, which is undiscoverable; each row now has a visible ellipsis menu offering both (the context menu remains). Co-Authored-By: Claude Fable 5 <[email protected]>
|
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 |
llbartekll
added a commit
that referenced
this pull request
Jul 10, 2026
…irst switchToNetwork's registry mirror picked persistedMnemonics().first — the same wrong-wallet class #794 fixed for the recovery phrase. With several on-device wallets it could register another wallet's DSWallet on the destination chain. Resolve through the per-network active-wallet registry (destination's entry, then the current network's, then the sole stored wallet on pre-registry installs); with several wallets and no registry match, mirror nothing rather than the wrong wallet. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Recovery phrase bug (the dangerous one)
Settings → View Recovery Phrase read the mnemonic of whatever wallet
WalletStorage.listWalletIdsWithMnemonic()happened to enumerate first (DWPreviewSeedPhraseModel+Mnemonic.swift). With more than one wallet on device, it could show a different wallet's recovery phrase — a user diligently backing up those words would be backing up the wrong wallet.Fix: resolve the active wallet through the per-network registry (
WalletEnvironment.activeWalletId(for:), which is seeded on wallet create, host start, and runtime switch), with a fallback to the sole stored wallet for pre-registry installs. If several wallets exist and none matches the registry, the reader returns nil (empty screen) — deliberately safer than guessing, since showing a plausible-but-wrong phrase is the worst outcome. The verify-seed onboarding flow was unaffected (it checks the in-hand phrase, not storage).Wallets: visible rename and remove
Rename and per-wallet Remove were already implemented on the Wallets screen — but only reachable via long-press context menu, so in practice invisible. Each wallet row now has a visible ⋯ menu with:
PersistentWallet.name, empty resets to the default "Wallet abcd1234…" label.The long-press context menu is kept as a secondary path.
Verification
dashpayscheme build (iphonesimulator,ARCHS=arm64).🤖 Generated with Claude Code