From 053e0d18ef2bb47a6298b870a4612d84b45b367e Mon Sep 17 00:00:00 2001 From: M Date: Tue, 11 May 2021 19:57:12 +0300 Subject: [PATCH] Type fixes. Fixed way for check monero nodes health. --- assets/litecoin_electrum_server_list.yml | 2 +- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/entities/default_settings_migration.dart | 2 +- lib/entities/node.dart | 10 +++++----- res/values/strings_de.arb | 4 ++-- res/values/strings_en.arb | 4 ++-- res/values/strings_es.arb | 4 ++-- res/values/strings_hi.arb | 4 ++-- res/values/strings_hr.arb | 4 ++-- res/values/strings_it.arb | 4 ++-- res/values/strings_ja.arb | 4 ++-- res/values/strings_ko.arb | 4 ++-- res/values/strings_nl.arb | 4 ++-- res/values/strings_pl.arb | 4 ++-- res/values/strings_pt.arb | 4 ++-- res/values/strings_ru.arb | 4 ++-- res/values/strings_uk.arb | 4 ++-- res/values/strings_zh.arb | 4 ++-- 18 files changed, 38 insertions(+), 38 deletions(-) diff --git a/assets/litecoin_electrum_server_list.yml b/assets/litecoin_electrum_server_list.yml index 4922dfba2..e61d0996c 100644 --- a/assets/litecoin_electrum_server_list.yml +++ b/assets/litecoin_electrum_server_list.yml @@ -1,2 +1,2 @@ - - uri: 128.199.34.116:50002 \ No newline at end of file + uri: ltc-electrum.cakewallet.com:50002 \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index f51e0e3fe..79c69b9ed 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -362,7 +362,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -505,7 +505,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -540,7 +540,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index e8edd28aa..51aa5b49a 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -21,7 +21,7 @@ import 'package:encrypt/encrypt.dart' as encrypt; const newCakeWalletMoneroUri = 'xmr-node.cakewallet.com:18081'; const cakeWalletBitcoinElectrumUri = 'electrum.cakewallet.com:50002'; -const cakeWalletLitecoinElectrumUri = '128.199.34.116:50002'; +const cakeWalletLitecoinElectrumUri = 'ltc-electrum.cakewallet.com:50002'; Future defaultSettingsMigration( {@required int version, diff --git a/lib/entities/node.dart b/lib/entities/node.dart index fe2823352..c1aa19ed3 100644 --- a/lib/entities/node.dart +++ b/lib/entities/node.dart @@ -11,7 +11,7 @@ import 'package:cake_wallet/entities/digest_request.dart'; part 'node.g.dart'; Uri createUriFromElectrumAddress(String address) => - Uri.tryParse('tcp://$address'); + Uri.tryParse('tcp://$address'); @HiveType(typeId: Node.typeId) class Node extends HiveObject with Keyable { @@ -104,7 +104,7 @@ class Node extends HiveObject with Keyable { uri: uri.toString(), login: login, password: password); resBody = response.data as Map; } else { - final rpcUri = Uri.http(uri.toString(), '/json_rpc'); + final rpcUri = Uri.http(uri.authority, '/json_rpc'); final headers = {'Content-type': 'application/json'}; final body = json.encode({'jsonrpc': '2.0', 'id': '0', 'method': 'get_info'}); @@ -121,9 +121,9 @@ class Node extends HiveObject with Keyable { Future requestElectrumServer() async { try { - await SecureSocket.connect(uri.host, uri.port, - timeout: Duration(seconds: 5), onBadCertificate: (_) => true); - return true; + await SecureSocket.connect(uri.host, uri.port, + timeout: Duration(seconds: 5), onBadCertificate: (_) => true); + return true; } catch (_) { return false; } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 6b9822ba7..27c705d97 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Derzeit unterstützen wir nur den Kauf von Bitcoin. Um Bitcoin zu kaufen, erstellen Sie bitte Ihre Bitcoin-Brieftasche oder wechseln Sie zu dieser", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 38e769d0a..78ab7ec06 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Currently we only support the purchase of Bitcoin. To buy Bitcoin, please create or switch to your Bitcoin wallet", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index dd4707ddf..98ece5ce7 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Actualmente solo apoyamos la compra de Bitcoin. Para comprar Bitcoin, cree o cambie a su billetera Bitcoin", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 4bcb4e9fa..4f14f2a1a 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "वर्तमान में हम केवल बिटकॉइन की खरीद का समर्थन करते हैं। बिटकॉइन खरीदने के लिए, कृपया अपना बिटकॉइन वॉलेट बनाएं या स्विच करें", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index ae1b4d8ec..d449fca1b 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Currently we only support the purchase of Bitcoin. To buy Bitcoin, please create or switch to your Bitcoin wallet", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 32e59cd3b..e8c4da26d 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Currently we only support the purchase of Bitcoin. To buy Bitcoin, please create or switch to your Bitcoin wallet", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index af8b3e405..797cfe2c2 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "現在、ビットコインの購入のみをサポートしています。 ビットコインを購入するには、ビットコインウォレットを作成するか切り替えてください", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index b5347e1b9..fddff1af5 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "현재 우리는 비트 코인 구매 만 지원합니다. 비트 코인을 구매하려면 비트 코인 지갑을 생성하거나 전환하십시오", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index d9530aaa5..8d4b4bf1c 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Momenteel ondersteunen we alleen de aankoop van Bitcoin. Om Bitcoin te kopen, moet u uw Bitcoin-portemonnee aanmaken of naar uw Bitcoin-portemonnee overschakelen", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 53787f1d6..fca8328fc 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Obecnie obsługujemy tylko zakup Bitcoinów. Aby kupić Bitcoin, utwórz lub przełącz się na swój portfel Bitcoin", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index ec7e72f06..8aa08e69c 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "Atualmente, apoiamos apenas a compra de Bitcoin. Para comprar Bitcoin, crie ou mude para sua carteira Bitcoin", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index b1b085a35..4fe26f13c 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "В настоящее время мы поддерживаем только покупку Bitcoin. Чтобы купить Bitcoin, создайте или переключитесь на ваш Bitcoin кошелек", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 92ccf7f05..69d02a27e 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -473,6 +473,6 @@ "buy_alert_content" : "На даний час ми підтримуємо тільки покупку Bitcoin. Щоб купити Bitcoin, будь ласка, створіть або переключіться на ваш Bitcoin гаманець", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 1ee4e3c26..e0a96561c 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -470,6 +470,6 @@ "submit_request" : "提交请求", "buy_alert_content" : "目前,我們僅支持購買比特幣。 要購買比特幣,請創建或切換到您的比特幣錢包", - "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have the 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-seed wallet and stop using wallets with the 12-word seed. Please do this immediately to secure your funds.", - "understand" : "I undersand" + "outdated_electrum_wallet_desceription" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", + "understand" : "I understand" } \ No newline at end of file