Repository navigation
feat(wallet): Switch Wallet home-screen shortcut - #795
Merged
QuantumExplorer merged 1 commit intoJul 11, 2026
Merged
Conversation
New customizable shortcut that switches the active wallet. It is offered
in the shortcut picker only while the current network has more than one
switchable wallet, and a saved bar slot degrades to Receive if the
device drops back to a single wallet (mirroring the faucet→Spend
pattern; the saved config is untouched).
Tap behavior scales with how many OTHER wallets exist: one → the
confirmation alert directly ("Would you like to switch to …? You can
always switch back later."); two to five → a bottom-sheet picker
(WalletSwitchDialog) followed by the same confirmation; more than
five → the full Wallets screen. A confirmation is shown in every path.
Wallet listing/counting reuses WalletsViewModel (new shared
switchableWallets() intersection); the switch itself goes through the
existing WalletsViewModel.switchWallet runtime call. The shortcut icon
reuses the network-switch glyph.
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 |
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.
What
A new Switch Wallet shortcut for the home screen's customizable shortcut bar.
Visibility
WalletsViewModel.switchableWalletCount, the same manager-wallets ∩ persisted-mnemonics intersection the Wallets screen uses — now a shared helper).Tap behavior (confirmation in every path)
WalletSwitchDialog, name/username/balance per row) → same confirmation alertThe switch itself runs through the existing
WalletsViewModel.switchWallet→SwiftDashSDKWalletRuntime.switchWalletpath; the home screen refreshes via the active-wallet-change notification.Notes
ShortcutActionType.switchWallet) — raw values persist inDWGlobalOptions.shortcuts, so ordering is load-bearing.shortcut_switchNetworkcircular-arrows glyph; a dedicated asset can replace it later.ShortcutActionType.customizableActionsbecame@MainActor(it now reads main-actor wallet state); its only consumer is the SwiftUI picker.Verification
dashpayscheme build (iphonesimulator,ARCHS=arm64).🤖 Generated with Claude Code