feat: zano hf + bip39 (#3359)

* feat: bip39 zano hf

* fix: correct monero_c hash

* lockfile [skip ci]

* fix: zano: proper bip32
fix: zano respect 24 word setting
fix: rename / delete

* fix: nonBip39WalletTypes

* fix: zano wallet rename

* fix: passphrase store zano

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
cyan
2026-08-28 15:49:51 +08:00
committed by GitHub
co-authored by Omar Hatem
parent 14167a85e8
commit 905db64f77
27 changed files with 1074 additions and 106 deletions
@@ -59,6 +59,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
case WalletType.solana:
case WalletType.tron:
case WalletType.zcash:
case WalletType.zano:
case WalletType.decred:
return true;
@@ -74,7 +75,6 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
case WalletType.wownero:
case WalletType.none:
case WalletType.haven:
case WalletType.zano:
return false;
}
}
@@ -128,8 +128,9 @@ abstract class WalletGroupsDisplayViewModelBase with Store {
bool isNonSeedWallet = wallet.isNonSeedWallet;
bool isNotMoneroBip39Wallet =
wallet.type == WalletType.monero && di.derivationType != DerivationType.bip39;
bool isNotBip39CoinWallet =
(wallet.type == WalletType.monero || wallet.type == WalletType.zano) &&
di.derivationType != DerivationType.bip39;
bool isNotDecredBip39Wallet = wallet.type == WalletType.decred &&
di.derivationType != DerivationType.bip39 &&
@@ -142,7 +143,7 @@ abstract class WalletGroupsDisplayViewModelBase with Store {
isElectrumDerivationType ||
isSameTypeAsSelectedWallet ||
isNonSeedWallet ||
isNotMoneroBip39Wallet ||
isNotBip39CoinWallet ||
isNotDecredBip39Wallet;
}
+1
View File
@@ -139,6 +139,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
name: name,
password: walletPassword,
passphrase: passphrase,
mnemonic: newWalletArguments!.mnemonic,
);
case WalletType.zcash:
return zcash!.createZcashNewWalletCredentials(
+21 -3
View File
@@ -83,8 +83,13 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
late final bool hasSeedLanguageSelector =
[WalletType.monero, WalletType.haven, WalletType.wownero].contains(type);
late final bool hasBlockchainHeightSelector =
[WalletType.monero, WalletType.haven, WalletType.wownero, WalletType.zcash].contains(type);
late final bool hasBlockchainHeightSelector = [
WalletType.monero,
WalletType.haven,
WalletType.wownero,
WalletType.zcash,
WalletType.zano,
].contains(type);
late final bool hasRestoreFromPrivateKey = [
WalletType.ethereum,
@@ -204,13 +209,15 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
height: height,
);
case WalletType.zano:
return zano!.createZanoRestoreWalletFromSeedCredentials(
final credentials = zano!.createZanoRestoreWalletFromSeedCredentials(
name: name,
password: password,
height: height,
passphrase: passphrase ?? '',
mnemonic: seed,
);
credentials.derivationInfo = derivationInfo;
return credentials;
case WalletType.decred:
return decred!.createDecredRestoreWalletFromSeedCredentials(
name: name,
@@ -363,6 +370,17 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
seedKey: seedKey,
node: node,
);
case WalletType.zano:
final mnemonic = (credentials['seed'] as String?)?.trim() ?? '';
if (mnemonic.isEmpty) break;
if (zano!.isBip39Seed(mnemonic)) {
return [
DerivationInfo(derivationType: DerivationType.bip39),
];
}
return [
DerivationInfo(derivationType: DerivationType.unknown),
];
default:
break;
}