Merge pull request #926 from cypherstack/testing

Testing
This commit is contained in:
julian-CStack 2024-07-08 11:28:38 -06:00 committed by GitHub
commit 655cc0e6f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 90 additions and 50 deletions

View file

@ -15,6 +15,8 @@ abstract class AppConfig {
static const prefix = _prefix; static const prefix = _prefix;
static const suffix = _suffix; static const suffix = _suffix;
static const emptyWalletsMessage = _emptyWalletsMessage;
static String get appDefaultDataDirName => _appDataDirName; static String get appDefaultDataDirName => _appDataDirName;
static String get shortDescriptionText => _shortDescriptionText; static String get shortDescriptionText => _shortDescriptionText;
static String get commitHash => _commitHash; static String get commitHash => _commitHash;

View file

@ -4,6 +4,7 @@ import 'dart:typed_data';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../../../app_config.dart';
import '../../../../../frost_route_generator.dart'; import '../../../../../frost_route_generator.dart';
import '../../../../../notifications/show_flush_bar.dart'; import '../../../../../notifications/show_flush_bar.dart';
import '../../../../../pages_desktop_specific/desktop_home_view.dart'; import '../../../../../pages_desktop_specific/desktop_home_view.dart';
@ -45,7 +46,7 @@ class _FrostCreateStep5State extends ConsumerState<FrostCreateStep5> {
static const _warning = "These are your private keys. Please back them up, " static const _warning = "These are your private keys. Please back them up, "
"keep them safe and never share it with anyone. Your private keys are the" "keep them safe and never share it with anyone. Your private keys are the"
" only way you can access your funds if you forget PIN, lose your phone, " " only way you can access your funds if you forget PIN, lose your phone, "
"etc. Stack Wallet does not keep nor is able to restore your private keys" "etc. ${AppConfig.prefix} does not keep nor is able to restore your private keys"
"."; ".";
late final String seed, recoveryString, serializedKeys, multisigConfig; late final String seed, recoveryString, serializedKeys, multisigConfig;

View file

@ -17,6 +17,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:tuple/tuple.dart'; import 'package:tuple/tuple.dart';
import '../../../app_config.dart';
import '../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart'; import '../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import '../../../providers/db/main_db_provider.dart'; import '../../../providers/db/main_db_provider.dart';
import '../../../providers/global/secure_store_provider.dart'; import '../../../providers/global/secure_store_provider.dart';
@ -427,7 +428,7 @@ class _NewWalletRecoveryPhraseWarningViewState
), ),
Flexible( Flexible(
child: Text( child: Text(
"I understand that Stack Wallet does not keep and cannot restore my recovery phrase, and If I lose my recovery phrase, I will not be able to access my funds.", "I understand that ${AppConfig.appName} does not keep and cannot restore my recovery phrase, and If I lose my recovery phrase, I will not be able to access my funds.",
style: isDesktop style: isDesktop
? STextStyles.desktopTextMedium( ? STextStyles.desktopTextMedium(
context, context,

View file

@ -49,6 +49,8 @@ class _IntroViewState extends ConsumerState<IntroView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType "); debugPrint("BUILD: $runtimeType ");
final stack =
ref.watch(themeProvider.select((value) => value.assets.stack));
return Background( return Background(
child: Scaffold( child: Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background, backgroundColor: Theme.of(context).extension<StackColors>()!.background,
@ -68,16 +70,22 @@ class _IntroViewState extends ConsumerState<IntroView> {
constraints: const BoxConstraints( constraints: const BoxConstraints(
maxWidth: 300, maxWidth: 300,
), ),
child: SvgPicture.file( child: SizedBox(
File(
ref.watch(
themeProvider.select(
(value) => value.assets.stack,
),
),
),
width: isDesktop ? 324 : 266, width: isDesktop ? 324 : 266,
height: isDesktop ? 324 : 266, height: isDesktop ? 324 : 266,
child: (stack.endsWith(".png"))
? Image.file(
File(
stack,
),
)
: SvgPicture.file(
File(
stack,
),
width: isDesktop ? 324 : 266,
height: isDesktop ? 324 : 266,
),
), ),
), ),
), ),

View file

@ -24,6 +24,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS; import 'package:lelantus/git_versions.dart' as FIRO_VERSIONS;
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import '../../../../app_config.dart';
import '../../../../models/isar/models/log.dart'; import '../../../../models/isar/models/log.dart';
import '../../../../notifications/show_flush_bar.dart'; import '../../../../notifications/show_flush_bar.dart';
import '../../../../providers/global/debug_service_provider.dart'; import '../../../../providers/global/debug_service_provider.dart';
@ -421,7 +422,7 @@ class _DebugViewState extends ConsumerState<DebugView> {
}, },
child: CustomLoadingOverlay( child: CustomLoadingOverlay(
message: message:
"Generating Stack logs file", "Generating ${AppConfig.prefix} logs file",
eventBus: eventBus, eventBus: eventBus,
), ),
), ),

View file

@ -11,6 +11,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../../app_config.dart';
import '../../../../themes/stack_colors.dart'; import '../../../../themes/stack_colors.dart';
import '../../../../utilities/block_explorers.dart'; import '../../../../utilities/block_explorers.dart';
import '../../../../utilities/text_styles.dart'; import '../../../../utilities/text_styles.dart';
@ -91,7 +92,7 @@ class _ManageExplorerViewState extends ConsumerState<ManageExplorerView> {
"every block explorer has a slightly different URL " "every block explorer has a slightly different URL "
"scheme.\n\nPaste in your block explorer of choice," "scheme.\n\nPaste in your block explorer of choice,"
" then edit in [TXID] where the transaction ID " " then edit in [TXID] where the transaction ID "
"should go, and Stack Wallet will auto fill the " "should go, and ${AppConfig.appName} will auto fill the "
"transaction ID in that place of URL.", "transaction ID in that place of URL.",
style: STextStyles.itemSubtitle(context), style: STextStyles.itemSubtitle(context),
), ),

View file

@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import '../app_config.dart';
import '../db/hive/db.dart'; import '../db/hive/db.dart';
import '../pages_desktop_specific/password/create_password_view.dart'; import '../pages_desktop_specific/password/create_password_view.dart';
import '../providers/global/prefs_provider.dart'; import '../providers/global/prefs_provider.dart';
@ -108,7 +109,7 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
"Choose your Stack experience", "Choose your ${AppConfig.prefix} experience",
style: isDesktop style: isDesktop
? STextStyles.desktopH2(context) ? STextStyles.desktopH2(context)
: STextStyles.pageTitleH1(context), : STextStyles.pageTitleH1(context),
@ -253,10 +254,12 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
) )
.then((_) { .then((_) {
if (isEasy) { if (isEasy) {
unawaited( if (AppConfig.hasFeature(AppFeature.swap)) {
ExchangeDataLoadingService.instance unawaited(
.loadAll(), ExchangeDataLoadingService.instance
); .loadAll(),
);
}
// unawaited( // unawaited(
// BuyDataLoadingService().loadAll(ref)); // BuyDataLoadingService().loadAll(ref));
ref ref

View file

@ -33,6 +33,9 @@ class EmptyWallets extends ConsumerWidget {
final isDesktop = Util.isDesktop; final isDesktop = Util.isDesktop;
final stack =
ref.watch(themeProvider.select((value) => value.assets.stack));
return SafeArea( return SafeArea(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
@ -47,21 +50,28 @@ class EmptyWallets extends ConsumerWidget {
const Spacer( const Spacer(
flex: 2, flex: 2,
), ),
SvgPicture.file( SizedBox(
File(
ref.watch(
themeProvider.select(
(value) => value.assets.stack,
),
),
),
width: isDesktop ? 324 : MediaQuery.of(context).size.width / 3, width: isDesktop ? 324 : MediaQuery.of(context).size.width / 3,
child: (stack.endsWith(".png"))
? Image.file(
File(
stack,
),
)
: SvgPicture.file(
File(
stack,
),
width: isDesktop
? 324
: MediaQuery.of(context).size.width / 3,
),
), ),
SizedBox( SizedBox(
height: isDesktop ? 30 : 16, height: isDesktop ? 30 : 16,
), ),
Text( Text(
"You do not have any wallets yet. Start building your crypto Stack!", AppConfig.emptyWalletsMessage,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: isDesktop style: isDesktop
? STextStyles.desktopSubtitleH2(context).copyWith( ? STextStyles.desktopSubtitleH2(context).copyWith(

View file

@ -245,7 +245,7 @@ class _ForgottenPassphraseRestoreFromSWBState
height: 32, height: 32,
), ),
Text( Text(
"Use your Stack wallet backup file to restore your wallets, address book, and wallet preferences.", "Use your Stack backup file to restore your wallets, address book, and wallet preferences.",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: STextStyles.desktopTextSmall(context).copyWith( style: STextStyles.desktopTextSmall(context).copyWith(
color: Theme.of(context) color: Theme.of(context)

View file

@ -226,9 +226,9 @@ class _DesktopEditBlockExplorerDialogState
" every block explorer has a slightly different URL scheme." " every block explorer has a slightly different URL scheme."
"\n\n" "\n\n"
"Paste in your block explorer of choice, then edit in" "Paste in your block explorer of choice, then edit in"
" [TXID] where the transaction ID should go, and Stack" " [TXID] where the transaction ID should go, and "
" Wallet will auto fill the transaction ID in that place" "${AppConfig.appName} will auto fill the transaction"
" of the URL.", " ID in that place of the URL.",
style: STextStyles.desktopTextExtraExtraSmall(context), style: STextStyles.desktopTextExtraExtraSmall(context),
), ),
), ),

View file

@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import '../../../../app_config.dart';
import '../../../../db/hive/db.dart'; import '../../../../db/hive/db.dart';
import '../../../../providers/global/prefs_provider.dart'; import '../../../../providers/global/prefs_provider.dart';
import '../../../../providers/global/price_provider.dart'; import '../../../../providers/global/price_provider.dart';
@ -69,7 +70,7 @@ class _StackPrivacyDialog extends ConsumerState<StackPrivacyDialog> {
Padding( Padding(
padding: const EdgeInsets.all(32), padding: const EdgeInsets.all(32),
child: Text( child: Text(
"Choose Your Stack Experience", "Choose Your ${AppConfig.prefix} Experience",
style: STextStyles.desktopH3(context), style: STextStyles.desktopH3(context),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -192,9 +193,11 @@ class _StackPrivacyDialog extends ConsumerState<StackPrivacyDialog> {
) )
.then((_) { .then((_) {
if (isEasy) { if (isEasy) {
unawaited( if (AppConfig.hasFeature(AppFeature.swap)) {
ExchangeDataLoadingService.instance.loadAll(), unawaited(
); ExchangeDataLoadingService.instance.loadAll(),
);
}
ref ref
.read(priceAnd24hChangeNotifierProvider) .read(priceAnd24hChangeNotifierProvider)
.start(true); .start(true);

View file

@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import '../../../app_config.dart';
import '../../../pages/settings_views/global_settings_view/syncing_preferences_views/syncing_options_view.dart'; import '../../../pages/settings_views/global_settings_view/syncing_preferences_views/syncing_options_view.dart';
import '../../../providers/global/prefs_provider.dart'; import '../../../providers/global/prefs_provider.dart';
import '../../../themes/stack_colors.dart'; import '../../../themes/stack_colors.dart';
@ -115,7 +116,7 @@ class _SyncingPreferencesSettings
), ),
TextSpan( TextSpan(
text: text:
"\n\nSet up your syncing preferences for all wallets in your Stack.", "\n\nSet up your syncing preferences for all wallets in your ${AppConfig.prefix}.",
style: STextStyles.desktopTextExtraExtraSmall( style: STextStyles.desktopTextExtraExtraSmall(
context, context,
), ),

View file

@ -31,7 +31,7 @@ final pThemeService = Provider<ThemeService>((ref) {
}); });
class ThemeService { class ThemeService {
static const _currentDefaultThemeVersion = 10; static const _currentDefaultThemeVersion = 11;
ThemeService._(); ThemeService._();
static ThemeService? _instance; static ThemeService? _instance;
static ThemeService get instance => _instance ??= ThemeService._(); static ThemeService get instance => _instance ??= ThemeService._();

View file

@ -8,11 +8,12 @@
* *
*/ */
import '../app_config.dart';
import '../wallets/crypto_currency/crypto_currency.dart'; import '../wallets/crypto_currency/crypto_currency.dart';
abstract class DefaultNodes { abstract class DefaultNodes {
static const String defaultNodeIdPrefix = "default_"; static const String defaultNodeIdPrefix = "default_";
static String buildId(CryptoCurrency cryptoCurrency) => static String buildId(CryptoCurrency cryptoCurrency) =>
"$defaultNodeIdPrefix${cryptoCurrency.identifier}"; "$defaultNodeIdPrefix${cryptoCurrency.identifier}";
static const String defaultName = "Stack Default"; static const String defaultName = "${AppConfig.prefix} Default";
} }

View file

@ -287,21 +287,23 @@ packages:
source: hosted source: hosted
version: "4.6.0" version: "4.6.0"
coinlib: coinlib:
dependency: transitive dependency: "direct overridden"
description: description:
name: coinlib path: coinlib
sha256: "44aa3f7b07d3b03d58353e7657f43cdaf76a70ad2cce5bdac9306208099d8df5" ref: b88e68e2e10ffe54d802deeed6b9e83da7721a1f
url: "https://pub.dev" resolved-ref: b88e68e2e10ffe54d802deeed6b9e83da7721a1f
source: hosted url: "https://github.com/peercoin/coinlib.git"
version: "2.0.0" source: git
version: "2.1.0-rc.1"
coinlib_flutter: coinlib_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
name: coinlib_flutter path: coinlib_flutter
sha256: b352378773158dbaec37bd542c297682f3812f9881acb676971f0f4c5893631f ref: b88e68e2e10ffe54d802deeed6b9e83da7721a1f
url: "https://pub.dev" resolved-ref: b88e68e2e10ffe54d802deeed6b9e83da7721a1f
source: hosted url: "https://github.com/peercoin/coinlib.git"
version: "2.0.0" source: git
version: "2.1.0-rc.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
@ -1588,8 +1590,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "packages/solana" path: "packages/solana"
ref: a83e375678eb22fe544dc125d29bbec0fb833882 ref: "706be5f166d31736c443cca4cd311b7fcfc2a9bf"
resolved-ref: a83e375678eb22fe544dc125d29bbec0fb833882 resolved-ref: "706be5f166d31736c443cca4cd311b7fcfc2a9bf"
url: "https://github.com/cypherstack/espresso-cash-public.git" url: "https://github.com/cypherstack/espresso-cash-public.git"
source: git source: git
version: "0.30.4" version: "0.30.4"

View file

@ -43,6 +43,8 @@ part of 'app_config.dart';
const _prefix = "Campfire"; const _prefix = "Campfire";
const _separator = ""; const _separator = "";
const _suffix = ""; const _suffix = "";
const _emptyWalletsMessage =
"Join us around the Campfire and create a wallet!";
const _appDataDirName = "campfire"; const _appDataDirName = "campfire";
const _shortDescriptionText = "Your privacy. Your wallet. Your Firo."; const _shortDescriptionText = "Your privacy. Your wallet. Your Firo.";
const _commitHash = "$BUILT_COMMIT_HASH"; const _commitHash = "$BUILT_COMMIT_HASH";

View file

@ -37,6 +37,8 @@ part of 'app_config.dart';
const _prefix = "Stack"; const _prefix = "Stack";
const _separator = " "; const _separator = " ";
const _suffix = "Duo"; const _suffix = "Duo";
const _emptyWalletsMessage =
"You do not have any wallets yet. Start building your crypto Stack!";
const _appDataDirName = "stackduo"; const _appDataDirName = "stackduo";
const _shortDescriptionText = "An open-source, multicoin wallet for everyone"; const _shortDescriptionText = "An open-source, multicoin wallet for everyone";
const _commitHash = "$BUILT_COMMIT_HASH"; const _commitHash = "$BUILT_COMMIT_HASH";

View file

@ -37,6 +37,8 @@ part of 'app_config.dart';
const _prefix = "Stack"; const _prefix = "Stack";
const _separator = " "; const _separator = " ";
const _suffix = "Wallet"; const _suffix = "Wallet";
const _emptyWalletsMessage =
"You do not have any wallets yet. Start building your crypto Stack!";
const _appDataDirName = "stackwallet"; const _appDataDirName = "stackwallet";
const _shortDescriptionText = "An open-source, multicoin wallet for everyone"; const _shortDescriptionText = "An open-source, multicoin wallet for everyone";
const _commitHash = "$BUILT_COMMIT_HASH"; const _commitHash = "$BUILT_COMMIT_HASH";