mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-22 06:28:39 +02:00
Merge pull request #529 from cake-tech/CW-182-allow-trusted-nodes
Cw 182 allow trusted nodes
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user