mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
URL replacements throughout lib/: - support_view_model.dart: removed Cake's own support channels (email, website, forum, Telegram, Telegram bot). Only GitHub Issues + Releases remain. Third-party provider support links (ChangeNow, SideShift, SimpleSwap, Exolix, Trocador, Onramper, DFX, MoonPay, Robinhood, Kryptonim) kept — genuinely useful when a swap goes sideways. - transaction_details_view_model.dart + payjoin_details_view_model.dart: mempool.cakewallet.com -> mempool.space (canonical free public mempool, no affiliate). - services_updates_widget.dart: status.cakewallet.com -> our GH issues. - 8 widget/screen files: docs.cakewallet.com / blog / cakewallet.com help URLs repointed to github.com/Such-Software/hash-wallet (placeholder until we have our own docs; better than dead-linking to Cake's docs). User-facing text changes: - walletkit_service.dart: WalletKit metadata (name/description/url/icon/ redirect) all -> Hash Wallet / Such Software repo / hashwallet:// scheme. - di.dart: TrezorConnect callback URL + appName -> Hash Wallet. - vulnerable_seeds_popup.dart + haven_wallet_removal_popup.dart: copy rewritten to say 'Hash Wallet' instead of 'Cake Wallet', and point to GH issues instead of Cake's support email. - swap_provider_initial_preference_modal.dart: trailing 'Cake Wallet.' -> 'Hash Wallet.' Deep-link URL scheme cakewallet:// -> hashwallet:// in: - lib/main.dart, lib/src/screens/root/root.dart, lib/view_model/link_view_model.dart Means any cakewallet:// link from a payment QR / Trezor callback / shortcut now routes via hashwallet://. No existing user base so no migration needed. SVG asset swaps (content replaced, filenames kept so call-sites compile without rewriting): - assets/new-ui/cake_squircle_icon.svg -> hash_wallet/02_app_icon.svg - assets/new-ui/cakewallet-wordmark-light.svg -> hash_wallet/03_lockup_horizontal.svg (dark text for light backgrounds) - assets/new-ui/cakewallet-wordmark.svg -> hash_wallet/03_lockup_horizontal_dark.svg (light text for dark backgrounds) - apps_widget.dart: the conditional cakelabs-icon render became a SizedBox() no-op. The Apps tab is gutted anyway (placeholder content); this widget is also used elsewhere where the Cake Labs attribution badge is unwanted.
123 lines
5.0 KiB
Dart
123 lines
5.0 KiB
Dart
import 'package:hash_wallet/.secrets.g.dart' as secrets;
|
|
import 'package:hash_wallet/generated/i18n.dart';
|
|
import 'package:hash_wallet/store/app_store.dart';
|
|
import 'package:hash_wallet/view_model/settings/link_list_item.dart';
|
|
import 'package:hash_wallet/view_model/settings/settings_list_item.dart';
|
|
import 'package:hash_wallet/wallet_type_utils.dart';
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
part 'support_view_model.g.dart';
|
|
|
|
class SupportViewModel = SupportViewModelBase with _$SupportViewModel;
|
|
|
|
abstract class SupportViewModelBase with Store {
|
|
final AppStore _appStore;
|
|
|
|
SupportViewModelBase(this._appStore)
|
|
: items = [
|
|
// Hash Wallet: Cake's own support channels (email, website, forum,
|
|
// Discord, Telegram, Telegram bot) gutted — those are Cake Labs
|
|
// properties, not ours. Replaced with the only channel we have right
|
|
// now: GitHub Issues. The third-party provider support links below
|
|
// are kept because they're genuinely useful when a user has trouble
|
|
// with a swap/buy via that provider.
|
|
LinkListItem(
|
|
title: 'GitHub Issues',
|
|
icon: 'assets/images/github.png',
|
|
hasIconColor: true,
|
|
linkTitle: 'github.com/Such-Software/hash-wallet/issues',
|
|
link: 'https://github.com/Such-Software/hash-wallet/issues'),
|
|
LinkListItem(
|
|
title: 'GitHub Releases',
|
|
icon: 'assets/images/github.png',
|
|
hasIconColor: true,
|
|
linkTitle: S.current.apk_update,
|
|
link: 'https://github.com/Such-Software/hash-wallet/releases'),
|
|
LinkListItem(
|
|
title: 'ChangeNow',
|
|
icon: 'assets/images/change_now.png',
|
|
linkTitle: 'support@changenow.io',
|
|
link: 'mailto:support@changenow.io'),
|
|
LinkListItem(
|
|
title: 'SideShift',
|
|
icon: 'assets/images/sideshift.png',
|
|
linkTitle: 'help.sideshift.ai',
|
|
link: 'https://help.sideshift.ai/en/'),
|
|
LinkListItem(
|
|
title: 'SimpleSwap',
|
|
icon: 'assets/images/simpleSwap.png',
|
|
linkTitle: 'support@simpleswap.io',
|
|
link: 'mailto:support@simpleswap.io'),
|
|
LinkListItem(
|
|
title: 'Exolix',
|
|
icon: 'assets/images/exolix.png',
|
|
linkTitle: 'support@exolix.com',
|
|
link: 'mailto:support@exolix.com'),
|
|
LinkListItem(
|
|
title: 'SwapTrade',
|
|
icon: 'assets/images/swap_trade.png',
|
|
linkTitle: 'help.swaptrade.io',
|
|
link: 'mailto:support@exolix.com'),
|
|
LinkListItem(
|
|
title: 'Trocador',
|
|
icon: 'assets/images/trocador.png',
|
|
linkTitle: 'mail@trocador.app',
|
|
link: 'mailto:mail@trocador.app'),
|
|
LinkListItem(
|
|
title: 'Onramper',
|
|
icon: 'assets/images/onramper_dark.png',
|
|
lightIcon: 'assets/images/onramper_light.png',
|
|
linkTitle: 'View exchanges',
|
|
link: 'https://onramper.com/'),
|
|
LinkListItem(
|
|
title: 'DFX',
|
|
icon: 'assets/images/dfx_dark.png',
|
|
lightIcon: 'assets/images/dfx_light.png',
|
|
linkTitle: 'support@dfx.swiss',
|
|
link: 'mailto:support@dfx.swiss'),
|
|
if (!isMoneroOnly) ...[
|
|
LinkListItem(
|
|
title: 'MoonPay',
|
|
icon: 'assets/images/moonpay.png',
|
|
linkTitle: S.current.submit_request,
|
|
link: 'https://support.moonpay.com/hc/en-gb/requests/new'),
|
|
LinkListItem(
|
|
title: 'Robinhood Connect',
|
|
icon: 'assets/images/robinhood_dark.png',
|
|
lightIcon: 'assets/images/robinhood_light.png',
|
|
linkTitle: S.current.submit_request,
|
|
link: 'https://robinhood.com/contact')
|
|
],
|
|
LinkListItem(
|
|
title: 'Kryptonim',
|
|
icon: 'assets/images/kryptonim_dark.png',
|
|
lightIcon: 'assets/images/kryptonim_light.png',
|
|
linkTitle: 'contact@support.kryptonim.com',
|
|
link: 'mailto:contact@support.kryptonim.com'),
|
|
];
|
|
|
|
final docsUrl = 'https://github.com/Such-Software/hash-wallet';
|
|
|
|
String fetchUrl({String locale = "en", String authToken = ""}) {
|
|
var supportUrl =
|
|
"https://app.chatwoot.com/widget?website_token=${secrets.chatwootWebsiteToken}&locale=${locale}";
|
|
|
|
if (authToken.isNotEmpty) supportUrl += "&cw_conversation=$authToken";
|
|
|
|
return supportUrl;
|
|
}
|
|
|
|
String get appVersion =>
|
|
"${isMoneroOnly ? "Monero.com" : "Hash Wallet"} - ${_appStore.settingsStore.appVersion}";
|
|
|
|
String get fiatApiMode => _appStore.settingsStore.fiatApiMode.title;
|
|
|
|
String get walletType => _appStore.wallet?.type.name ?? 'Unknown';
|
|
|
|
String get walletSyncState => _appStore.wallet?.syncStatus.toString() ?? 'Unknown';
|
|
|
|
String get builtInTorState => _appStore.settingsStore.currentBuiltinTor ? 'Enabled' : 'Disabled';
|
|
|
|
List<SettingsListItem> items;
|
|
}
|