From 6c9f9a4d19025c432643610e6da3d9ce424ebc87 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Mon, 12 Dec 2022 19:30:48 +0100 Subject: [PATCH 1/2] [skip ci] fix issue with nullable field in Node adapter --- cw_core/lib/node.dart | 2 +- cw_haven/lib/haven_wallet.dart | 2 +- cw_monero/lib/monero_wallet.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index ff1d6b051..325650224 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -54,7 +54,7 @@ class Node extends HiveObject with Keyable { bool? useSSL; @HiveField(5) - bool trusted; + bool? trusted; bool get isSSL => useSSL ?? false; diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index a4b949d8f..237722cbc 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -122,7 +122,7 @@ abstract class HavenWalletBase extends WalletBase Date: Mon, 12 Dec 2022 20:34:45 +0100 Subject: [PATCH 2/2] set default value to nullable field --- cw_core/lib/node.dart | 4 ++-- cw_haven/lib/haven_wallet.dart | 2 +- cw_monero/lib/monero_wallet.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index 325650224..1322c5b78 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -53,8 +53,8 @@ class Node extends HiveObject with Keyable { @HiveField(4) bool? useSSL; - @HiveField(5) - bool? trusted; + @HiveField(5, defaultValue: false) + bool trusted; bool get isSSL => useSSL ?? false; diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index 237722cbc..a4b949d8f 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -122,7 +122,7 @@ abstract class HavenWalletBase extends WalletBase