mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 12:54:38 +00:00
fix build errors
This commit is contained in:
parent
ac0049c183
commit
d73c377747
5 changed files with 10 additions and 8 deletions
|
@ -19,6 +19,7 @@ class WalletRestoreFromSeedForm extends StatefulWidget {
|
||||||
WalletRestoreFromSeedForm({Key? key,
|
WalletRestoreFromSeedForm({Key? key,
|
||||||
required this.displayLanguageSelector,
|
required this.displayLanguageSelector,
|
||||||
required this.displayBlockHeightSelector,
|
required this.displayBlockHeightSelector,
|
||||||
|
required this.displayPassphrase,
|
||||||
required this.type,
|
required this.type,
|
||||||
required this.displayWalletPassword,
|
required this.displayWalletPassword,
|
||||||
required this.seedSettingsViewModel,
|
required this.seedSettingsViewModel,
|
||||||
|
@ -34,6 +35,7 @@ class WalletRestoreFromSeedForm extends StatefulWidget {
|
||||||
final bool displayLanguageSelector;
|
final bool displayLanguageSelector;
|
||||||
final bool displayBlockHeightSelector;
|
final bool displayBlockHeightSelector;
|
||||||
final bool displayWalletPassword;
|
final bool displayWalletPassword;
|
||||||
|
final bool displayPassphrase;
|
||||||
final SeedSettingsViewModel seedSettingsViewModel;
|
final SeedSettingsViewModel seedSettingsViewModel;
|
||||||
final FocusNode? blockHeightFocusNode;
|
final FocusNode? blockHeightFocusNode;
|
||||||
final Function(bool)? onHeightOrDateEntered;
|
final Function(bool)? onHeightOrDateEntered;
|
||||||
|
@ -58,7 +60,8 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
|
||||||
repeatedPasswordTextEditingController = displayWalletPassword
|
repeatedPasswordTextEditingController = displayWalletPassword
|
||||||
? TextEditingController()
|
? TextEditingController()
|
||||||
: null,
|
: null,
|
||||||
seedTypeController = TextEditingController();
|
passphraseController = TextEditingController(),
|
||||||
|
seedTypeController = TextEditingController();
|
||||||
|
|
||||||
final GlobalKey<SeedWidgetState> seedWidgetStateKey;
|
final GlobalKey<SeedWidgetState> seedWidgetStateKey;
|
||||||
final GlobalKey<BlockchainHeightState> blockchainHeightKey;
|
final GlobalKey<BlockchainHeightState> blockchainHeightKey;
|
||||||
|
@ -67,6 +70,7 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
|
||||||
final TextEditingController? passwordTextEditingController;
|
final TextEditingController? passwordTextEditingController;
|
||||||
final TextEditingController? repeatedPasswordTextEditingController;
|
final TextEditingController? repeatedPasswordTextEditingController;
|
||||||
final TextEditingController seedTypeController;
|
final TextEditingController seedTypeController;
|
||||||
|
final TextEditingController passphraseController;
|
||||||
final GlobalKey<FormState> formKey;
|
final GlobalKey<FormState> formKey;
|
||||||
late ReactionDisposer moneroSeedTypeReaction;
|
late ReactionDisposer moneroSeedTypeReaction;
|
||||||
String language;
|
String language;
|
||||||
|
|
|
@ -37,6 +37,7 @@ class WalletRestorePage extends BasePage {
|
||||||
displayBlockHeightSelector:
|
displayBlockHeightSelector:
|
||||||
walletRestoreViewModel.hasBlockchainHeightLanguageSelector,
|
walletRestoreViewModel.hasBlockchainHeightLanguageSelector,
|
||||||
displayLanguageSelector: walletRestoreViewModel.hasSeedLanguageSelector,
|
displayLanguageSelector: walletRestoreViewModel.hasSeedLanguageSelector,
|
||||||
|
displayPassphrase: walletRestoreViewModel.hasPassphrase,
|
||||||
type: walletRestoreViewModel.type,
|
type: walletRestoreViewModel.type,
|
||||||
key: walletRestoreFromSeedFormKey,
|
key: walletRestoreFromSeedFormKey,
|
||||||
blockHeightFocusNode: _blockHeightFocusNode,
|
blockHeightFocusNode: _blockHeightFocusNode,
|
||||||
|
|
|
@ -109,7 +109,7 @@ abstract class WalletRestorationFromQRVMBase extends WalletCreationVM with Store
|
||||||
height: restoreWallet.height ?? 0,
|
height: restoreWallet.height ?? 0,
|
||||||
mnemonic: restoreWallet.mnemonicSeed ?? '',
|
mnemonic: restoreWallet.mnemonicSeed ?? '',
|
||||||
password: password,
|
password: password,
|
||||||
passphrase: passphrase ?? '',
|
passphrase: restoreWallet.passphrase ?? '',
|
||||||
);
|
);
|
||||||
case WalletType.bitcoin:
|
case WalletType.bitcoin:
|
||||||
case WalletType.litecoin:
|
case WalletType.litecoin:
|
||||||
|
@ -173,7 +173,7 @@ abstract class WalletRestorationFromQRVMBase extends WalletCreationVM with Store
|
||||||
height: restoreWallet.height ?? 0,
|
height: restoreWallet.height ?? 0,
|
||||||
mnemonic: restoreWallet.mnemonicSeed ?? '',
|
mnemonic: restoreWallet.mnemonicSeed ?? '',
|
||||||
password: password,
|
password: password,
|
||||||
passphrase: passphrase ?? '',
|
passphrase: restoreWallet.passphrase ?? '',
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
throw Exception('Unexpected type: ${type.toString()}');
|
throw Exception('Unexpected type: ${type.toString()}');
|
||||||
|
|
|
@ -15,8 +15,7 @@ class RestoredWallet {
|
||||||
this.txDescription,
|
this.txDescription,
|
||||||
this.recipientName,
|
this.recipientName,
|
||||||
this.height,
|
this.height,
|
||||||
this.privateKey,
|
this.privateKey});
|
||||||
this.passphrase});
|
|
||||||
|
|
||||||
final WalletRestoreMode restoreMode;
|
final WalletRestoreMode restoreMode;
|
||||||
final WalletType type;
|
final WalletType type;
|
||||||
|
@ -31,7 +30,6 @@ class RestoredWallet {
|
||||||
final String? recipientName;
|
final String? recipientName;
|
||||||
final int? height;
|
final int? height;
|
||||||
final String? privateKey;
|
final String? privateKey;
|
||||||
final String? passphrase;
|
|
||||||
|
|
||||||
factory RestoredWallet.fromKey(Map<String, dynamic> json) {
|
factory RestoredWallet.fromKey(Map<String, dynamic> json) {
|
||||||
final height = json['height'] as String?;
|
final height = json['height'] as String?;
|
||||||
|
@ -58,7 +56,6 @@ class RestoredWallet {
|
||||||
mnemonicSeed: mnemonic_seed ?? seed,
|
mnemonicSeed: mnemonic_seed ?? seed,
|
||||||
passphrase: passphrase,
|
passphrase: passphrase,
|
||||||
height: height != null ? int.parse(height) : 0,
|
height: height != null ? int.parse(height) : 0,
|
||||||
passphrase: passphrase
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
|
||||||
case WalletType.wownero:
|
case WalletType.wownero:
|
||||||
return wownero!.createWowneroNewWalletCredentials(
|
return wownero!.createWowneroNewWalletCredentials(
|
||||||
name: name,
|
name: name,
|
||||||
password: walletPassword,
|
password: walletPassword!,
|
||||||
language: options!.first as String,
|
language: options!.first as String,
|
||||||
isPolyseed: options.last as bool,
|
isPolyseed: options.last as bool,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue