mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
CW-711 passphrase for XMR/WOWcreation (#1992)
* add monero passphrase add wownero passphrase add passphrase to seed screen * obscure passphrase by default disable passphrase create for zano * Update lib/view_model/wallet_keys_view_model.dart [skip ci] * Update lib/src/screens/wallet_keys/wallet_keys_page.dart [skip ci] * Update lib/view_model/advanced_privacy_settings_view_model.dart * dynamic passphrase icon * fix polyseed not being encrypted by passphrase --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -78,8 +78,8 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
|
||||
WalletType.ethereum,
|
||||
WalletType.polygon,
|
||||
WalletType.tron,
|
||||
if (isRestore) WalletType.monero,
|
||||
if (isRestore) WalletType.wownero,
|
||||
WalletType.monero,
|
||||
WalletType.wownero,
|
||||
if (isRestore) WalletType.zano,
|
||||
].contains(type);
|
||||
|
||||
|
||||
@@ -86,9 +86,21 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
if (_wallet.type == WalletType.monero) {
|
||||
return monero!.getRestoreHeight(_wallet)?.toString() ?? '';
|
||||
}
|
||||
if (_wallet.type == WalletType.wownero) {
|
||||
return wownero!.getRestoreHeight(_wallet)?.toString() ?? '';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@observable
|
||||
bool obscurePassphrase = true;
|
||||
|
||||
String get passphrase {
|
||||
return _wallet.passphrase ?? '';
|
||||
}
|
||||
|
||||
/// The Regex split the words based on any whitespace character.
|
||||
///
|
||||
/// Either standard ASCII space (U+0020) or the full-width space character (U+3000) used by the Japanese.
|
||||
@@ -309,6 +321,12 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
}
|
||||
|
||||
Future<String?> get restoreHeight async {
|
||||
if (_wallet.type == WalletType.monero) {
|
||||
return monero!.getRestoreHeight(_wallet)?.toString();
|
||||
}
|
||||
if (_wallet.type == WalletType.wownero) {
|
||||
return wownero!.getRestoreHeight(_wallet)?.toString();
|
||||
}
|
||||
if (_restoreHeightByTransactions != 0)
|
||||
return getRoundedRestoreHeight(_restoreHeightByTransactions);
|
||||
if (_restoreHeight != 0) return _restoreHeight.toString();
|
||||
|
||||
@@ -100,6 +100,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
|
||||
name: name,
|
||||
language: options!.first as String,
|
||||
password: walletPassword,
|
||||
passphrase: passphrase,
|
||||
isPolyseed: options.last as bool);
|
||||
case WalletType.bitcoin:
|
||||
case WalletType.litecoin:
|
||||
@@ -168,6 +169,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
|
||||
language: options!.first as String,
|
||||
isPolyseed: options.last as bool,
|
||||
password: walletPassword,
|
||||
passphrase: passphrase,
|
||||
);
|
||||
case WalletType.zano:
|
||||
return zano!.createZanoNewWalletCredentials(
|
||||
|
||||
Reference in New Issue
Block a user