mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
Initial Hash Wallet rebrand from Cake Wallet fork
- Re-enable Wownero and remove the wallet-deprecation popup - Disable Solana, Tron, Zano, Zcash, Decred across all platform configs - Trim swap providers to Trocador-only (its aggregator already covers ChangeNow, FixedFloat, LetsExchange, Exolix, StealthEx, Quantex, +16 more) - Bundle ID com.suchsoftware.hashwallet, display name "Hash Wallet", URL scheme "hashwallet"; Android Java package moved - iOS plist + macOS xcconfig + Windows bat updated - About page and English strings rebranded; new README - Cake Pay verified hidden via existing FeatureFlag.isCakePayEnabled = false
This commit is contained in:
@@ -5,12 +5,10 @@ import 'package:cake_wallet/core/key_service.dart';
|
||||
import 'package:cake_wallet/entities/preferences_key.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/main.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/wallet_deprecation_popup.dart';
|
||||
import 'package:cake_wallet/reactions/on_authentication_state_change.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||
import 'package:cake_wallet/utils/exception_handler.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
import 'package:cw_core/exceptions.dart' show WalletDeprecationException;
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
@@ -75,17 +73,10 @@ class WalletLoadingService {
|
||||
} catch (error, stack) {
|
||||
String corruptedWalletsSeeds = "Corrupted wallets seeds (if retrievable, empty otherwise):";
|
||||
|
||||
if(error is WalletDeprecationException) {
|
||||
if(navigatorKey.currentContext != null) {
|
||||
showModalBottomSheet(
|
||||
context: navigatorKey.currentContext!, builder: (context)=>WalletDeprecationPopup(type: type, seed: error.seed,));
|
||||
}
|
||||
} else {
|
||||
await ExceptionHandler.resetLastPopupDate();
|
||||
final isLedgerError = await ExceptionHandler.isLedgerError(error);
|
||||
if (isLedgerError || await requireHardwareWalletConnection(type, name)) rethrow;
|
||||
await ExceptionHandler.onError(FlutterErrorDetails(exception: error, stack: stack));
|
||||
}
|
||||
await ExceptionHandler.resetLastPopupDate();
|
||||
final isLedgerError = await ExceptionHandler.isLedgerError(error);
|
||||
if (isLedgerError || await requireHardwareWalletConnection(type, name)) rethrow;
|
||||
await ExceptionHandler.onError(FlutterErrorDetails(exception: error, stack: stack));
|
||||
|
||||
// try fetching the seeds of the corrupted wallet to show it to the user
|
||||
try {
|
||||
|
||||
@@ -80,7 +80,7 @@ class _AboutPageState extends State<AboutPage> {
|
||||
spacing: 8,
|
||||
children: [
|
||||
Text(
|
||||
"Cake Wallet",
|
||||
"Hash Wallet",
|
||||
style: TextStyle(fontSize: 32, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(widget.appVersion,
|
||||
@@ -107,44 +107,14 @@ class _AboutPageState extends State<AboutPage> {
|
||||
SizedBox(height: 32),
|
||||
NewListSections(sections: {
|
||||
"": [
|
||||
ListItemRegularRow(
|
||||
keyValue: "official website",
|
||||
label: "Official Website",
|
||||
onTap: () => launchUrl(Uri.https("cakewallet.com")),
|
||||
trailingIconPath: "assets/new-ui/link_arrow.svg",
|
||||
foregroundColor: Theme.of(context).colorScheme.primary,
|
||||
trailingIconSize: 10),
|
||||
ListItemRegularRow(
|
||||
keyValue: "docs",
|
||||
label: "Cake Docs",
|
||||
onTap: () => launchUrl(Uri.https("docs.cakewallet.com")),
|
||||
trailingIconPath: "assets/new-ui/link_arrow.svg",
|
||||
foregroundColor: Theme.of(context).colorScheme.primary,
|
||||
trailingIconSize: 10)
|
||||
],
|
||||
"2": [
|
||||
ListItemRegularRow(
|
||||
keyValue: "gh",
|
||||
label: "GitHub",
|
||||
onTap: () => launchUrl(Uri.https("github.com", "cake-tech")),
|
||||
onTap: () => launchUrl(Uri.https("github.com", "Such-Software/hash-wallet")),
|
||||
trailingIconPath: "assets/new-ui/link_arrow.svg",
|
||||
foregroundColor: Theme.of(context).colorScheme.primary,
|
||||
trailingIconSize: 10),
|
||||
ListItemRegularRow(
|
||||
keyValue: "twitter",
|
||||
label: "X (Twitter)",
|
||||
onTap: () => launchUrl(Uri.https("twitter.com", "cakewallet")),
|
||||
trailingIconPath: "assets/new-ui/link_arrow.svg",
|
||||
foregroundColor: Theme.of(context).colorScheme.primary,
|
||||
trailingIconSize: 10),
|
||||
ListItemRegularRow(
|
||||
keyValue: "tg",
|
||||
label: "Telegram",
|
||||
onTap: () => launchUrl(Uri.https("t.me", "cakewallet")),
|
||||
trailingIconPath: "assets/new-ui/link_arrow.svg",
|
||||
foregroundColor: Theme.of(context).colorScheme.primary,
|
||||
trailingIconSize: 10)
|
||||
]
|
||||
],
|
||||
})
|
||||
],
|
||||
)
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
import 'package:cake_wallet/new-ui/widgets/animated_dropdown.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/new_primary_button.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/receive_page/receive_top_bar.dart';
|
||||
import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cw_core/currency_for_wallet_type.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WalletDeprecationPopup extends StatelessWidget {
|
||||
const WalletDeprecationPopup({super.key, required this.type, this.seed});
|
||||
|
||||
final WalletType type;
|
||||
final String? seed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final curr = walletTypeToCryptoCurrency(type);
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
|
||||
color: Theme.of(context).colorScheme.surface),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ModalTopBar(
|
||||
title: "",
|
||||
leadingIcon: Icon(Icons.close),
|
||||
onLeadingPressed: Navigator.of(context).pop,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: Column(
|
||||
spacing: 24,
|
||||
children: [
|
||||
CakeImageWidget(
|
||||
imageUrl: curr.iconPath,
|
||||
width: 64,
|
||||
height: 64,
|
||||
),
|
||||
Text(
|
||||
"${curr.fullName} is no longer supported",
|
||||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Text(
|
||||
"Apologies for the inconvenience.",
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (seed != null) ...[
|
||||
Text(
|
||||
"If you need to migrate your seed, you can see it below.",
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
AnimatedDropdown(content: Text(seed!), dropdownText: "Tap to show seed"),
|
||||
],
|
||||
NewPrimaryButton(
|
||||
onPressed: Navigator.of(context).pop,
|
||||
text: "Close",
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
textColor: Theme.of(context).colorScheme.onPrimary),
|
||||
SizedBox()
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,8 @@ class PackageInfo {
|
||||
buildNumber: packageInfo.buildNumber);
|
||||
}
|
||||
|
||||
static const _defaultCWAppName = 'Cake Wallet';
|
||||
static const _defaultCWAppPackageName = 'com.cakewallet.cake_wallet';
|
||||
static const _defaultCWAppName = 'Hash Wallet';
|
||||
static const _defaultCWAppPackageName = 'com.suchsoftware.hashwallet';
|
||||
static const _defaultCWAppVersion = '1.0.0';
|
||||
static const _defaultCWAppBuildNumber = '1';
|
||||
|
||||
|
||||
@@ -309,18 +309,22 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
|
||||
final TradesStore tradesStore;
|
||||
final SharedPreferences sharedPreferences;
|
||||
|
||||
// Hash Wallet: trimmed to Trocador only. Trocador's aggregator already fronts
|
||||
// ChangeNow, LetsExchange, Exolix, StealthEx, FixedFloat, Quantex, etc.,
|
||||
// letting us collect markup as the affiliate. Re-enable individual providers
|
||||
// here only after registering Such Software affiliate keys per provider.
|
||||
List<ExchangeProvider> get _allProviders => [
|
||||
ChangeNowExchangeProvider(settingsStore: _settingsStore),
|
||||
// ChangeNowExchangeProvider(settingsStore: _settingsStore),
|
||||
// SideShiftExchangeProvider(),
|
||||
ChainflipExchangeProvider(),
|
||||
if (FeatureFlag.isExolixEnabled) ExolixExchangeProvider(),
|
||||
SwapTradeExchangeProvider(),
|
||||
LetsExchangeExchangeProvider(),
|
||||
StealthExExchangeProvider(),
|
||||
XOSwapExchangeProvider(),
|
||||
SwapsXyzExchangeProvider(),
|
||||
JupiterExchangeProvider(),
|
||||
NearIntentsExchangeProvider(),
|
||||
// ChainflipExchangeProvider(),
|
||||
// if (FeatureFlag.isExolixEnabled) ExolixExchangeProvider(),
|
||||
// SwapTradeExchangeProvider(),
|
||||
// LetsExchangeExchangeProvider(),
|
||||
// StealthExExchangeProvider(),
|
||||
// XOSwapExchangeProvider(),
|
||||
// SwapsXyzExchangeProvider(),
|
||||
// JupiterExchangeProvider(),
|
||||
// NearIntentsExchangeProvider(),
|
||||
TrocadorExchangeProvider(
|
||||
useTorOnly: _useTorOnly, providerStates: _settingsStore.trocadorProviderStates),
|
||||
];
|
||||
|
||||
@@ -20,5 +20,5 @@ String get approximatedAppName {
|
||||
return 'Monero.com';
|
||||
}
|
||||
|
||||
return 'Cake Wallet';
|
||||
return 'Hash Wallet';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user