From b8c21b928756468928366a9feba3b5f5ef56efaa Mon Sep 17 00:00:00 2001 From: sneurlax Date: Fri, 6 Jan 2023 16:57:46 -0600 Subject: [PATCH] persist trusted flag across app closes --- lib/services/node_service.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/services/node_service.dart b/lib/services/node_service.dart index 5124cf7b0..2f3b8b836 100644 --- a/lib/services/node_service.dart +++ b/lib/services/node_service.dart @@ -33,11 +33,14 @@ class NodeService extends ChangeNotifier { ); } } else { - // update all fields but copy over previously set enabled state + // update all fields but copy over previously set enabled and trusted states await DB.instance.put( boxName: DB.boxNameNodeModels, key: savedNode.id, - value: defaultNode.copyWith(enabled: savedNode.enabled)); + value: defaultNode.copyWith( + enabled: savedNode.enabled, + trusted: savedNode.trusted, + )); } // check if a default node is the primary node for the crypto currency @@ -49,6 +52,7 @@ class NodeService extends ChangeNotifier { coin: coin, node: defaultNode.copyWith( enabled: primaryNode.enabled, + trusted: primaryNode.trusted, ), ); }