mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
CAKE-169 | added useSSL parameter to node.dart and to node_create_or_edit_view_model.dart; applied useSSL parameter in the connectToNode() method (monero_wallet.dart) and in the save() method (node_create_or_edit_view_model.dart); created standard_checkbox.dart and applied StandardCheckbox widget in the node_create_or_edit_page.dart
This commit is contained in:
@@ -14,7 +14,8 @@ class NodeCreateOrEditViewModel = NodeCreateOrEditViewModelBase
|
||||
abstract class NodeCreateOrEditViewModelBase with Store {
|
||||
NodeCreateOrEditViewModelBase(this._nodeSource, this._wallet)
|
||||
: state = InitialExecutionState(),
|
||||
connectionState = InitialConnectionState();
|
||||
connectionState = InitialConnectionState(),
|
||||
useSSL = false;
|
||||
|
||||
@observable
|
||||
ExecutionState state;
|
||||
@@ -34,6 +35,9 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
||||
@observable
|
||||
ConnectionToNodeState connectionState;
|
||||
|
||||
@observable
|
||||
bool useSSL;
|
||||
|
||||
@computed
|
||||
bool get isReady =>
|
||||
(address?.isNotEmpty ?? false) && (port?.isNotEmpty ?? false);
|
||||
@@ -59,6 +63,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
||||
port = '';
|
||||
login = '';
|
||||
password = '';
|
||||
useSSL = false;
|
||||
}
|
||||
|
||||
@action
|
||||
@@ -66,7 +71,8 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
||||
try {
|
||||
state = IsExecutingState();
|
||||
final node =
|
||||
Node(uri: uri, type: _wallet.type, login: login, password: password);
|
||||
Node(uri: uri, type: _wallet.type, login: login, password: password,
|
||||
useSSL: useSSL);
|
||||
await _nodeSource.add(node);
|
||||
state = ExecutedSuccessfullyState();
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user