From 0bfe9d370e24fb456b6a4db954977e4824fbc74e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 29 Jun 2026 18:13:18 +0000 Subject: [PATCH] fix(cashu): return to the Wallet hub after deleting the wallet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01EqmMR2QiULS5QGosSgSQAe --- .../loggedIn/wallet/CashuWalletSettingsScreen.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/CashuWalletSettingsScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/CashuWalletSettingsScreen.kt index bb2ade4e4c..2ccd468c6d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/CashuWalletSettingsScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/wallet/CashuWalletSettingsScreen.kt @@ -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)) } },