mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
persist trusted flag across app closes
This commit is contained in:
parent
554d526ea4
commit
b8c21b9287
1 changed files with 6 additions and 2 deletions
|
@ -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<NodeModel>(
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue