From 1dd6e78ae91e62fb3ba37b124a7bb19faa8ced0e Mon Sep 17 00:00:00 2001 From: M Date: Thu, 3 Dec 2020 12:07:26 +0200 Subject: [PATCH] Removed NodeSSL, added isSSL proprty to Node class. --- lib/entities/node.dart | 2 ++ lib/entities/node_ssl.dart | 11 ----------- lib/monero/monero_wallet.dart | 4 +--- lib/store/dashboard/trade_filter_store.dart | 2 +- 4 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 lib/entities/node_ssl.dart diff --git a/lib/entities/node.dart b/lib/entities/node.dart index 0b8da1acb..48f3c9d8e 100644 --- a/lib/entities/node.dart +++ b/lib/entities/node.dart @@ -43,6 +43,8 @@ class Node extends HiveObject with Keyable { @HiveField(4) bool useSSL; + bool get isSSL => useSSL ?? false; + @override dynamic get keyIndex { _keyIndex ??= key; diff --git a/lib/entities/node_ssl.dart b/lib/entities/node_ssl.dart deleted file mode 100644 index 4775d7304..000000000 --- a/lib/entities/node_ssl.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:cake_wallet/entities/node.dart'; - -class NodeSSL { - NodeSSL(this._node) : - _useSSL = _node.useSSL ?? false; - - final Node _node; - final bool _useSSL; - - bool get useSSL => _useSSL; -} \ No newline at end of file diff --git a/lib/monero/monero_wallet.dart b/lib/monero/monero_wallet.dart index 5dabd4805..bf912a4fd 100644 --- a/lib/monero/monero_wallet.dart +++ b/lib/monero/monero_wallet.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:cake_wallet/entities/node_ssl.dart'; import 'package:cake_wallet/monero/monero_amount_format.dart'; import 'package:cake_wallet/monero/monero_transaction_creation_exception.dart'; import 'package:flutter/foundation.dart'; @@ -144,12 +143,11 @@ abstract class MoneroWalletBase extends WalletBase with Store { Future connectToNode({@required Node node}) async { try { syncStatus = ConnectingSyncStatus(); - final nodeSSL = NodeSSL(node); await monero_wallet.setupNode( address: node.uri, login: node.login, password: node.password, - useSSL: nodeSSL.useSSL, + useSSL: node.isSSL, isLightWallet: false); // FIXME: hardcoded value syncStatus = ConnectedSyncStatus(); } catch (e) { diff --git a/lib/store/dashboard/trade_filter_store.dart b/lib/store/dashboard/trade_filter_store.dart index 46e1193bb..02ad383e7 100644 --- a/lib/store/dashboard/trade_filter_store.dart +++ b/lib/store/dashboard/trade_filter_store.dart @@ -3,7 +3,7 @@ import 'package:mobx/mobx.dart'; import 'package:cake_wallet/exchange/exchange_provider_description.dart'; import 'package:cake_wallet/view_model/dashboard/trade_list_item.dart'; -part 'trade_filter_store.g.dart'; +part'trade_filter_store.g.dart'; class TradeFilterStore = TradeFilterStoreBase with _$TradeFilterStore;