From f28e8b5f8a3ee250bf1861441935ce217214730d Mon Sep 17 00:00:00 2001 From: Willy <11148913+willyfromtheblock@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:17:41 +0200 Subject: [PATCH] 1.2.2 (#242) * Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: Peercoin Flutter/Translations Translate-URL: https://weblate.ppc.lol/projects/peercoin-flutter/translations/ * version bump * implement changes proposed by sandakersmann * hide purchase options for PPC on iOS * move 2do * improve e2e test stability --------- Co-authored-by: Weblate --- CHANGELOG.md | 3 + assets/translations/ar.json | 1 - assets/translations/da.json | 1 - assets/translations/en.json | 6 +- assets/translations/es.json | 1 - assets/translations/hi.json | 1 - assets/translations/is.json | 1 - assets/translations/ja.json | 1 - assets/translations/ko.json | 1 - assets/translations/nb_NO.json | 1 - assets/translations/pt.json | 1 - assets/translations/sv.json | 1 - assets/translations/vi.json | 1 - assets/translations/zh.json | 1 - assets/translations/zh_Hant.json | 1 - ios/Podfile.lock | 8 +- .../app_settings_wallet_scanner.dart | 1 + lib/tools/scanner/wallet_scanner.dart | 1 - lib/widgets/wallet/receive_tab.dart | 131 +++++++++--------- pubspec.yaml | 2 +- test_driver/key_new.dart | 3 +- 21 files changed, 79 insertions(+), 89 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea16b735..b151a57d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### **1.2.2** (2023-09-27) +* Change the options for purchasing Peercoin on some devices + ### **1.2.1** (2023-09-24) * Minor improvements and bug hunting diff --git a/assets/translations/ar.json b/assets/translations/ar.json index bbd6b4de..6db52dd2 100644 --- a/assets/translations/ar.json +++ b/assets/translations/ar.json @@ -477,7 +477,6 @@ "currency_TMT": "مانات تركمانستاني", "currency_TOP": "بانجا تونغا", "currency_UZS": "سوم أوزبكستاني", - "currency_VEF": "بوليفار فنزويلي", "currency_WST": "تالا ساموا", "currency_XCD": "دولار شرق الكاريبي", "currency_FJD": "دولار فيجي", diff --git a/assets/translations/da.json b/assets/translations/da.json index 0b4335e3..84bc44f6 100644 --- a/assets/translations/da.json +++ b/assets/translations/da.json @@ -493,7 +493,6 @@ "currency_TMT": "Turkmenistansk manat", "currency_TOP": "Tongansk pa'anga", "currency_UZS": "Usbekisk som", - "currency_VEF": "Venezuelansk bolívar", "currency_VUV": "Vanuatu vatu", "currency_WST": "Samoansk tala", "currency_XCD": "Østcaribisk dollar", diff --git a/assets/translations/en.json b/assets/translations/en.json index 04f00c0c..7045fe01 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -297,7 +297,7 @@ "paperwallet_step_3": "Step 3", "paperwallet_step_3_text": "Check balance", "paperwallet_step_4": "Step 4", - "paperwallet_step_4_text": "Sweep Paper Wallet", + "paperwallet_step_4_text": "Sweep paper wallet", "paperwallet_success": "Paper Wallet imported successfully.\nTransaction will appear very soon.", "periodic_reminder_donate_title": "Donation Reminder", "periodic_reminder_donate_body": "This app is developed by the Peercoin Foundation.\nPlease consider donating to support the development of Peercoin and this app.", @@ -492,8 +492,8 @@ "wallet_scanner_message_newAddressFound": "new address found", "wallet_scanner_message_new_wallet_found": "new wallet found for $coinName at $accountNumber", "wallet_scanner_message_scan_finished": "scan finished for $coinName at $accountNumber", - "wallet_scanner_message_scan_failed": "scan failed for $coinName at $accountNumber ($e))", - "wallet_scanner_message_scan_connection_failed": "scan failed for $coinName at $accountNumber (Connection failed)", + "wallet_scanner_message_scan_failed": "scan failed for $coinName at $accountNumber ($e)", + "wallet_scanner_message_scan_connection_failed": "scan failed for $coinName at $accountNumber (connection failed)", "scan_modal_title": "Scanning this Wallet", "reset_modal_title": "Resetting this Wallet", "reset_modal_description": "This will reset the wallet balance and will check all addresses for UTXOs.\nNon-broadcasted transactions will be removed." diff --git a/assets/translations/es.json b/assets/translations/es.json index 5f848fe5..a60fa94b 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -448,7 +448,6 @@ "currency_GIP": "Libra de Gibraltar", "currency_NPR": "Rupia nepalesa", "currency_SSP": "Libra sursudanesa", - "currency_VEF": "Bolívar venezolano", "currency_VUV": "Vatu de Vanuatu", "app_settings_language_search": "Idioma de búsqueda", "currency_AED": "Dírham de los Emiratos Árabes Unidos", diff --git a/assets/translations/hi.json b/assets/translations/hi.json index 49f8f99b..35f5465d 100644 --- a/assets/translations/hi.json +++ b/assets/translations/hi.json @@ -483,7 +483,6 @@ "currency_SYP": "सीरियन पाउंड", "currency_TMT": "तुर्कमेनिस्तानी मानत", "currency_TOP": "टोंगन पा'आंगा", - "currency_VEF": "वेनेज़ुएलाई बोलिवार", "currency_VUV": "नी-वानुआटु वातू", "currency_WST": "सामोआन ताला", "currency_FJD": "फ़िजियन डॉलर", diff --git a/assets/translations/is.json b/assets/translations/is.json index 924815c5..d35701dd 100644 --- a/assets/translations/is.json +++ b/assets/translations/is.json @@ -434,7 +434,6 @@ "currency_TMT": "Túrkmenskur manat", "currency_TOP": "Tongversk pa'anga", "currency_UZS": "Úsbekskt som", - "currency_VEF": "Venesúelskur bólivíanó", "currency_VUV": "Vanúatú vatu", "currency_WST": "Samóska tala", "currency_FJD": "Fídjeyskur dalur", diff --git a/assets/translations/ja.json b/assets/translations/ja.json index ed770fd1..76acead6 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -472,7 +472,6 @@ "currency_SBD": "ソロモン諸島 ドル", "currency_SVC": "エルサルバドル コロン", "currency_TWD": "ニュー台湾ドル", - "currency_VEF": "ベネズエラ ボリバル", "currency_UYU": "ウルグアイ ペソ", "currency_XPF": "CFPフラン", "currency_CLF": "ウニダード・デ・フォメント", diff --git a/assets/translations/ko.json b/assets/translations/ko.json index 5d780fd5..30dc6817 100644 --- a/assets/translations/ko.json +++ b/assets/translations/ko.json @@ -492,7 +492,6 @@ "currency_TMT": "투르크메니스탄 마나트", "currency_TOP": "통가 파앙가", "currency_UZS": "우즈베키스탄 솀", - "currency_VEF": "베네수엘라 볼리바르", "currency_VUV": "니바두 바투", "currency_WST": "사모아 탈라", "currency_XCD": "동카리브 달러", diff --git a/assets/translations/nb_NO.json b/assets/translations/nb_NO.json index 2d1884a8..a0012428 100644 --- a/assets/translations/nb_NO.json +++ b/assets/translations/nb_NO.json @@ -493,7 +493,6 @@ "currency_TMT": "Turkmensk manat", "currency_TOP": "Tongansk pa'anga", "currency_UZS": "Usbekisk sum", - "currency_VEF": "Venezuelansk bolívar", "currency_VUV": "Vanuatisk vatu", "currency_WST": "Samoansk tala", "currency_XCD": "Østkaribisk dollar", diff --git a/assets/translations/pt.json b/assets/translations/pt.json index 495e0f83..b73cf257 100644 --- a/assets/translations/pt.json +++ b/assets/translations/pt.json @@ -480,7 +480,6 @@ "currency_TMT": "Manat Turquemenistano", "currency_TOP": "Pa'anga Tonganês", "currency_UZS": "Som Uzbeque", - "currency_VEF": "Bolívar Venezuelano", "currency_VUV": "Vatu de Vanuatu", "currency_WST": "Tala Samoano", "currency_FJD": "Dólar Fijiano", diff --git a/assets/translations/sv.json b/assets/translations/sv.json index 28f38b7b..bf99f2e7 100644 --- a/assets/translations/sv.json +++ b/assets/translations/sv.json @@ -488,7 +488,6 @@ "currency_TMT": "Turkmenistanska manat", "currency_TOP": "Tonganska pa'anga", "currency_UZS": "Uzbekistanska som", - "currency_VEF": "Venezuelanska bolívar", "currency_VUV": "Vanuatu vatu", "currency_WST": "Samoanska tala", "currency_FJD": "Fijianska dollar", diff --git a/assets/translations/vi.json b/assets/translations/vi.json index d73526dc..c61f2994 100644 --- a/assets/translations/vi.json +++ b/assets/translations/vi.json @@ -444,7 +444,6 @@ "currency_SYP": "Bảng Syria", "currency_TOP": "Pa'anga Tonga", "currency_UZS": "Som Uzbekistan", - "currency_VEF": "Bolívar Venezuela", "currency_VUV": "Vatu Vanuatu", "currency_WST": "Tala Samoa", "currency_XCD": "Đô la Đông Caribê", diff --git a/assets/translations/zh.json b/assets/translations/zh.json index 63e72ea3..e1e492fc 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -487,7 +487,6 @@ "currency_TMT": "土库曼斯坦马纳特", "currency_TOP": "汤加潘加", "currency_UZS": "乌兹别克斯坦苏姆", - "currency_VEF": "委内瑞拉玻利瓦尔", "currency_VUV": "瓦努阿图瓦图", "currency_XCD": "东加勒比元", "currency_FJD": "斐济元", diff --git a/assets/translations/zh_Hant.json b/assets/translations/zh_Hant.json index 40396731..21a13c44 100644 --- a/assets/translations/zh_Hant.json +++ b/assets/translations/zh_Hant.json @@ -490,7 +490,6 @@ "currency_TMT": "土庫曼馬納特", "currency_TOP": "東加潘加", "currency_UZS": "烏茲別克索姆", - "currency_VEF": "委內瑞拉玻利瓦", "currency_VUV": "瓦努阿圖瓦圖", "currency_WST": "薩摩亞塔拉", "currency_XCD": "東加勒比元", diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ffd3039d..98d4b058 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -9,8 +9,6 @@ PODS: - connectivity_plus (0.0.1): - Flutter - ReachabilitySwift - - cryptography_flutter (0.2.0): - - Flutter - DKImagePickerController/Core (4.3.4): - DKImagePickerController/ImageDataManager - DKImagePickerController/Resource @@ -89,7 +87,6 @@ DEPENDENCIES: - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`) - coinlib_flutter (from `.symlinks/plugins/coinlib_flutter/darwin`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - - cryptography_flutter (from `.symlinks/plugins/cryptography_flutter/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) @@ -125,8 +122,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/coinlib_flutter/darwin" connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" - cryptography_flutter: - :path: ".symlinks/plugins/cryptography_flutter/ios" file_picker: :path: ".symlinks/plugins/file_picker/ios" Flutter: @@ -163,7 +158,6 @@ SPEC CHECKSUMS: camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb coinlib_flutter: 6abec900d67762a6e7ccfd567a3cd3ae00bbee35 connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e - cryptography_flutter: 381bdacc984abcfbe3ca45ef7c76566ff061614c DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: ce3938a0df3cc1ef404671531facef740d03f920 @@ -176,7 +170,7 @@ SPEC CHECKSUMS: integration_test: 13825b8a9334a850581300559b8839134b124670 local_auth_ios: c6cf091ded637a88f24f86a8875d8b0f526e2605 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e + package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 diff --git a/lib/screens/settings/wallet_scan/app_settings_wallet_scanner.dart b/lib/screens/settings/wallet_scan/app_settings_wallet_scanner.dart index 333977ed..1b735f3a 100644 --- a/lib/screens/settings/wallet_scan/app_settings_wallet_scanner.dart +++ b/lib/screens/settings/wallet_scan/app_settings_wallet_scanner.dart @@ -276,4 +276,5 @@ class _AppSettingsWalletScannerState extends State { }); context.loaderOverlay.hide(); } + //TODO won't find new wallets if one in the gap has not been used } diff --git a/lib/tools/scanner/wallet_scanner.dart b/lib/tools/scanner/wallet_scanner.dart index 64321894..db170727 100644 --- a/lib/tools/scanner/wallet_scanner.dart +++ b/lib/tools/scanner/wallet_scanner.dart @@ -177,5 +177,4 @@ class WalletScanner { return knownAddresses; } - //TODO won't find new wallets if one in the gap has not been used } diff --git a/lib/widgets/wallet/receive_tab.dart b/lib/widgets/wallet/receive_tab.dart index 218238cc..88a87de8 100644 --- a/lib/widgets/wallet/receive_tab.dart +++ b/lib/widgets/wallet/receive_tab.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:provider/provider.dart'; @@ -135,6 +137,71 @@ class _ReceiveTabState extends State { ); } + Widget renderPurchaseButtons() { + if (widget.wallet.letterCode == 'tPPC') { + return Align( + child: PeerContainer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + PeerServiceTitle( + title: AppLocalizations.instance.translate('receive_obtain'), + ), + const SizedBox(height: 20), + Text( + AppLocalizations.instance.translate('receive_website_faucet'), + textAlign: TextAlign.center, + ), + const SizedBox(height: 20), + PeerButton( + text: AppLocalizations.instance.translate('receive_faucet'), + action: () { + launchURL('https://ppc.lol/faucet/'); + }, + ), + ], + ), + ), + ); + } else if (widget.wallet.letterCode == 'PPC' && Platform.isIOS == false) { + return Align( + child: PeerContainer( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + PeerServiceTitle( + title: AppLocalizations.instance.translate('buy_peercoin'), + ), + const SizedBox(height: 20), + Text( + AppLocalizations.instance + .translate('receive_website_description'), + textAlign: TextAlign.center, + ), + const SizedBox(height: 20), + PeerButton( + text: AppLocalizations.instance + .translate('receive_website_credit'), + action: () { + launchURL('https://ppc.lol/buy'); + }, + ), + const SizedBox(height: 20), + PeerButton( + text: AppLocalizations.instance + .translate('receive_website_exchandes'), + action: () { + launchURL('https://ppc.lol/exchanges'); + }, + ), + ], + ), + ), + ); + } + return const SizedBox(); + } + @override Widget build(BuildContext context) { return Stack( @@ -293,69 +360,7 @@ class _ReceiveTabState extends State { ), ), ), - widget.wallet.letterCode == 'tPPC' - ? Align( - child: PeerContainer( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - PeerServiceTitle( - title: AppLocalizations.instance - .translate('receive_obtain'), - ), - const SizedBox(height: 20), - Text( - AppLocalizations.instance - .translate('receive_website_faucet'), - textAlign: TextAlign.center, - ), - const SizedBox(height: 20), - PeerButton( - text: AppLocalizations.instance - .translate('receive_faucet'), - action: () { - launchURL('https://ppc.lol/faucet/'); - }, - ), - ], - ), - ), - ) - : Align( - child: PeerContainer( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - PeerServiceTitle( - title: AppLocalizations.instance - .translate('buy_peercoin'), - ), - const SizedBox(height: 20), - Text( - AppLocalizations.instance - .translate('receive_website_description'), - textAlign: TextAlign.center, - ), - const SizedBox(height: 20), - PeerButton( - text: AppLocalizations.instance - .translate('receive_website_credit'), - action: () { - launchURL('https://ppc.lol/buy'); - }, - ), - const SizedBox(height: 20), - PeerButton( - text: AppLocalizations.instance - .translate('receive_website_exchandes'), - action: () { - launchURL('https://ppc.lol/exchanges'); - }, - ), - ], - ), - ), - ), + renderPurchaseButtons(), ], ), ], diff --git a/pubspec.yaml b/pubspec.yaml index ef4a6a90..cb17e081 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: peercoin description: A new Peercoin wallet. -version: 1.2.1+133 +version: 1.2.2+134 environment: sdk: '>=3.0.0 <4.0.0' diff --git a/test_driver/key_new.dart b/test_driver/key_new.dart index 3e3929a5..92c1a060 100644 --- a/test_driver/key_new.dart +++ b/test_driver/key_new.dart @@ -136,9 +136,10 @@ void main() { test( 'tap into new peercoin mainnet wallet', () async { + await driver.tap(find.pageBack()); + await Future.delayed(const Duration(seconds: 1)); await driver.runUnsynchronized( () async { - await driver.tap(find.pageBack()); await driver.tap(find.byValueKey('newWalletIconButton')); await driver.tap(find.text('Peercoin')); await driver.tap(find.text('Peercoin')); //tap into wallet