search and replace

This commit is contained in:
julian 2024-07-09 08:54:29 -06:00
parent b320347287
commit 77f4eff913
30 changed files with 86 additions and 55 deletions

View file

@ -174,7 +174,7 @@ class _NewWalletRecoveryPhraseWarningViewState
"write it down. Keep it safe and never share it with "
"anyone. Your recovery phrase is the only way you can"
" access your funds if you forget your PIN, lose your"
" phone, etc.\n\nStack Wallet does not keep nor is "
" phone, etc.\n\n${AppConfig.appName} does not keep nor is "
"able to restore your recover phrase. Only you have "
"access to your wallet.",
style: isDesktop

View file

@ -1155,7 +1155,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
),
if (AppConfig.isStackCoin(selectedCrypto?.ticker))
CustomTextButton(
text: "Choose from Stack",
text: "Choose from ${AppConfig.prefix}",
onTap: () {
try {
final coin = AppConfig.getCryptoCurrencyForTicker(

View file

@ -194,7 +194,7 @@ class _Step2ViewState extends ConsumerState<Step2View> {
),
if (AppConfig.isStackCoin(model.receiveTicker))
CustomTextButton(
text: "Choose from Stack",
text: "Choose from ${AppConfig.prefix}",
onTap: () {
try {
final coin = AppConfig.coins.firstWhere(
@ -480,7 +480,7 @@ class _Step2ViewState extends ConsumerState<Step2View> {
),
if (AppConfig.isStackCoin(model.sendTicker))
CustomTextButton(
text: "Choose from Stack",
text: "Choose from ${AppConfig.prefix}",
onTap: () {
try {
final coin = AppConfig.coins.firstWhere(

View file

@ -14,10 +14,9 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import '../../app_config.dart';
import '../../models/exchange/response_objects/trade.dart';
import 'confirm_change_now_send.dart';
import '../home_view/home_view.dart';
import '../send_view/sub_widgets/building_transaction_dialog.dart';
import '../../pages_desktop_specific/desktop_exchange/desktop_exchange_view.dart';
import '../../providers/providers.dart';
import '../../route_generator.dart';
@ -43,6 +42,9 @@ import '../../widgets/desktop/desktop_dialog_close_button.dart';
import '../../widgets/expandable.dart';
import '../../widgets/rounded_white_container.dart';
import '../../widgets/stack_dialog.dart';
import '../home_view/home_view.dart';
import '../send_view/sub_widgets/building_transaction_dialog.dart';
import 'confirm_change_now_send.dart';
class SendFromView extends ConsumerStatefulWidget {
const SendFromView({
@ -135,7 +137,7 @@ class _SendFromViewState extends ConsumerState<SendFromView> {
left: 32,
),
child: Text(
"Send from Stack",
"Send from ${AppConfig.prefix}",
style: STextStyles.desktopH3(context),
),
),

View file

@ -264,7 +264,7 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
trade.status == "waiting" ||
trade.status == "Waiting"))
SecondaryButton(
label: "Send from Stack",
label: "Send from ${AppConfig.prefix}",
buttonHeight: ButtonHeight.l,
onPressed: () {
CryptoCurrency coin;
@ -1379,7 +1379,7 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
trade.status == "waiting" ||
trade.status == "Waiting"))
SecondaryButton(
label: "Send from Stack",
label: "Send from ${AppConfig.prefix}",
onPressed: () {
CryptoCurrency coin;
try {

View file

@ -171,7 +171,7 @@ class _IntroViewState extends ConsumerState<IntroView> {
),
if (isDesktop)
SecondaryButton(
label: "Restore from Stack backup",
label: "Restore from ${AppConfig.prefix} backup",
onPressed: () {
Navigator.of(context).pushNamed(
CreatePasswordView.routeName,
@ -314,7 +314,7 @@ class GetStartedButton extends StatelessWidget {
);
},
child: Text(
"Create new Stack",
"Create new ${AppConfig.prefix}",
style: STextStyles.button(context).copyWith(fontSize: 20),
),
),

View file

@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:tuple/tuple.dart';
import '../../../../app_config.dart';
import '../../../../providers/global/prefs_provider.dart';
import '../../../../themes/stack_colors.dart';
import '../../../../utilities/constants.dart';
@ -218,7 +219,7 @@ class AdvancedSettingsView extends StatelessWidget {
text: TextSpan(
children: [
TextSpan(
text: "Stack Experience",
text: "${AppConfig.prefix} Experience",
style: STextStyles.titleBold12(context),
),
TextSpan(

View file

@ -99,7 +99,7 @@ class GlobalSettingsView extends StatelessWidget {
SettingsListButton(
iconAssetName: Assets.svg.downloadFolder,
iconSize: 14,
title: "Stack backup & restore",
title: "${AppConfig.prefix} backup & restore",
onPressed: () {
Navigator.push(
context,
@ -113,9 +113,9 @@ class GlobalSettingsView extends StatelessWidget {
biometricsCancelButtonString:
"CANCEL",
biometricsLocalizedReason:
"Authenticate to access Stack backup & restore settings",
"Authenticate to access ${AppConfig.prefix} backup & restore settings",
biometricsAuthenticationTitle:
"Stack backup",
"${AppConfig.prefix} backup",
),
settings: const RouteSettings(
name: "/swblockscreen",

View file

@ -14,6 +14,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../../../app_config.dart';
import '../../../../providers/global/auto_swb_service_provider.dart';
import '../../../../providers/providers.dart';
import '../../../../themes/stack_colors.dart';
@ -316,7 +317,7 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
children: [
const TextSpan(
text:
"Auto Backup is a custom Stack Wallet feature that offers a convenient backup of your data.\n\nTo ensure maximum security, we recommend using a unique password that you haven't used anywhere else on the internet before. Your password is not stored.\n\nFor more information, please see our website ",
"Auto Backup is a custom ${AppConfig.appName} feature that offers a convenient backup of your data.\n\nTo ensure maximum security, we recommend using a unique password that you haven't used anywhere else on the internet before. Your password is not stored.\n\nFor more information, please see our website ",
),
TextSpan(
text: "stackwallet.com.",

View file

@ -18,6 +18,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:stack_wallet_backup/stack_wallet_backup.dart';
import 'package:zxcvbn/zxcvbn.dart';
import '../../../../app_config.dart';
import '../../../../notifications/show_flush_bar.dart';
import '../../../../providers/global/prefs_provider.dart';
import '../../../../providers/global/secure_store_provider.dart';
@ -651,12 +652,12 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
builder: (_) => Platform.isAndroid
? StackOkDialog(
title:
"Stack Auto Backup enabled and saved to:",
"${AppConfig.prefix} Auto Backup enabled and saved to:",
message: fileToSave,
)
: const StackOkDialog(
title:
"Stack Auto Backup enabled!",
"${AppConfig.prefix} Auto Backup enabled!",
),
);
if (mounted) {

View file

@ -17,6 +17,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:zxcvbn/zxcvbn.dart';
import '../../../../app_config.dart';
import '../../../../notifications/show_flush_bar.dart';
import '../../../../providers/global/secure_store_provider.dart';
import '../../../../themes/stack_colors.dart';
@ -774,7 +775,7 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
height: 26,
),
Text(
"Stack backup saved to: \n",
"${AppConfig.prefix} backup saved to: \n",
style: STextStyles
.desktopH3(context),
),

View file

@ -10,6 +10,7 @@
import 'package:flutter/material.dart';
import '../../../../../app_config.dart';
import '../../../../../themes/stack_colors.dart';
import '../../../../../utilities/text_styles.dart';
import '../../../../../utilities/util.dart';
@ -89,7 +90,7 @@ class CancelStackRestoreDialog extends StatelessWidget {
.snackBarBackError,
child: Text(
"If you cancel, the restore will not complete, and "
"the wallets will not appear in your Stack.",
"the wallets will not appear in your ${AppConfig.prefix}.",
style: STextStyles.desktopTextMedium(context),
),
),

View file

@ -20,6 +20,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:stack_wallet_backup/stack_wallet_backup.dart';
import 'package:zxcvbn/zxcvbn.dart';
import '../../../../app_config.dart';
import '../../../../notifications/show_flush_bar.dart';
import '../../../../providers/global/prefs_provider.dart';
import '../../../../providers/global/secure_store_provider.dart';
@ -221,10 +222,11 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
barrierDismissible: false,
builder: (_) => Platform.isAndroid
? StackOkDialog(
title: "Stack Auto Backup saved to:",
title: "${AppConfig.prefix} Auto Backup saved to:",
message: fileToSave,
)
: const StackOkDialog(title: "Stack Auto Backup saved"),
: const StackOkDialog(
title: "${AppConfig.prefix} Auto Backup saved"),
);
if (mounted) {
passwordController.text = "";

View file

@ -14,6 +14,8 @@ import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:permission_handler/permission_handler.dart';
import '../../../../../app_config.dart';
import '../../../../../utilities/util.dart';
class SWBFileSystem {
@ -39,17 +41,18 @@ class SWBFileSystem {
// debugPrint(rootPath!.absolute.toString());
late Directory sampleFolder;
const dirName = "${AppConfig.prefix}_backup";
if (Platform.isIOS) {
sampleFolder = Directory(rootPath!.path);
} else if (Platform.isAndroid) {
sampleFolder = Directory('${rootPath!.path}Documents/Stack_backups');
sampleFolder = Directory('${rootPath!.path}Documents/$dirName');
} else if (Platform.isLinux) {
sampleFolder = Directory('${rootPath!.path}/Stack_backups');
sampleFolder = Directory('${rootPath!.path}/$dirName');
} else if (Platform.isWindows) {
sampleFolder = Directory('${rootPath!.path}/Stack_backups');
sampleFolder = Directory('${rootPath!.path}/$dirName');
} else if (Platform.isMacOS) {
sampleFolder = Directory('${rootPath!.path}/Stack_backups');
sampleFolder = Directory('${rootPath!.path}/$dirName');
}
try {

View file

@ -14,6 +14,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:tuple/tuple.dart';
import '../../../../app_config.dart';
import '../../../../notifications/show_flush_bar.dart';
import '../../../../route_generator.dart';
import '../../../../themes/stack_colors.dart';
@ -205,7 +206,7 @@ class _RestoreFromEncryptedStringViewState
color: Colors.transparent,
child: Center(
child: Text(
"Decrypting Stack backup file",
"Decrypting ${AppConfig.prefix} backup file",
style:
STextStyles.pageTitleH2(
context,

View file

@ -338,7 +338,7 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
color: Colors.transparent,
child: Center(
child: Text(
"Decrypting Stack backup file",
"Decrypting ${AppConfig.prefix} backup file",
style: STextStyles.pageTitleH2(
context,
).copyWith(
@ -452,7 +452,7 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
color: Colors.transparent,
child: Center(
child: Text(
"Decrypting Stack backup file",
"Decrypting ${AppConfig.prefix} backup file",
style: STextStyles.pageTitleH2(
context,
).copyWith(

View file

@ -10,9 +10,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'auto_backup_view.dart';
import 'create_backup_view.dart';
import 'restore_from_file_view.dart';
import '../../../../app_config.dart';
import '../../../../themes/stack_colors.dart';
import '../../../../utilities/assets.dart';
import '../../../../utilities/constants.dart';
@ -20,6 +19,9 @@ import '../../../../utilities/text_styles.dart';
import '../../../../widgets/background.dart';
import '../../../../widgets/custom_buttons/app_bar_icon_button.dart';
import '../../../../widgets/rounded_white_container.dart';
import 'auto_backup_view.dart';
import 'create_backup_view.dart';
import 'restore_from_file_view.dart';
class StackBackupView extends StatelessWidget {
const StackBackupView({
@ -42,7 +44,7 @@ class StackBackupView extends StatelessWidget {
},
),
title: Text(
"Stack backup",
"${AppConfig.prefix} backup",
style: STextStyles.navBarTitle(context),
),
),

View file

@ -170,7 +170,11 @@ class _Mnemonic extends ConsumerWidget {
child: Padding(
padding: const EdgeInsets.all(12),
child: Text(
"Please write down your backup key. Keep it safe and never share it with anyone. Your backup key is the only way you can access your funds if you forget your PIN, lose your phone, etc.\n\nStack Wallet does not keep nor is able to restore your backup key. Only you have access to your wallet.",
"Please write down your backup key. Keep it safe and never share "
"it with anyone. Your backup key is the only way you can access"
" your funds if you forget your PIN, lose your phone, etc.\n\n"
"${AppConfig.appName} does not keep nor is able to restore your"
" backup key. Only you have access to your wallet.",
style: STextStyles.label(context),
),
),

View file

@ -11,6 +11,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../../app_config.dart';
import '../../../../providers/providers.dart';
import '../../../../themes/stack_colors.dart';
import '../../../../utilities/text_styles.dart';
@ -69,7 +70,11 @@ class DeleteWalletWarningView extends ConsumerWidget {
.extension<StackColors>()!
.warningBackground,
child: Text(
"You are going to permanently delete your wallet.\n\nIf you delete your wallet, the only way you can have access to your funds is by using your backup key.\n\nStack Wallet does not keep nor is able to restore your backup key or your wallet.\n\nPLEASE SAVE YOUR BACKUP KEY.",
"You are going to permanently delete your wallet.\n\n"
"If you delete your wallet, the only way you can have access"
" to your funds is by using your backup key.\n\n"
"${AppConfig.appName} does not keep nor is able to restore "
"your backup key or your wallet.\n\nPLEASE SAVE YOUR BACKUP KEY.",
style: STextStyles.baseXS(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!

View file

@ -960,8 +960,7 @@ class _DesktopTransactionCardRowState
unawaited(
showFloatingFlushBar(
context: context,
message:
"Restored Epic funds from your Seed have no Data.\nUse Stack Backup to keep your transaction history.",
message: "Restored Epic funds from your Seed have no Data.",
type: FlushBarType.warning,
duration: const Duration(seconds: 5),
),

View file

@ -326,7 +326,7 @@ class _DesktopStep2State extends ConsumerState<DesktopStep2> {
),
))
CustomTextButton(
text: "Choose from Stack",
text: "Choose from ${AppConfig.prefix}",
onTap: selectRecipientAddressFromStack,
),
],
@ -472,7 +472,7 @@ class _DesktopStep2State extends ConsumerState<DesktopStep2> {
),
))
CustomTextButton(
text: "Choose from Stack",
text: "Choose from ${AppConfig.prefix}",
onTap: selectRefundAddressFromStack,
),
],

View file

@ -13,6 +13,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import 'package:tuple/tuple.dart';
import '../../../app_config.dart';
import '../../../providers/providers.dart';
import '../../../themes/stack_colors.dart';
import '../../../utilities/amount/amount.dart';
@ -87,7 +88,7 @@ class _DesktopChooseFromStackState
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Choose from Stack",
"Choose from ${AppConfig.prefix}",
style: STextStyles.desktopH3(context),
),
const SizedBox(

View file

@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../../../../app_config.dart';
import '../../../../../db/sqlite/firo_cache.dart';
import '../../../../../providers/db/main_db_provider.dart';
import '../../../../../providers/global/prefs_provider.dart';
@ -281,7 +282,7 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
if (wallet is OrdinalsInterface)
_MoreFeaturesItem(
label: "Ordinals",
detail: "View and control your ordinals in Stack",
detail: "View and control your ordinals in ${AppConfig.prefix}",
iconAsset: Assets.svg.ordinal,
onPressed: () async => widget.onOrdinalsPressed?.call(),
),

View file

@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:isar/isar.dart';
import '../../app_config.dart';
import '../../db/hive/db.dart';
import '../../notifications/show_flush_bar.dart';
import '../../pages/intro_view.dart';
@ -143,7 +144,7 @@ class _ForgotPasswordDesktopViewState
),
TextSpan(
text: widget.shouldCreateNew
? "create a new Stack"
? "create a new ${AppConfig.prefix}"
: "restore from backup",
style: STextStyles.desktopTextSmallBold(context),
),

View file

@ -74,7 +74,9 @@ class _ForgotPasswordDesktopViewState
SizedBox(
width: 400,
child: Text(
"${AppConfig.appName} does not store your password. Create new wallet or use a Stack backup file to restore your wallet.",
"${AppConfig.appName} does not store your password. "
"Create new wallet or use a ${AppConfig.prefix} "
"backup file to restore your wallet.",
textAlign: TextAlign.center,
style: STextStyles.desktopTextSmall(context).copyWith(
color: Theme.of(context)
@ -87,7 +89,7 @@ class _ForgotPasswordDesktopViewState
height: 48,
),
PrimaryButton(
label: "Create new Stack",
label: "Create new ${AppConfig.prefix}",
onPressed: () {
const shouldCreateNew = true;
Navigator.of(context).pushNamed(
@ -100,7 +102,7 @@ class _ForgotPasswordDesktopViewState
height: 24,
),
SecondaryButton(
label: "Restore from Stack backup",
label: "Restore from ${AppConfig.prefix} backup",
onPressed: () {
const shouldCreateNew = false;
Navigator.of(context).pushNamed(

View file

@ -94,7 +94,7 @@ class _ForgottenPassphraseRestoreFromSWBState
color: Colors.transparent,
child: Center(
child: Text(
"Decrypting Stack backup file",
"Decrypting ${AppConfig.prefix} backup file",
style: STextStyles.pageTitleH2(context).copyWith(
color:
Theme.of(context).extension<StackColors>()!.textWhite,
@ -245,7 +245,7 @@ class _ForgottenPassphraseRestoreFromSWBState
height: 32,
),
Text(
"Use your Stack backup file to restore your wallets, address book, and wallet preferences.",
"Use your ${AppConfig.prefix} backup file to restore your wallets, address book, and wallet preferences.",
textAlign: TextAlign.center,
style: STextStyles.desktopTextSmall(context).copyWith(
color: Theme.of(context)

View file

@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart';
import '../../../../app_config.dart';
import '../../../../pages/settings_views/global_settings_view/advanced_views/manage_coin_units/manage_coin_units_view.dart';
import '../../../../providers/global/prefs_provider.dart';
import '../../../../themes/stack_colors.dart';
@ -184,7 +185,7 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Stack Experience",
"${AppConfig.prefix} Experience",
style: STextStyles.desktopTextExtraSmall(
context,
).copyWith(

View file

@ -20,6 +20,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:stack_wallet_backup/stack_wallet_backup.dart';
import 'package:zxcvbn/zxcvbn.dart';
import '../../../../app_config.dart';
import '../../../../notifications/show_flush_bar.dart';
import '../../../../pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart';
import '../../../../pages/settings_views/global_settings_view/stack_backup_views/helpers/swb_file_system.dart';
@ -776,7 +777,7 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
if (Platform.isAndroid) {
return StackOkDialog(
title:
"Stack Auto Backup enabled and saved to:",
"${AppConfig.prefix} Auto Backup enabled and saved to:",
message: fileToSave,
);
} else if (Util.isDesktop) {
@ -800,7 +801,7 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
.spaceBetween,
children: [
Text(
"Stack Auto Backup enabled!",
"${AppConfig.prefix} Auto Backup enabled!",
style:
STextStyles.desktopH3(
context,
@ -834,7 +835,8 @@ class _CreateAutoBackup extends ConsumerState<CreateAutoBackup> {
);
} else {
return const StackOkDialog(
title: "Stack Auto Backup enabled!",
title:
"${AppConfig.prefix} Auto Backup enabled!",
);
}
},

View file

@ -15,6 +15,7 @@ import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart';
import 'package:isar/isar.dart';
import '../app_config.dart';
import '../models/isar/models/log.dart';
import '../utilities/logger.dart';
@ -98,7 +99,7 @@ class DebugService extends ChangeNotifier {
Future<String> exportToFile(String directory, EventBus eventBus) async {
final now = DateTime.now();
final filename =
"Stack_Wallet_logs_${now.year}_${now.month}_${now.day}_${now.hour}_${now.minute}_${now.second}.txt";
"${AppConfig.prefix}_Wallet_logs_${now.year}_${now.month}_${now.day}_${now.hour}_${now.minute}_${now.second}.txt";
final filepath = "$directory/$filename";
final File file = await File(filepath).create();

View file

@ -181,8 +181,7 @@ class _TransactionCardState extends ConsumerState<TransactionCard> {
unawaited(
showFloatingFlushBar(
context: context,
message:
"Restored Epic funds from your Seed have no Data.\nUse Stack Backup to keep your transaction history.",
message: "Restored Epic funds from your Seed have no Data.",
type: FlushBarType.warning,
duration: const Duration(seconds: 5),
),