mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
prep frost ui refactor
This commit is contained in:
parent
4df2a7d214
commit
292b8a03c0
14 changed files with 145 additions and 93 deletions
|
@ -16,10 +16,10 @@ import 'package:stackwallet/providers/global/wallets_provider.dart';
|
|||
import 'package:stackwallet/services/frost.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/wallets/isar/models/wallet_info.dart';
|
||||
import 'package:stackwallet/wallets/wallet/impl/bitcoin_frost_wallet.dart';
|
||||
import 'package:stackwallet/wallets/wallet/wallet.dart';
|
||||
|
@ -39,13 +39,13 @@ class ConfirmNewFrostMSWalletCreationView extends ConsumerStatefulWidget {
|
|||
const ConfirmNewFrostMSWalletCreationView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/confirmNewFrostMSWalletCreationView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<ConfirmNewFrostMSWalletCreationView> createState() =>
|
||||
|
@ -102,7 +102,8 @@ class _ConfirmNewFrostMSWalletCreationViewState
|
|||
);
|
||||
},
|
||||
),
|
||||
trailing: FrostMascot(
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: const FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
|
||||
|
@ -230,7 +231,7 @@ class _ConfirmNewFrostMSWalletCreationViewState
|
|||
);
|
||||
|
||||
final info = WalletInfo.createNew(
|
||||
coin: widget.coin,
|
||||
coin: widget.frostCurrency.coin,
|
||||
name: widget.walletName,
|
||||
);
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/share_new_multis
|
|||
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
|
||||
import 'package:stackwallet/services/frost.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -21,13 +21,13 @@ class CreateNewFrostMsWalletView extends ConsumerStatefulWidget {
|
|||
const CreateNewFrostMsWalletView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/createNewFrostMsWalletView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<CreateNewFrostMsWalletView> createState() =>
|
||||
|
@ -118,9 +118,10 @@ class _NewFrostMsWalletViewState
|
|||
condition: Util.isDesktop,
|
||||
builder: (child) => DesktopScaffold(
|
||||
background: Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: DesktopAppBar(
|
||||
appBar: const DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
leading: AppBarBackButton(),
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
|
@ -276,7 +277,7 @@ class _NewFrostMsWalletViewState
|
|||
ShareNewMultisigConfigView.routeName,
|
||||
arguments: (
|
||||
walletName: widget.walletName,
|
||||
coin: widget.coin,
|
||||
frostCurrency: widget.frostCurrency,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -11,10 +11,10 @@ import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
|
|||
import 'package:stackwallet/services/frost.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -36,13 +36,13 @@ class FrostShareCommitmentsView extends ConsumerStatefulWidget {
|
|||
const FrostShareCommitmentsView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/frostShareCommitmentsView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<FrostShareCommitmentsView> createState() =>
|
||||
|
@ -121,7 +121,8 @@ class _FrostShareCommitmentsViewState
|
|||
);
|
||||
},
|
||||
),
|
||||
trailing: FrostMascot(
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: const FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
|
||||
|
@ -397,7 +398,7 @@ class _FrostShareCommitmentsViewState
|
|||
FrostShareSharesView.routeName,
|
||||
arguments: (
|
||||
walletName: widget.walletName,
|
||||
coin: widget.coin,
|
||||
frostCurrency: widget.frostCurrency,
|
||||
),
|
||||
);
|
||||
} catch (e, s) {
|
||||
|
|
|
@ -11,10 +11,10 @@ import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
|
|||
import 'package:stackwallet/services/frost.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -36,13 +36,13 @@ class FrostShareSharesView extends ConsumerStatefulWidget {
|
|||
const FrostShareSharesView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/frostShareSharesView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<FrostShareSharesView> createState() =>
|
||||
|
@ -120,7 +120,8 @@ class _FrostShareSharesViewState extends ConsumerState<FrostShareSharesView> {
|
|||
);
|
||||
},
|
||||
),
|
||||
trailing: FrostMascot(
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: const FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
|
||||
|
@ -364,7 +365,7 @@ class _FrostShareSharesViewState extends ConsumerState<FrostShareSharesView> {
|
|||
ConfirmNewFrostMSWalletCreationView.routeName,
|
||||
arguments: (
|
||||
walletName: widget.walletName,
|
||||
coin: widget.coin,
|
||||
frostCurrency: widget.frostCurrency,
|
||||
),
|
||||
);
|
||||
} catch (e, s) {
|
||||
|
|
|
@ -7,10 +7,10 @@ import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
|
|||
import 'package:stackwallet/services/frost.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -29,13 +29,13 @@ class ImportNewFrostMsWalletView extends ConsumerStatefulWidget {
|
|||
const ImportNewFrostMsWalletView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/importNewFrostMsWalletView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<ImportNewFrostMsWalletView> createState() =>
|
||||
|
@ -73,9 +73,10 @@ class _ImportNewFrostMsWalletViewState
|
|||
condition: Util.isDesktop,
|
||||
builder: (child) => DesktopScaffold(
|
||||
background: Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: DesktopAppBar(
|
||||
appBar: const DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
leading: AppBarBackButton(),
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
|
@ -377,7 +378,7 @@ class _ImportNewFrostMsWalletViewState
|
|||
FrostShareCommitmentsView.routeName,
|
||||
arguments: (
|
||||
walletName: widget.walletName,
|
||||
coin: widget.coin,
|
||||
frostCurrency: widget.frostCurrency,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -6,9 +6,9 @@ import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_deta
|
|||
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
|
||||
import 'package:stackwallet/services/frost.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -23,13 +23,13 @@ class ShareNewMultisigConfigView extends ConsumerStatefulWidget {
|
|||
const ShareNewMultisigConfigView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/shareNewMultisigConfigView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<ShareNewMultisigConfigView> createState() =>
|
||||
|
@ -44,9 +44,10 @@ class _ShareNewMultisigConfigViewState
|
|||
condition: Util.isDesktop,
|
||||
builder: (child) => DesktopScaffold(
|
||||
background: Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: DesktopAppBar(
|
||||
appBar: const DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
leading: AppBarBackButton(),
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
|
@ -153,7 +154,7 @@ class _ShareNewMultisigConfigViewState
|
|||
FrostShareCommitmentsView.routeName,
|
||||
arguments: (
|
||||
walletName: widget.walletName,
|
||||
coin: widget.coin,
|
||||
frostCurrency: widget.frostCurrency,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -17,11 +17,11 @@ import 'package:stackwallet/services/frost.dart';
|
|||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/show_loading.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/wallets/isar/models/frost_wallet_info.dart';
|
||||
import 'package:stackwallet/wallets/isar/models/wallet_info.dart';
|
||||
import 'package:stackwallet/wallets/wallet/impl/bitcoin_frost_wallet.dart';
|
||||
|
@ -44,13 +44,13 @@ class RestoreFrostMsWalletView extends ConsumerStatefulWidget {
|
|||
const RestoreFrostMsWalletView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/restoreFrostMsWalletView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<RestoreFrostMsWalletView> createState() =>
|
||||
|
@ -75,7 +75,7 @@ class _RestoreFrostMsWalletViewState
|
|||
final myName = participants[myNameIndex];
|
||||
|
||||
final info = WalletInfo.createNew(
|
||||
coin: widget.coin,
|
||||
coin: widget.frostCurrency.coin,
|
||||
name: widget.walletName,
|
||||
);
|
||||
|
||||
|
@ -212,14 +212,16 @@ class _RestoreFrostMsWalletViewState
|
|||
condition: Util.isDesktop,
|
||||
builder: (child) => DesktopScaffold(
|
||||
background: Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
leading: AppBarBackButton(),
|
||||
trailing: FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
|
||||
)),
|
||||
appBar: const DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
leading: AppBarBackButton(),
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam est justo, ',
|
||||
),
|
||||
),
|
||||
body: SizedBox(
|
||||
width: 480,
|
||||
child: child,
|
||||
|
|
|
@ -15,12 +15,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||
import 'package:isar/isar.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/create_or_restore_wallet_view/sub_widgets/coin_image.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/create_new_frost_ms_wallet_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/import_new_frost_ms_wallet_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/select_new_frost_import_type_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/restore/restore_frost_ms_wallet_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/new_wallet_options/new_wallet_options_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/new_wallet_recovery_phrase_warning_view/new_wallet_recovery_phrase_warning_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart';
|
||||
import 'package:stackwallet/pages/settings_views/wallet_settings_view/frost_ms/resharing/new/new_import_resharer_config_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
|
||||
import 'package:stackwallet/providers/db/main_db_provider.dart';
|
||||
import 'package:stackwallet/providers/ui/verify_recovery_phrase/mnemonic_word_count_state_provider.dart';
|
||||
|
@ -31,6 +30,8 @@ import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
|||
import 'package:stackwallet/utilities/name_generator.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/coins/bitcoin_frost.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
|
||||
import 'package:stackwallet/wallets/isar/models/wallet_info.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
|
@ -243,7 +244,7 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
height: isDesktop ? 0 : 16,
|
||||
),
|
||||
Text(
|
||||
"Name your ${coin.prettyName} wallet",
|
||||
"Name your ${coin.prettyName} ${coin.isFrost ? "multisig " : ""}wallet",
|
||||
textAlign: TextAlign.center,
|
||||
style: isDesktop
|
||||
? STextStyles.desktopH2(context)
|
||||
|
@ -253,7 +254,7 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
height: isDesktop ? 16 : 8,
|
||||
),
|
||||
Text(
|
||||
"Enter a label for your wallet (e.g. Savings)",
|
||||
"Enter a label for your wallet (e.g. ${coin.isFrost ? "Multisig" : "Savings"})",
|
||||
textAlign: TextAlign.center,
|
||||
style: isDesktop
|
||||
? STextStyles.desktopSubtitleH2(context)
|
||||
|
@ -403,7 +404,7 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
Column(
|
||||
children: [
|
||||
PrimaryButton(
|
||||
label: "Create config",
|
||||
label: "Create new group",
|
||||
enabled: _nextEnabled,
|
||||
onPressed: () async {
|
||||
final name = textEditingController.text;
|
||||
|
@ -421,38 +422,56 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
|||
height: 12,
|
||||
),
|
||||
SecondaryButton(
|
||||
label: "Import multisig config",
|
||||
label: "Join group",
|
||||
enabled: _nextEnabled,
|
||||
onPressed: () async {
|
||||
final name = textEditingController.text;
|
||||
|
||||
await Navigator.of(context).pushNamed(
|
||||
ImportNewFrostMsWalletView.routeName,
|
||||
SelectNewFrostImportTypeView.routeName,
|
||||
arguments: (
|
||||
walletName: name,
|
||||
coin: coin,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
SecondaryButton(
|
||||
label: "Import resharer config",
|
||||
enabled: _nextEnabled,
|
||||
onPressed: () async {
|
||||
final name = textEditingController.text;
|
||||
|
||||
await Navigator.of(context).pushNamed(
|
||||
NewImportResharerConfigView.routeName,
|
||||
arguments: (
|
||||
walletName: name,
|
||||
coin: coin,
|
||||
// TODO: [prio=med] this will cause issues if frost is ever applied to other coins
|
||||
frostCurrency: coin.isTestNet
|
||||
? BitcoinFrost(CryptoCurrencyNetwork.test)
|
||||
: BitcoinFrost(CryptoCurrencyNetwork.main),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
// SecondaryButton(
|
||||
// label: "Import multisig config",
|
||||
// enabled: _nextEnabled,
|
||||
// onPressed: () async {
|
||||
// final name = textEditingController.text;
|
||||
//
|
||||
// await Navigator.of(context).pushNamed(
|
||||
// ImportNewFrostMsWalletView.routeName,
|
||||
// arguments: (
|
||||
// walletName: name,
|
||||
// coin: coin,
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// height: 12,
|
||||
// ),
|
||||
// SecondaryButton(
|
||||
// label: "Import resharer config",
|
||||
// enabled: _nextEnabled,
|
||||
// onPressed: () async {
|
||||
// final name = textEditingController.text;
|
||||
//
|
||||
// await Navigator.of(context).pushNamed(
|
||||
// NewImportResharerConfigView.routeName,
|
||||
// arguments: (
|
||||
// walletName: name,
|
||||
// coin: coin,
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
),
|
||||
if (!widget.coin.isFrost)
|
||||
|
|
|
@ -6,11 +6,11 @@ import 'package:stackwallet/pages/settings_views/wallet_settings_view/frost_ms/r
|
|||
import 'package:stackwallet/providers/frost_wallet/frost_wallet_providers.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/show_loading.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/wallets/isar/models/wallet_info.dart';
|
||||
import 'package:stackwallet/wallets/models/incomplete_frost_wallet.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
|
@ -31,13 +31,13 @@ class NewImportResharerConfigView extends ConsumerStatefulWidget {
|
|||
const NewImportResharerConfigView({
|
||||
super.key,
|
||||
required this.walletName,
|
||||
required this.coin,
|
||||
required this.frostCurrency,
|
||||
});
|
||||
|
||||
static const String routeName = "/newImportResharerConfigView";
|
||||
|
||||
final String walletName;
|
||||
final Coin coin;
|
||||
final FrostCurrency frostCurrency;
|
||||
|
||||
@override
|
||||
ConsumerState<NewImportResharerConfigView> createState() =>
|
||||
|
@ -56,7 +56,7 @@ class _NewImportResharerConfigViewState
|
|||
Future<IncompleteFrostWallet> _createWallet() async {
|
||||
final info = WalletInfo.createNew(
|
||||
name: widget.walletName,
|
||||
coin: widget.coin,
|
||||
coin: widget.frostCurrency.coin,
|
||||
);
|
||||
|
||||
final wallet = IncompleteFrostWallet();
|
||||
|
@ -89,9 +89,10 @@ class _NewImportResharerConfigViewState
|
|||
condition: Util.isDesktop,
|
||||
builder: (child) => DesktopScaffold(
|
||||
background: Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: DesktopAppBar(
|
||||
appBar: const DesktopAppBar(
|
||||
isCompactHeight: false,
|
||||
leading: AppBarBackButton(),
|
||||
// TODO: [prio=high] get rid of placeholder text??
|
||||
trailing: FrostMascot(
|
||||
title: 'Lorem ipsum',
|
||||
body:
|
||||
|
@ -395,7 +396,7 @@ class _NewImportResharerConfigViewState
|
|||
throw ex!;
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
if (context.mounted) {
|
||||
ref.read(pFrostResharingData).incompleteWallet = wallet!;
|
||||
await Navigator.of(context).pushNamed(
|
||||
NewStartResharingView.routeName,
|
||||
|
@ -408,7 +409,7 @@ class _NewImportResharerConfigViewState
|
|||
level: LogLevel.Fatal,
|
||||
);
|
||||
|
||||
if (mounted) {
|
||||
if (context.mounted) {
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
builder: (_) => StackOkDialog(
|
||||
|
|
|
@ -31,6 +31,7 @@ import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/create_new_frost
|
|||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_commitments_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/frost_share_shares_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/import_new_frost_ms_wallet_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/select_new_frost_import_type_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/new/share_new_multisig_config_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/frost_ms/restore/restore_frost_ms_wallet_view.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/name_your_wallet_view/name_your_wallet_view.dart';
|
||||
|
@ -205,6 +206,7 @@ import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_
|
|||
import 'package:stackwallet/utilities/amount/amount.dart';
|
||||
import 'package:stackwallet/utilities/enums/add_wallet_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/wallets/models/tx_data.dart';
|
||||
import 'package:stackwallet/wallets/wallet/wallet.dart';
|
||||
import 'package:stackwallet/widgets/choose_coin_view.dart';
|
||||
|
@ -450,13 +452,13 @@ class RouteGenerator {
|
|||
case CreateNewFrostMsWalletView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => CreateNewFrostMsWalletView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -468,13 +470,13 @@ class RouteGenerator {
|
|||
case RestoreFrostMsWalletView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => RestoreFrostMsWalletView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -486,13 +488,13 @@ class RouteGenerator {
|
|||
case ShareNewMultisigConfigView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => ShareNewMultisigConfigView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -504,13 +506,13 @@ class RouteGenerator {
|
|||
case ImportNewFrostMsWalletView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => ImportNewFrostMsWalletView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -522,13 +524,13 @@ class RouteGenerator {
|
|||
case NewImportResharerConfigView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => NewImportResharerConfigView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -568,13 +570,13 @@ class RouteGenerator {
|
|||
case FrostShareCommitmentsView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => FrostShareCommitmentsView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -586,13 +588,13 @@ class RouteGenerator {
|
|||
case FrostShareSharesView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => FrostShareSharesView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
@ -604,13 +606,13 @@ class RouteGenerator {
|
|||
case ConfirmNewFrostMSWalletCreationView.routeName:
|
||||
if (args is ({
|
||||
String walletName,
|
||||
Coin coin,
|
||||
FrostCurrency frostCurrency,
|
||||
})) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => ConfirmNewFrostMSWalletCreationView(
|
||||
walletName: args.walletName,
|
||||
coin: args.coin,
|
||||
frostCurrency: args.frostCurrency,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
|
|
|
@ -383,6 +383,28 @@ class STextStyles {
|
|||
}
|
||||
}
|
||||
|
||||
static TextStyle w400_16(BuildContext context) {
|
||||
switch (_theme(context).themeId) {
|
||||
default:
|
||||
return GoogleFonts.inter(
|
||||
color: _theme(context).textDark,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 16,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static TextStyle w400_14(BuildContext context) {
|
||||
switch (_theme(context).themeId) {
|
||||
default:
|
||||
return GoogleFonts.inter(
|
||||
color: _theme(context).textDark,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 14,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static TextStyle w600_20(BuildContext context) {
|
||||
switch (_theme(context).themeId) {
|
||||
default:
|
||||
|
|
|
@ -6,7 +6,7 @@ import 'package:stackwallet/utilities/default_nodes.dart';
|
|||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/bip39_hd_currency.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/private_key_currency.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
|
||||
class BitcoinFrost extends FrostCurrency {
|
||||
BitcoinFrost(super.network) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import 'package:stackwallet/utilities/extensions/extensions.dart';
|
|||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/coins/bitcoin_frost.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/private_key_currency.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/frost_currency.dart';
|
||||
import 'package:stackwallet/wallets/isar/models/frost_wallet_info.dart';
|
||||
import 'package:stackwallet/wallets/models/tx_data.dart';
|
||||
import 'package:stackwallet/wallets/wallet/wallet.dart';
|
||||
|
|
Loading…
Reference in a new issue