mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-10 16:33:27 +00:00
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:
+7
-4
@@ -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)) }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user