From ce952294af8864718e983bc87743b100805b8731 Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 10 Mar 2024 13:08:35 +0000 Subject: [PATCH] some fixes after merge --- lib/core/address_validator.dart | 2 +- lib/core/seed_validator.dart | 4 ++-- lib/di.dart | 3 --- lib/entities/default_settings_migration.dart | 12 ------------ lib/entities/provider_types.dart | 2 ++ .../advanced_privacy_settings_view_model.dart | 1 + 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 230f0b653..95849e7c9 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -11,7 +11,7 @@ class AddressValidator extends TextValidator { : super( errorMessage: S.current.error_text_address, useAdditionalValidation: type == CryptoCurrency.btc - ? bitcoin.Address.validateAddress + ? (String txt) => validateAddress(address: txt, network: BitcoinNetwork.mainnet) : type == CryptoCurrency.zano ? ZanoUtils.validateAddress : null, diff --git a/lib/core/seed_validator.dart b/lib/core/seed_validator.dart index ea6fe8f10..f7bfd1a96 100644 --- a/lib/core/seed_validator.dart +++ b/lib/core/seed_validator.dart @@ -31,8 +31,6 @@ class SeedValidator extends Validator { return monero!.getMoneroWordList(language); case WalletType.haven: return haven!.getMoneroWordList(language); - case WalletType.zano: - return zano!.getWordList(language); case WalletType.ethereum: return ethereum!.getEthereumWordList(language); case WalletType.bitcoinCash: @@ -44,6 +42,8 @@ class SeedValidator extends Validator { return polygon!.getPolygonWordList(language); case WalletType.solana: return solana!.getSolanaWordList(language); + case WalletType.zano: + return zano!.getWordList(language); default: return []; } diff --git a/lib/di.dart b/lib/di.dart index 605a45200..1116fd412 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -795,9 +795,6 @@ Future setup({ getIt.registerFactory(() => ConnectionSyncPage(getIt.get())); - getIt.registerFactory( - () => ConnectionSyncPage(getIt.get())); - getIt.registerFactory(() => SecurityBackupPage( getIt.get(), getIt.get())); diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 174412070..5965e44ec 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -388,18 +388,6 @@ Node? getZanoDefaultNode({required Box nodes}) { ?? nodes.values.firstWhereOrNull((node) => node.type == WalletType.zano); } -Node? getZanoDefaultNode({required Box nodes}) { - return nodes.values.firstWhereOrNull( - (Node node) => node.uriRaw == zanoDefaultNodeUri) - ?? nodes.values.firstWhereOrNull((node) => node.type == WalletType.zano); -} - -Node? getZanoDefaultNode({required Box nodes}) { - return nodes.values.firstWhereOrNull( - (Node node) => node.uriRaw == zanoDefaultNodeUri) - ?? nodes.values.firstWhereOrNull((node) => node.type == WalletType.zano); -} - Node getMoneroDefaultNode({required Box nodes}) { final timeZone = DateTime.now().timeZoneOffset.inHours; var nodeUri = ''; diff --git a/lib/entities/provider_types.dart b/lib/entities/provider_types.dart index f9c2f1a82..3222a381b 100644 --- a/lib/entities/provider_types.dart +++ b/lib/entities/provider_types.dart @@ -71,6 +71,7 @@ class ProvidersHelper { return [ProviderType.askEachTime, ProviderType.onramper, ProviderType.robinhood]; case WalletType.none: case WalletType.haven: + case WalletType.zano: return []; } } @@ -102,6 +103,7 @@ class ProvidersHelper { case WalletType.banano: case WalletType.none: case WalletType.haven: + case WalletType.zano: return []; } } diff --git a/lib/view_model/advanced_privacy_settings_view_model.dart b/lib/view_model/advanced_privacy_settings_view_model.dart index b78d831a4..f24521614 100644 --- a/lib/view_model/advanced_privacy_settings_view_model.dart +++ b/lib/view_model/advanced_privacy_settings_view_model.dart @@ -43,6 +43,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store { case WalletType.haven: case WalletType.nano: case WalletType.banano: + case WalletType.zano: return false; } }