fix: allow spending with LAN-only node (#3529)
cyan committed
Aug 17, 2026 at 14:09 UTC
026a171c66768eb1fc211f6c47d60d80a46f3394
1 file changed
+12
-8
lib/reactions/check_connection.dart
+12
-8
@@ -28,20 +28,24 @@ void startCheckConnectionReaction(WalletBase wallet, SettingsStore settingsStore
28
try {
29
final connectivityResult = await (Connectivity().checkConnectivity());
30
31
+ int? chainId;
32
+ if (isEVMCompatibleChain(wallet.type)) {
33
+ chainId = evm!.getSelectedChainId(wallet);
34
+ }
35
+
36
+ final node = settingsStore.getCurrentNode(wallet.type, chainId: chainId);
37
+
38
if (connectivityResult.contains(ConnectivityResult.none)) {
32
- wallet.syncStatus = FailedSyncStatus();
33
- return;
39
+ // Still try node even when OS says no network - it might be a LAN node.
40
+ if (!await node.requestNode()) {
41
+ wallet.syncStatus = FailedSyncStatus();
42
+ return;
43
+ }
44
}
45
46
if (wallet.type != WalletType.bitcoin &&
47
(wallet.syncStatus is LostConnectionSyncStatus ||
48
wallet.syncStatus is FailedSyncStatus)) {
39
- int? chainId;
40
- if (isEVMCompatibleChain(wallet.type)) {
41
- chainId = evm!.getSelectedChainId(wallet);
42
- }
43
-
44
- final node = settingsStore.getCurrentNode(wallet.type, chainId: chainId);
49
final alive = await node.requestNode();
50
51
if (alive) {