From 16c4d3b1287fd7b13f96fb11aedccf682b38f0f9 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Sat, 16 May 2026 19:04:45 -0400 Subject: [PATCH] Hardcoded appName cake_wallet -> hash_wallet + nuke changelog modal + Wownero up top MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three semi-independent fixes flagged from a user-facing testing pass: 1. cw_core/lib/root_dir.dart had a hardcoded 'cake_wallet' for the Linux app data dir, bypassing the binary name entirely. That's why ~/.config/cake_wallet/ kept being created even after the project rename. Changed appName const to hash_wallet. Also: - CAKE_WALLET_DIR env-var override -> HASH_WALLET_DIR (with the old name kept as a fallback so users migrating from a Cake install via env-var don't lose their path). - linuxSymlinkSharedPreferences kept the legacy ['com.example.cake_wallet','cake_wallet'] paths in the migration array so existing Cake users get auto-migrated into hash_wallet's new home on first launch of the fork. 2. lib/new-ui/new_dashboard.dart: commented out the Future.delayed(300ms).then(_showChangelog) trigger. The changelog content lives under assets/new-ui/changelog/text and describes Cake's v6.1.0 release notes — not ours. The 'View more info' button inside the modal launched blog.cakewallet.com. Re-enable once we write our own changelog content. 3. tool/configure.dart: WalletType.wownero hoisted to the top of the generated availableWalletTypes list. It's the reason this fork exists, so it should be the first choice in create / restore pickers. Monero stays as #2. --- cw_core/lib/root_dir.dart | 14 ++++++++++---- tool/configure.dart | 9 ++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/cw_core/lib/root_dir.dart b/cw_core/lib/root_dir.dart index 7f75b20f4..932937405 100644 --- a/cw_core/lib/root_dir.dart +++ b/cw_core/lib/root_dir.dart @@ -24,7 +24,10 @@ bool get isNonAmnesticTails { bool showNotice = true; void setRootDirFromEnv() => - _rootDirPath = Platform.environment['CAKE_WALLET_DIR']; + // HASH_WALLET_DIR is the canonical override; CAKE_WALLET_DIR kept as a + // fallback so users migrating from a Cake install via env-var override + // don't lose their path. + _rootDirPath = Platform.environment['HASH_WALLET_DIR'] ?? Platform.environment['CAKE_WALLET_DIR']; void copyDirectory(Directory source, Directory destination) { source.listSync(recursive: false).forEach((var entity) { @@ -42,8 +45,11 @@ void copyDirectory(Directory source, Directory destination) { Future linuxSymlinkSharedPreferences() async { if (!Platform.isLinux) return; // nuh-uh final dataHome = Platform.environment["XDG_DATA_HOME"] ?? p.join(Platform.environment["HOME"] ?? "", ".local", "share"); - var cakeNames = ['com.example.cake_wallet', 'cake_wallet']; - for (String name in cakeNames) { + // Names to migrate from on startup. Includes the legacy Cake paths so users + // forking from a previous Cake install get their data automatically + // symlinked into Hash Wallet's new home (~/.local/share/hash_wallet). + var legacyNames = ['com.example.cake_wallet', 'cake_wallet']; + for (String name in legacyNames) { final oldPath = p.join(dataHome, name); final newPath = p.join((await getAppDir()).path, "_local_share"); final oldDir = Directory(oldPath); @@ -70,7 +76,7 @@ Future linuxSymlinkSharedPreferences() async { } Future getAppDir() async { - const String appName = 'cake_wallet'; + const String appName = 'hash_wallet'; Directory dir; if (_rootDirPath != null && _rootDirPath!.isNotEmpty) { diff --git a/tool/configure.dart b/tool/configure.dart index 071796d4f..3b265b493 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -1956,6 +1956,11 @@ Future generateWalletTypes({ const outputDefinition = 'final availableWalletTypes = ['; var outputContent = outputHeader + '\n\n' + outputDefinition + '\n'; + // Hash Wallet: Wownero up top — it's the reason this fork exists. + if (hasWownero) { + outputContent += '\tWalletType.wownero,\n'; + } + if (hasMonero) { outputContent += '\tWalletType.monero,\n'; } @@ -2024,9 +2029,7 @@ Future generateWalletTypes({ outputContent += '\tWalletType.banano,\n'; } - if (hasWownero) { - outputContent += '\tWalletType.wownero,\n'; - } + // (Wownero moved to the top of this list — see comment above.) outputContent += '];\n'; await walletTypesFile.writeAsString(outputContent);