[skip ci] fix issue with nullable field in Node adapter

Godwin Asuquo committed Dec 12, 2022 at 19:30 UTC 6c9f9a4d19025c432643610e6da3d9ce424ebc87
3 files changed +3 -3
cw_core/lib/node.dart
+1 -1
@@ -54,7 +54,7 @@ class Node extends HiveObject with Keyable {
54 bool? useSSL;
55
56 @HiveField(5)
57 - bool trusted;
57 + bool? trusted;
58
59 bool get isSSL => useSSL ?? false;
60
cw_haven/lib/haven_wallet.dart
+1 -1
@@ -122,7 +122,7 @@ abstract class HavenWalletBase extends WalletBase<MoneroBalance,
122 useSSL: node.useSSL ?? false,
123 isLightWallet: false); // FIXME: hardcoded value
124
125 - haven_wallet.setTrustedDaemon(node.trusted);
125 + haven_wallet.setTrustedDaemon(node.trusted ?? false);
126 syncStatus = ConnectedSyncStatus();
127 } catch (e) {
128 syncStatus = FailedSyncStatus();
cw_monero/lib/monero_wallet.dart
+1 -1
@@ -137,7 +137,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
137 useSSL: node.isSSL,
138 isLightWallet: false); // FIXME: hardcoded value
139
140 - monero_wallet.setTrustedDaemon(node.trusted);
140 + monero_wallet.setTrustedDaemon(node.trusted ?? false);
141 syncStatus = ConnectedSyncStatus();
142 } catch (e) {
143 syncStatus = FailedSyncStatus();