mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-20 06:08:34 +02:00
V4.26.0 rc (#2198)
* v4.26.0 Release Candidate * Fix Wownero Creation issue * Add KES fiat currency * Adjust backup to default node selection if null Gracefully handle Decred failure Minor fixes
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
||||
import 'package:cake_wallet/core/utilities.dart';
|
||||
import 'package:cake_wallet/decred/decred.dart';
|
||||
import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart';
|
||||
import 'package:cake_wallet/core/secure_storage.dart';
|
||||
@@ -12,13 +13,13 @@ import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
|
||||
import 'package:cake_wallet/entities/balance_display_mode.dart';
|
||||
import 'package:cake_wallet/entities/cake_2fa_preset_options.dart';
|
||||
import 'package:cake_wallet/entities/country.dart';
|
||||
import 'package:cake_wallet/entities/default_settings_migration.dart';
|
||||
import 'package:cake_wallet/entities/exchange_api_mode.dart';
|
||||
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||
import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||
import 'package:cake_wallet/entities/language_service.dart';
|
||||
import 'package:cake_wallet/entities/pin_code_required_duration.dart';
|
||||
import 'package:cake_wallet/entities/preferences_key.dart';
|
||||
import 'package:cake_wallet/entities/provider_types.dart';
|
||||
import 'package:cake_wallet/entities/secret_store_key.dart';
|
||||
import 'package:cake_wallet/entities/seed_phrase_length.dart';
|
||||
import 'package:cake_wallet/entities/seed_type.dart';
|
||||
@@ -37,11 +38,8 @@ import 'package:cake_wallet/themes/theme_list.dart';
|
||||
import 'package:cake_wallet/utils/device_info.dart';
|
||||
import 'package:cake_wallet/utils/package_info.dart';
|
||||
import 'package:cake_wallet/view_model/settings/sync_mode.dart';
|
||||
import 'package:cake_wallet/wallet_type_utils.dart';
|
||||
import 'package:cake_wallet/wownero/wownero.dart';
|
||||
import 'package:cw_core/node.dart';
|
||||
import 'package:cw_core/set_app_secure_native.dart';
|
||||
import 'package:cw_core/transaction_priority.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
@@ -312,7 +310,7 @@ abstract class SettingsStoreBase with Store {
|
||||
|
||||
reaction((_) => disableTradeOption,
|
||||
(bool disableTradeOption) => sharedPreferences.setBool(PreferencesKey.disableTradeOption, disableTradeOption));
|
||||
|
||||
|
||||
reaction(
|
||||
(_) => disableBulletin,
|
||||
(bool disableBulletin) =>
|
||||
@@ -1038,7 +1036,6 @@ abstract class SettingsStoreBase with Store {
|
||||
sharedPreferences.getInt(PreferencesKey.currentLitecoinElectrumSererIdKey);
|
||||
final bitcoinCashElectrumServerId =
|
||||
sharedPreferences.getInt(PreferencesKey.currentBitcoinCashNodeIdKey);
|
||||
final havenNodeId = sharedPreferences.getInt(PreferencesKey.currentHavenNodeIdKey);
|
||||
final ethereumNodeId = sharedPreferences.getInt(PreferencesKey.currentEthereumNodeIdKey);
|
||||
final polygonNodeId = sharedPreferences.getInt(PreferencesKey.currentPolygonNodeIdKey);
|
||||
final nanoNodeId = sharedPreferences.getInt(PreferencesKey.currentNanoNodeIdKey);
|
||||
@@ -1048,20 +1045,35 @@ abstract class SettingsStoreBase with Store {
|
||||
final wowneroNodeId = sharedPreferences.getInt(PreferencesKey.currentWowneroNodeIdKey);
|
||||
final zanoNodeId = sharedPreferences.getInt(PreferencesKey.currentZanoNodeIdKey);
|
||||
final decredNodeId = sharedPreferences.getInt(PreferencesKey.currentDecredNodeIdKey);
|
||||
final moneroNode = nodeSource.get(nodeId);
|
||||
final bitcoinElectrumServer = nodeSource.get(bitcoinElectrumServerId);
|
||||
final litecoinElectrumServer = nodeSource.get(litecoinElectrumServerId);
|
||||
final havenNode = nodeSource.get(havenNodeId);
|
||||
final ethereumNode = nodeSource.get(ethereumNodeId);
|
||||
final polygonNode = nodeSource.get(polygonNodeId);
|
||||
final bitcoinCashElectrumServer = nodeSource.get(bitcoinCashElectrumServerId);
|
||||
final nanoNode = nodeSource.get(nanoNodeId);
|
||||
final decredNode = nodeSource.get(decredNodeId);
|
||||
final nanoPowNode = powNodeSource.get(nanoPowNodeId);
|
||||
final solanaNode = nodeSource.get(solanaNodeId);
|
||||
final tronNode = nodeSource.get(tronNodeId);
|
||||
final wowneroNode = nodeSource.get(wowneroNodeId);
|
||||
final zanoNode = nodeSource.get(zanoNodeId);
|
||||
|
||||
/// get the selected node, if null, then use the default
|
||||
final moneroNode = nodeSource.get(nodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == newCakeWalletMoneroUri);
|
||||
final bitcoinElectrumServer = nodeSource.get(bitcoinElectrumServerId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == newCakeWalletBitcoinUri);
|
||||
final litecoinElectrumServer = nodeSource.get(litecoinElectrumServerId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == cakeWalletLitecoinElectrumUri);
|
||||
final ethereumNode = nodeSource.get(ethereumNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == ethereumDefaultNodeUri);
|
||||
final polygonNode = nodeSource.get(polygonNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == polygonDefaultNodeUri);
|
||||
final bitcoinCashElectrumServer = nodeSource.get(bitcoinCashElectrumServerId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == cakeWalletBitcoinCashDefaultNodeUri);
|
||||
final nanoNode = nodeSource.get(nanoNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == nanoDefaultNodeUri);
|
||||
final decredNode = nodeSource.get(decredNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == decredDefaultUri);
|
||||
final nanoPowNode = powNodeSource.get(nanoPowNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == nanoDefaultPowNodeUri);
|
||||
final solanaNode = nodeSource.get(solanaNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == solanaDefaultNodeUri);
|
||||
final tronNode = nodeSource.get(tronNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == tronDefaultNodeUri);
|
||||
final wowneroNode = nodeSource.get(wowneroNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == wowneroDefaultNodeUri);
|
||||
final zanoNode = nodeSource.get(zanoNodeId) ??
|
||||
nodeSource.values.firstWhereOrNull((e) => e.uriRaw == zanoDefaultNodeUri);
|
||||
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
final deviceName = await _getDeviceName() ?? '';
|
||||
final shouldShowYatPopup = sharedPreferences.getBool(PreferencesKey.shouldShowYatPopup) ?? true;
|
||||
@@ -1107,10 +1119,6 @@ abstract class SettingsStoreBase with Store {
|
||||
nodes[WalletType.litecoin] = litecoinElectrumServer;
|
||||
}
|
||||
|
||||
if (havenNode != null) {
|
||||
nodes[WalletType.haven] = havenNode;
|
||||
}
|
||||
|
||||
if (ethereumNode != null) {
|
||||
nodes[WalletType.ethereum] = ethereumNode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user