Disable ETA by default, use electrs node as a fallback not hardcoded
OmarHatem committed
Jan 26, 2026 at 20:03 UTC
1067157c367cb8d41139880d5c54b7e7437427b4
4 files changed
+9
-5
cw_bitcoin/lib/electrum.dart
+1
-1
@@ -40,7 +40,7 @@ class ElectrumClient {
40
unterminatedString = '';
41
42
static const connectionTimeout = Duration(seconds: 5);
43
- static const aliveTimerDuration = Duration(seconds: 4);
43
+ static const aliveTimerDuration = Duration(seconds: 5);
44
45
bool get isConnected => socket != null && socket?.isClosed == false;
46
ProxySocket? socket;
cw_bitcoin/lib/electrum_wallet.dart
+1
-1
@@ -3013,7 +3013,7 @@ Future<void> _handleScanSilentPayments(ScanData scanData) async {
3013
final hasForcedRescanHeights = !shouldUpdateSyncStatus;
3014
CakeTor.instance = await CakeTorInstance.getInstance();
3015
3016
- var node = Uri.parse("tcp://electrs.cakewallet.com:50001");
3016
+ var node = scanData.node?.uri ?? Uri.parse("tcp://electrs.cakewallet.com:50001");
3017
3018
void log(String message, LogLevel level) {
3019
printV("[Scanning] $message", file: scanData.debugLogPath, level: level);
lib/entities/default_settings_migration.dart
+6
-2
@@ -5,8 +5,8 @@ import 'package:cake_wallet/core/secure_storage.dart';
5
import 'package:cake_wallet/entities/exchange_api_mode.dart';
6
import 'package:cake_wallet/entities/fiat_api_mode.dart';
7
import 'package:cake_wallet/entities/haven_seed_store.dart';
8
+import 'package:cake_wallet/entities/sync_status_display_mode.dart';
9
import 'package:cake_wallet/wownero/wownero.dart';
9
-import 'package:cw_core/cake_hive.dart';
10
import 'package:cw_core/pathForWallet.dart';
11
import 'package:cake_wallet/entities/secret_store_key.dart';
12
import 'package:cw_core/root_dir.dart';
@@ -23,7 +23,6 @@ import 'package:cake_wallet/monero/monero.dart';
23
import 'package:cake_wallet/entities/contact.dart';
24
import 'package:cake_wallet/entities/fs_migration.dart';
25
import 'package:cw_core/wallet_info.dart';
26
-import 'package:cw_core/wallet_info_legacy.dart' as wiLegacy;
26
import 'package:cake_wallet/exchange/trade.dart';
27
import 'package:encrypt/encrypt.dart' as encrypt;
28
import 'package:collection/collection.dart';
@@ -568,6 +567,11 @@ Future<void> defaultSettingsMigration(
567
type: WalletType.zcash,
568
currentNodePreferenceKey: PreferencesKey.currentZcashNodeIdKey,
569
);
570
+ break;
571
+ case 56:
572
+ await sharedPreferences.setString(
573
+ PreferencesKey.syncStatusDisplayMode, SyncStatusDisplayMode.blocksRemaining.name);
574
+ break;
575
default:
576
break;
577
}
lib/main.dart
+1
-1
@@ -313,7 +313,7 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
313
payjoinSessionSource: payjoinSessionSource,
314
anonpayInvoiceInfo: anonpayInvoiceInfo,
315
havenSeedStore: havenSeedStore,
316
- initialMigrationVersion: 55,
316
+ initialMigrationVersion: 56,
317
);
318
}
319