fix build errors

This commit is contained in:
Czarek Nakamoto 2024-10-14 16:14:19 +02:00
parent ac0049c183
commit d73c377747
5 changed files with 10 additions and 8 deletions

View file

@ -19,6 +19,7 @@ class WalletRestoreFromSeedForm extends StatefulWidget {
WalletRestoreFromSeedForm({Key? key,
required this.displayLanguageSelector,
required this.displayBlockHeightSelector,
required this.displayPassphrase,
required this.type,
required this.displayWalletPassword,
required this.seedSettingsViewModel,
@ -34,6 +35,7 @@ class WalletRestoreFromSeedForm extends StatefulWidget {
final bool displayLanguageSelector;
final bool displayBlockHeightSelector;
final bool displayWalletPassword;
final bool displayPassphrase;
final SeedSettingsViewModel seedSettingsViewModel;
final FocusNode? blockHeightFocusNode;
final Function(bool)? onHeightOrDateEntered;
@ -58,7 +60,8 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
repeatedPasswordTextEditingController = displayWalletPassword
? TextEditingController()
: null,
seedTypeController = TextEditingController();
passphraseController = TextEditingController(),
seedTypeController = TextEditingController();
final GlobalKey<SeedWidgetState> seedWidgetStateKey;
final GlobalKey<BlockchainHeightState> blockchainHeightKey;
@ -67,6 +70,7 @@ class WalletRestoreFromSeedFormState extends State<WalletRestoreFromSeedForm> {
final TextEditingController? passwordTextEditingController;
final TextEditingController? repeatedPasswordTextEditingController;
final TextEditingController seedTypeController;
final TextEditingController passphraseController;
final GlobalKey<FormState> formKey;
late ReactionDisposer moneroSeedTypeReaction;
String language;

View file

@ -37,6 +37,7 @@ class WalletRestorePage extends BasePage {
displayBlockHeightSelector:
walletRestoreViewModel.hasBlockchainHeightLanguageSelector,
displayLanguageSelector: walletRestoreViewModel.hasSeedLanguageSelector,
displayPassphrase: walletRestoreViewModel.hasPassphrase,
type: walletRestoreViewModel.type,
key: walletRestoreFromSeedFormKey,
blockHeightFocusNode: _blockHeightFocusNode,

View file

@ -109,7 +109,7 @@ abstract class WalletRestorationFromQRVMBase extends WalletCreationVM with Store
height: restoreWallet.height ?? 0,
mnemonic: restoreWallet.mnemonicSeed ?? '',
password: password,
passphrase: passphrase ?? '',
passphrase: restoreWallet.passphrase ?? '',
);
case WalletType.bitcoin:
case WalletType.litecoin:
@ -173,7 +173,7 @@ abstract class WalletRestorationFromQRVMBase extends WalletCreationVM with Store
height: restoreWallet.height ?? 0,
mnemonic: restoreWallet.mnemonicSeed ?? '',
password: password,
passphrase: passphrase ?? '',
passphrase: restoreWallet.passphrase ?? '',
);
default:
throw Exception('Unexpected type: ${type.toString()}');

View file

@ -15,8 +15,7 @@ class RestoredWallet {
this.txDescription,
this.recipientName,
this.height,
this.privateKey,
this.passphrase});
this.privateKey});
final WalletRestoreMode restoreMode;
final WalletType type;
@ -31,7 +30,6 @@ class RestoredWallet {
final String? recipientName;
final int? height;
final String? privateKey;
final String? passphrase;
factory RestoredWallet.fromKey(Map<String, dynamic> json) {
final height = json['height'] as String?;
@ -58,7 +56,6 @@ class RestoredWallet {
mnemonicSeed: mnemonic_seed ?? seed,
passphrase: passphrase,
height: height != null ? int.parse(height) : 0,
passphrase: passphrase
);
}

View file

@ -152,7 +152,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
case WalletType.wownero:
return wownero!.createWowneroNewWalletCredentials(
name: name,
password: walletPassword,
password: walletPassword!,
language: options!.first as String,
isPolyseed: options.last as bool,
);