Merge pull request #529 from cake-tech/CW-182-allow-trusted-nodes

Cw 182 allow trusted nodes
This commit is contained in:
Omar Hatem
2022-12-04 02:17:35 +02:00
committed by GitHub
29 changed files with 123 additions and 17 deletions
@@ -18,7 +18,8 @@ abstract class NodeCreateOrEditViewModelBase with Store {
address = '',
port = '',
login = '',
password = '';
password = '',
trusted = false;
@observable
ExecutionState state;
@@ -41,6 +42,9 @@ abstract class NodeCreateOrEditViewModelBase with Store {
@observable
bool useSSL;
@observable
bool trusted;
@computed
bool get isReady =>
address.isNotEmpty && port.isNotEmpty;
@@ -68,6 +72,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
login = '';
password = '';
useSSL = false;
trusted = false;
}
@action
@@ -76,7 +81,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
state = IsExecutingState();
final node =
Node(uri: uri, type: _wallet.type, login: login, password: password,
useSSL: useSSL);
useSSL: useSSL, trusted: trusted);
await _nodeSource.add(node);
state = ExecutedSuccessfullyState();
} catch (e) {