CW-934 Implement passphrase creation for zano (#2026)

* CW-934 Implement passphrase creation for zano

* Update monero_c dependency to latest commit
Fix issue with zano keys not showing during sync
Fix delays when invoking read only commands in zano
Fix extra padding above passphrase
Reduced lag during app use
This commit is contained in:
cyan 2025-02-18 23:28:27 +01:00 committed by GitHub
parent 9d6f985a59
commit dd8ccee1ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 143 additions and 41 deletions

View file

@ -202,7 +202,7 @@ class _AdvancedPrivacySettingsBodyState extends State<_AdvancedPrivacySettingsBo
);
return Container();
}),
if (widget.privacySettingsViewModel.hasPassphraseOption(widget.isFromRestore))
if (widget.privacySettingsViewModel.hasPassphraseOption)
Padding(
padding: EdgeInsets.all(24),
child: Form(

View file

@ -160,8 +160,11 @@ class _WalletKeysPageBodyState extends State<WalletKeysPageBody>
Widget _buildSeedTab(BuildContext context, bool isLegacySeed) {
return Column(
children: [
if (isLegacySeedOnly || isLegacySeed) _buildHeightBox(),
const SizedBox(height: 20),
if (isLegacySeedOnly || isLegacySeed)
...[
_buildHeightBox(),
const SizedBox(height: 20),
],
(_buildPassphraseBox() ?? Container()),
if (widget.walletKeysViewModel.passphrase.isNotEmpty) const SizedBox(height: 20),
Expanded(

View file

@ -71,7 +71,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
bool get isNanoSeedTypeOptionsEnabled => [WalletType.nano].contains(type);
bool hasPassphraseOption(bool isRestore) => [
bool get hasPassphraseOption => [
WalletType.bitcoin,
WalletType.litecoin,
WalletType.bitcoinCash,
@ -80,7 +80,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
WalletType.tron,
WalletType.monero,
WalletType.wownero,
if (isRestore) WalletType.zano,
WalletType.zano,
].contains(type);
@computed

View file

@ -175,6 +175,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
return zano!.createZanoNewWalletCredentials(
name: name,
password: walletPassword,
passphrase: passphrase,
);
case WalletType.none:
throw Exception('Unexpected type: ${type.toString()}');

View file

@ -53,8 +53,8 @@ class CWZano extends Zano {
}
@override
WalletCredentials createZanoNewWalletCredentials({required String name, required String? password}) {
return ZanoNewWalletCredentials(name: name, password: password);
WalletCredentials createZanoNewWalletCredentials({required String name, required String? password, required String? passphrase}) {
return ZanoNewWalletCredentials(name: name, password: password, passphrase: passphrase);
}
@override