fix(cashu): return to the Wallet hub after deleting the wallet

Deleting the Cashu wallet popped back to CashuWalletScreen, which on an
empty wallet auto-launches the find-or-create wizard — so the user was
funneled straight back into creating the wallet they just deleted.

Navigate to the top-level Wallet hub (Route.Wallet) via newStack instead,
which pops the Cashu screens off the back stack so the wizard never
composes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EqmMR2QiULS5QGosSgSQAe
This commit is contained in:
Claude
2026-06-29 18:13:18 +00:00
parent d2dfd044cf
commit 0bfe9d370e
@@ -341,11 +341,14 @@ fun CashuWalletSettingsScreen(
TextButton(
onClick = {
showDeleteWalletConfirm = false
// Tear down the wallet, then drop back to the wallet
// screen, which re-renders to its empty/create state
// once walletEvent flips to null.
// Tear down the wallet, then go to the top-level Wallet
// hub — NOT back to CashuWalletScreen, which on an empty
// wallet auto-launches the find-or-create wizard and
// would funnel the user straight back into creating the
// wallet they just deleted. newStack pops the Cashu
// screens off the back stack so the wizard never composes.
viewModel.deleteWallet(onDone = {})
nav.popBack()
nav.newStack(Route.Wallet)
},
) { Text(stringRes(R.string.cashu_settings_delete_wallet)) }
},