From 01adf863d06a179332136a3fd80210a38b146265 Mon Sep 17 00:00:00 2001 From: OmarHatem28 Date: Tue, 9 Aug 2022 13:34:40 +0200 Subject: [PATCH 001/100] Add the ability to launch app from Crypto QR codes --- android/app/src/main/AndroidManifestBase.xml | 9 +++++ lib/main.dart | 37 ++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml index f43b0369b..f4023f532 100644 --- a/android/app/src/main/AndroidManifestBase.xml +++ b/android/app/src/main/AndroidManifestBase.xml @@ -38,6 +38,15 @@ android:scheme="cakewallet" android:host="y.at" /> + + + + + + + + + with SingleTickerProviderStateMixin { super.initState(); //_handleIncomingLinks(); //_handleInitialUri(); + + initUniLinks(); } @override @@ -210,6 +212,41 @@ class AppState extends State with SingleTickerProviderStateMixin { super.dispose(); } + /// handle app links while the app is already started - be it in + /// the foreground or in the background. + Future initUniLinks() async { + try { + stream = getLinksStream().listen((String link) { + handleDeepLinking(link); + }); + + final String initialLink = await getInitialLink(); + + handleDeepLinking(initialLink); + } catch (e) { + print(e); + } + } + + void handleDeepLinking(String link) async { + if (link == null || !mounted) return; + + final List urlComponents = link.split(":"); + + switch (urlComponents.first) { + case "bitcoin": + print("@@@@@@@@@@@@@@@@@@@@@@@@@@"); + print("Bitcoin QR Code: \n${link}"); + break; + case "litecoin": + case "haven": + case "monero": + default: + print("@@@@@@@@@@@@@@@@@@@@@@@@@@"); + print(link); + } + } + Future _handleInitialUri() async { try { final uri = await getInitialUri(); From 7bccf468323fe40f8cde19a86d436669f68c81d1 Mon Sep 17 00:00:00 2001 From: OmarHatem28 Date: Tue, 9 Aug 2022 15:47:41 +0200 Subject: [PATCH 002/100] Send data from URI to send screen --- lib/di.dart | 10 ++++-- lib/main.dart | 27 ++++++++------- lib/router.dart | 7 +++- lib/src/screens/send/send_page.dart | 11 ++++-- lib/src/screens/send/widgets/send_card.dart | 37 ++++++++++++++++----- 5 files changed, 64 insertions(+), 28 deletions(-) diff --git a/lib/di.dart b/lib/di.dart index bd911335d..bc02b3466 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/ionia/ionia_anypay.dart'; import 'package:cake_wallet/ionia/ionia_category.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/src/screens/ionia/cards/ionia_gift_card_detail_page.dart'; +import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/ionia/ionia_auth_view_model.dart'; import 'package:cake_wallet/view_model/ionia/ionia_buy_card_view_model.dart'; import 'package:cake_wallet/view_model/ionia/ionia_filter_view_model.dart'; @@ -372,9 +373,12 @@ Future setup( getIt.get(), _transactionDescriptionBox)); - getIt.registerFactory( - () => SendPage(sendViewModel: getIt.get(), - settingsViewModel: getIt.get())); + getIt.registerFactoryParam( + (PaymentRequest initialPaymentRequest, _) => SendPage( + sendViewModel: getIt.get(), + settingsViewModel: getIt.get(), + initialPaymentRequest: initialPaymentRequest, + )); getIt.registerFactory(() => SendTemplatePage( sendTemplateViewModel: getIt.get())); diff --git a/lib/main.dart b/lib/main.dart index 901773072..cfd242dbf 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/buy/order.dart'; import 'package:cake_wallet/ionia/ionia_category.dart'; import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/store/yat/yat_store.dart'; +import 'package:cake_wallet/utils/payment_request.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -216,34 +217,32 @@ class AppState extends State with SingleTickerProviderStateMixin { /// the foreground or in the background. Future initUniLinks() async { try { - stream = getLinksStream().listen((String link) { - handleDeepLinking(link); + stream = getUriLinksStream().listen((Uri uri) { + handleDeepLinking(uri); }); - final String initialLink = await getInitialLink(); + final Uri initialUri = await getInitialUri(); - handleDeepLinking(initialLink); + handleDeepLinking(initialUri); } catch (e) { print(e); } } - void handleDeepLinking(String link) async { - if (link == null || !mounted) return; + void handleDeepLinking(Uri uri) { + if (uri == null || !mounted) return; - final List urlComponents = link.split(":"); - - switch (urlComponents.first) { + switch (uri.scheme) { case "bitcoin": - print("@@@@@@@@@@@@@@@@@@@@@@@@@@"); - print("Bitcoin QR Code: \n${link}"); - break; case "litecoin": case "haven": case "monero": default: - print("@@@@@@@@@@@@@@@@@@@@@@@@@@"); - print(link); + Navigator.pushNamed( + navigatorKey.currentContext, + Routes.send, + arguments: PaymentRequest.fromUri(uri), + ); } } diff --git a/lib/router.dart b/lib/router.dart index 1a9c3c2d5..c5079f078 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -16,6 +16,7 @@ import 'package:cake_wallet/src/screens/seed/pre_seed_page.dart'; import 'package:cake_wallet/src/screens/support/support_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_list_page.dart'; +import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/monero_account_list/account_list_item.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -207,8 +208,12 @@ Route createRoute(RouteSettings settings) { builder: (_) => getIt.get()); case Routes.send: + final initialPaymentRequest = settings.arguments as PaymentRequest; + return CupertinoPageRoute( - fullscreenDialog: true, builder: (_) => getIt.get()); + fullscreenDialog: true, builder: (_) => getIt.get( + param1: initialPaymentRequest, + )); case Routes.sendTemplate: return CupertinoPageRoute( diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index 791548f3d..64e564501 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -5,6 +5,7 @@ import 'package:cake_wallet/src/screens/send/widgets/send_card.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/src/widgets/template_tile.dart'; +import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/send/output.dart'; import 'package:cake_wallet/view_model/settings/settings_view_model.dart'; import 'package:flutter/cupertino.dart'; @@ -28,13 +29,18 @@ import 'package:smooth_page_indicator/smooth_page_indicator.dart'; import 'package:cw_core/crypto_currency.dart'; class SendPage extends BasePage { - SendPage({@required this.sendViewModel,@required this.settingsViewModel }) : _formKey = GlobalKey(),fiatFromSettings = settingsViewModel.fiatCurrency; + SendPage({ + @required this.sendViewModel, + @required this.settingsViewModel, + this.initialPaymentRequest, + }) : _formKey = GlobalKey(),fiatFromSettings = settingsViewModel.fiatCurrency; final SendViewModel sendViewModel; final SettingsViewModel settingsViewModel; final GlobalKey _formKey; final controller = PageController(initialPage: 0); - final FiatCurrency fiatFromSettings ; + final FiatCurrency fiatFromSettings; + final PaymentRequest initialPaymentRequest; bool _effectsInstalled = false; @@ -116,6 +122,7 @@ class SendPage extends BasePage { key: output.key, output: output, sendViewModel: sendViewModel, + initialPaymentRequest: initialPaymentRequest, ); }); }, diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 69858a3ac..27b3f49dc 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -19,23 +19,35 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; class SendCard extends StatefulWidget { - SendCard({Key key, @required this.output, @required this.sendViewModel}) : super(key: key); + SendCard({ + Key key, + @required this.output, + @required this.sendViewModel, + this.initialPaymentRequest, + }) : super(key: key); final Output output; final SendViewModel sendViewModel; + final PaymentRequest initialPaymentRequest; @override - SendCardState createState() => SendCardState( + SendCardState createState() { + return SendCardState( output: output, - sendViewModel: sendViewModel + sendViewModel: sendViewModel, + initialPaymentRequest: initialPaymentRequest, ); + } } class SendCardState extends State with AutomaticKeepAliveClientMixin { - SendCardState({@required this.output, @required this.sendViewModel}) - : addressController = TextEditingController(), - cryptoAmountController = TextEditingController(), + SendCardState({ + @required this.output, + @required this.sendViewModel, + PaymentRequest initialPaymentRequest}) + : addressController = TextEditingController(text: initialPaymentRequest?.address), + cryptoAmountController = TextEditingController(text: initialPaymentRequest?.amount), fiatAmountController = TextEditingController(), noteController = TextEditingController(), extractedAddressController = TextEditingController(), @@ -111,6 +123,11 @@ class SendCardState extends State ? sendViewModel.textValidator : sendViewModel.addressValidator; + print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); + print("444444444444444444444444444444"); + print(addressController.text); + print(cryptoAmountController.text); + return AddressTextField( focusNode: addressFocusNode, controller: addressController, @@ -509,8 +526,12 @@ class SendCardState extends State } void _setEffects(BuildContext context) { - addressController.text = output.address; - cryptoAmountController.text = output.cryptoAmount; + if (output.address.isNotEmpty) { + addressController.text = output.address; + } + if (output.cryptoAmount.isNotEmpty) { + cryptoAmountController.text = output.cryptoAmount; + } fiatAmountController.text = output.fiatAmount; noteController.text = output.note; extractedAddressController.text = output.extractedAddress; From e5fac16ef77ec032b768762913dfcae62802267d Mon Sep 17 00:00:00 2001 From: OmarHatem28 Date: Tue, 9 Aug 2022 17:06:21 +0200 Subject: [PATCH 003/100] Notify user when a different currency is scanned --- lib/main.dart | 17 +++------- lib/src/screens/send/widgets/send_card.dart | 35 ++++++++++++++++----- lib/utils/payment_request.dart | 7 +++-- lib/view_model/send/send_view_model.dart | 2 ++ res/values/strings_de.arb | 3 +- res/values/strings_en.arb | 3 +- res/values/strings_es.arb | 3 +- res/values/strings_fr.arb | 3 +- res/values/strings_hi.arb | 3 +- res/values/strings_hr.arb | 3 +- res/values/strings_it.arb | 3 +- res/values/strings_ja.arb | 3 +- res/values/strings_ko.arb | 3 +- res/values/strings_nl.arb | 3 +- res/values/strings_pl.arb | 3 +- res/values/strings_pt.arb | 3 +- res/values/strings_ru.arb | 3 +- res/values/strings_uk.arb | 3 +- res/values/strings_zh.arb | 3 +- 19 files changed, 69 insertions(+), 37 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index cfd242dbf..120871fbd 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -232,18 +232,11 @@ class AppState extends State with SingleTickerProviderStateMixin { void handleDeepLinking(Uri uri) { if (uri == null || !mounted) return; - switch (uri.scheme) { - case "bitcoin": - case "litecoin": - case "haven": - case "monero": - default: - Navigator.pushNamed( - navigatorKey.currentContext, - Routes.send, - arguments: PaymentRequest.fromUri(uri), - ); - } + Navigator.pushNamed( + navigatorKey.currentContext, + Routes.send, + arguments: PaymentRequest.fromUri(uri), + ); } Future _handleInitialUri() async { diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 27b3f49dc..063b9d57a 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -1,4 +1,5 @@ import 'dart:ui'; +import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cake_wallet/routes.dart'; @@ -45,8 +46,8 @@ class SendCardState extends State SendCardState({ @required this.output, @required this.sendViewModel, - PaymentRequest initialPaymentRequest}) - : addressController = TextEditingController(text: initialPaymentRequest?.address), + this.initialPaymentRequest}) + : addressController = TextEditingController(text: initialPaymentRequest?.address?.toLowerCase()), cryptoAmountController = TextEditingController(text: initialPaymentRequest?.amount), fiatAmountController = TextEditingController(), noteController = TextEditingController(), @@ -60,6 +61,7 @@ class SendCardState extends State final Output output; final SendViewModel sendViewModel; + final PaymentRequest initialPaymentRequest; final TextEditingController addressController; final TextEditingController cryptoAmountController; @@ -72,6 +74,27 @@ class SendCardState extends State bool _effectsInstalled = false; + @override + void initState() { + super.initState(); + + /// if the current wallet doesn't match the one in the qr code + if (initialPaymentRequest != null && + sendViewModel.walletCurrencyName != initialPaymentRequest.scheme?.toLowerCase()) { + WidgetsBinding.instance?.addPostFrameCallback((timeStamp) { + showPopUp( + context: context, + builder: (BuildContext context) { + return AlertWithOneAction( + alertTitle: S.of(context).error, + alertContent: S.of(context).unmatched_currencies, + buttonText: S.of(context).ok, + buttonAction: () => Navigator.of(context).pop()); + }); + }); + } + } + @override Widget build(BuildContext context) { super.build(context); @@ -123,11 +146,6 @@ class SendCardState extends State ? sendViewModel.textValidator : sendViewModel.addressValidator; - print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); - print("444444444444444444444444444444"); - print(addressController.text); - print(cryptoAmountController.text); - return AddressTextField( focusNode: addressFocusNode, controller: addressController, @@ -529,7 +547,8 @@ class SendCardState extends State if (output.address.isNotEmpty) { addressController.text = output.address; } - if (output.cryptoAmount.isNotEmpty) { + if (output.cryptoAmount.isNotEmpty || + sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme?.toLowerCase()) { cryptoAmountController.text = output.cryptoAmount; } fiatAmountController.text = output.fiatAmount; diff --git a/lib/utils/payment_request.dart b/lib/utils/payment_request.dart index d4338a39a..3830c69cb 100644 --- a/lib/utils/payment_request.dart +++ b/lib/utils/payment_request.dart @@ -1,18 +1,21 @@ class PaymentRequest { - PaymentRequest(this.address, this.amount); + PaymentRequest(this.address, this.amount, {this.scheme}); factory PaymentRequest.fromUri(Uri uri) { var address = ""; var amount = ""; + var scheme = ""; if (uri != null) { address = uri.path; amount = uri.queryParameters['tx_amount'] ?? uri.queryParameters['amount'] ?? ""; + scheme = uri.scheme; } - return PaymentRequest(address, amount); + return PaymentRequest(address, amount, scheme: scheme); } final String address; final String amount; + final String scheme; } \ No newline at end of file diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index b615c00c4..1b06d2421 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -157,6 +157,8 @@ abstract class SendViewModelBase with Store { WalletType get walletType => _wallet.type; + String get walletCurrencyName => _wallet.currency.name.toLowerCase(); + bool get hasCurrecyChanger => walletType == WalletType.haven; final WalletBase _wallet; diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index d9687bc36..7791563f9 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Geschenkkarte wird generiert", "open_gift_card": "Geschenkkarte öffnen", "contact_support": "Support kontaktieren", - "gift_cards_unavailable": "Geschenkkarten können derzeit nur über Monero, Bitcoin und Litecoin erworben werden" + "gift_cards_unavailable": "Geschenkkarten können derzeit nur über Monero, Bitcoin und Litecoin erworben werden", + "unmatched_currencies": "Die Währung Ihres aktuellen Wallets stimmt nicht mit der des gescannten QR überein" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 9fc0b743e..ff88286ac 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Gift Card is generated", "open_gift_card": "Open Gift Card", "contact_support": "Contact Support", - "gift_cards_unavailable": "Gift cards are available for purchase only with Monero, Bitcoin, and Litecoin at this time" + "gift_cards_unavailable": "Gift cards are available for purchase only with Monero, Bitcoin, and Litecoin at this time", + "unmatched_currencies": "Your current wallet's currency does not match that of the scanned QR" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 084658081..685770f13 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Se genera la tarjeta de regalo", "open_gift_card": "Abrir tarjeta de regalo", "contact_support": "Contactar con Soporte", - "gift_cards_unavailable": "Las tarjetas de regalo están disponibles para comprar solo a través de Monero, Bitcoin y Litecoin en este momento" + "gift_cards_unavailable": "Las tarjetas de regalo están disponibles para comprar solo a través de Monero, Bitcoin y Litecoin en este momento", + "unmatched_currencies": "La moneda de su billetera actual no coincide con la del QR escaneado" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 9817e7bef..e348912df 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -630,5 +630,6 @@ "gift_card_is_generated": "La carte-cadeau est générée", "open_gift_card": "Ouvrir la carte-cadeau", "contact_support": "Contacter l'assistance", - "gift_cards_unavailable": "Les cartes-cadeaux ne sont disponibles à l'achat que via Monero, Bitcoin et Litecoin pour le moment" + "gift_cards_unavailable": "Les cartes-cadeaux ne sont disponibles à l'achat que via Monero, Bitcoin et Litecoin pour le moment", + "unmatched_currencies": "La devise de votre portefeuille actuel ne correspond pas à celle du QR scanné" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 03a891169..22e429b7e 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "गिफ्ट कार्ड जनरेट हुआ", "open_gift_card": "गिफ्ट कार्ड खोलें", "contact_support": "सहायता से संपर्क करें", - "gift_cards_unavailable": "उपहार कार्ड इस समय केवल मोनेरो, बिटकॉइन और लिटकोइन के माध्यम से खरीदने के लिए उपलब्ध हैं" + "gift_cards_unavailable": "उपहार कार्ड इस समय केवल मोनेरो, बिटकॉइन और लिटकोइन के माध्यम से खरीदने के लिए उपलब्ध हैं", + "unmatched_currencies": "आपके वर्तमान वॉलेट की मुद्रा स्कैन किए गए क्यूआर से मेल नहीं खाती" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index c25b54eb8..ea29a7491 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Poklon kartica je generirana", "open_gift_card": "Otvori darovnu karticu", "contact_support": "Kontaktirajte podršku", - "gift_cards_unavailable": "Poklon kartice trenutno su dostupne za kupnju samo putem Monera, Bitcoina i Litecoina" + "gift_cards_unavailable": "Poklon kartice trenutno su dostupne za kupnju samo putem Monera, Bitcoina i Litecoina", + "unmatched_currencies": "Valuta vašeg trenutnog novčanika ne odgovara onoj na skeniranom QR-u" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 8383c9ad9..2e0793283 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Il buono regalo è stato generato", "open_gift_card": "Apri carta regalo", "contact_support": "Contatta l'assistenza", - "gift_cards_unavailable": "Le carte regalo sono disponibili per l'acquisto solo tramite Monero, Bitcoin e Litecoin in questo momento" + "gift_cards_unavailable": "Le carte regalo sono disponibili per l'acquisto solo tramite Monero, Bitcoin e Litecoin in questo momento", + "unmatched_currencies": "La valuta del tuo portafoglio attuale non corrisponde a quella del QR scansionato" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 0ee7b5f29..e0bd967e9 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "ギフトカードが生成されます", "open_gift_card": "オープンギフトカード", "contact_support": "サポートに連絡する", - "gift_cards_unavailable": "現時点では、ギフトカードはMonero、Bitcoin、Litecoinからのみ購入できます。" + "gift_cards_unavailable": "現時点では、ギフトカードはMonero、Bitcoin、Litecoinからのみ購入できます。", + "unmatched_currencies": "現在のウォレットの通貨がスキャンされたQRの通貨と一致しません" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index d7ee849aa..5f60de560 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "기프트 카드가 생성되었습니다", "open_gift_card": "기프트 카드 열기", "contact_support": "지원팀에 문의", - "gift_cards_unavailable": "기프트 카드는 현재 Monero, Bitcoin 및 Litecoin을 통해서만 구매할 수 있습니다." + "gift_cards_unavailable": "기프트 카드는 현재 Monero, Bitcoin 및 Litecoin을 통해서만 구매할 수 있습니다.", + "unmatched_currencies": "현재 지갑의 통화가 스캔한 QR의 통화와 일치하지 않습니다." } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 967cf1e38..e9c43fc01 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Cadeaukaart is gegenereerd", "open_gift_card": "Geschenkkaart openen", "contact_support": "Contact opnemen met ondersteuning", - "gift_cards_unavailable": "Cadeaubonnen kunnen momenteel alleen worden gekocht via Monero, Bitcoin en Litecoin" + "gift_cards_unavailable": "Cadeaubonnen kunnen momenteel alleen worden gekocht via Monero, Bitcoin en Litecoin", + "unmatched_currencies": "De valuta van uw huidige portemonnee komt niet overeen met die van de gescande QR" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index be58b6a17..42bdcde86 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Karta podarunkowa jest generowana", "open_gift_card": "Otwórz kartę podarunkową", "contact_support": "Skontaktuj się z pomocą techniczną", - "gift_cards_unavailable": "Karty podarunkowe można obecnie kupić tylko za pośrednictwem Monero, Bitcoin i Litecoin" + "gift_cards_unavailable": "Karty podarunkowe można obecnie kupić tylko za pośrednictwem Monero, Bitcoin i Litecoin", + "unmatched_currencies": "Waluta Twojego obecnego portfela nie odpowiada walucie zeskanowanego kodu QR" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 50aa25100..8d2d52ded 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Cartão presente é gerado", "open_gift_card": "Abrir vale-presente", "contact_support": "Contatar Suporte", - "gift_cards_unavailable": "Os cartões-presente estão disponíveis para compra apenas através do Monero, Bitcoin e Litecoin no momento" + "gift_cards_unavailable": "Os cartões-presente estão disponíveis para compra apenas através do Monero, Bitcoin e Litecoin no momento", + "unmatched_currencies": "A moeda da sua carteira atual não corresponde à do QR digitalizado" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index ce8109512..0cd899be4 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -632,5 +632,6 @@ "gift_card_is_generated": "Подарочная карта сгенерирована", "open_gift_card": "Открыть подарочную карту", "contact_support": "Связаться со службой поддержки", - "gift_cards_unavailable": "В настоящее время подарочные карты можно приобрести только через Monero, Bitcoin и Litecoin." + "gift_cards_unavailable": "В настоящее время подарочные карты можно приобрести только через Monero, Bitcoin и Litecoin.", + "unmatched_currencies": "Валюта вашего текущего кошелька не соответствует валюте отсканированного QR-кода." } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 04e270d57..8ca95cae4 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -631,5 +631,6 @@ "gift_card_is_generated": "Подарункова картка створена", "open_gift_card": "Відкрити подарункову картку", "contact_support": "Звернутися до служби підтримки", - "gift_cards_unavailable": "Наразі подарункові картки можна придбати лише через Monero, Bitcoin і Litecoin" + "gift_cards_unavailable": "Наразі подарункові картки можна придбати лише через Monero, Bitcoin і Litecoin", + "unmatched_currencies": "Валюта вашого гаманця не збігається з валютою сканованого QR-коду" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 14af48137..2c5eb6dfc 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -630,5 +630,6 @@ "gift_card_is_generated": "礼品卡生成", "open_gift_card": "打开礼品卡", "contact_support": "联系支持", - "gift_cards_unavailable": "目前只能通过门罗币、比特币和莱特币购买礼品卡" + "gift_cards_unavailable": "目前只能通过门罗币、比特币和莱特币购买礼品卡", + "unmatched_currencies": "您当前钱包的货币与扫描的 QR 的货币不匹配" } From 13a95ab11f6205f312d101e47f6e4d4aa6c1aee6 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Tue, 6 Sep 2022 09:09:44 +0300 Subject: [PATCH 004/100] fix color for login back button --- lib/src/screens/ionia/auth/ionia_login_page.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/src/screens/ionia/auth/ionia_login_page.dart b/lib/src/screens/ionia/auth/ionia_login_page.dart index bcbc0fee3..44df933b5 100644 --- a/lib/src/screens/ionia/auth/ionia_login_page.dart +++ b/lib/src/screens/ionia/auth/ionia_login_page.dart @@ -26,9 +26,6 @@ class IoniaLoginPage extends BasePage { final IoniaAuthViewModel _authViewModel; - @override - Color get titleColor => Colors.black; - final TextEditingController _emailController; @override From 406707fa5862cdb5de832ccd5378ad9b1c283fd1 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Tue, 13 Sep 2022 08:13:20 +0300 Subject: [PATCH 005/100] fix partial redemption --- lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart index 4bb76848f..c85108be4 100644 --- a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart +++ b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart @@ -149,7 +149,7 @@ class IoniaCustomRedeemPage extends BasePage { padding: EdgeInsets.only(bottom: 12), child: PrimaryButton( onPressed: () { - Navigator.of(context).pop(_amountController.text); + Navigator.of(context).pop(ioniaCustomRedeemViewModel.remaining.toString()); }, isDisabled: ioniaCustomRedeemViewModel.disableRedeem, text: S.of(context).add_custom_redemption, From a6d5a145b9a7edd5e112c16891232355430f7d0c Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 24 Oct 2022 14:47:39 +0300 Subject: [PATCH 006/100] flutter update fixes --- cw_core/lib/crypto_currency.dart | 364 +++++++++---------------------- 1 file changed, 106 insertions(+), 258 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index c6e0c02c2..d348ebdd6 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -137,272 +137,120 @@ class CryptoCurrency extends EnumerableItem with Serializable { static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 61); static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 62); + static const mapFromInt = { + 0: CryptoCurrency.xmr, + 1: CryptoCurrency.ada, + 2: CryptoCurrency.bch, + 3: CryptoCurrency.bnb, + 4: CryptoCurrency.btc, + 5: CryptoCurrency.dai, + 6: CryptoCurrency.dash, + 7: CryptoCurrency.eos, + 8: CryptoCurrency.eth, + 9: CryptoCurrency.ltc, + 10: CryptoCurrency.nano, + 11: CryptoCurrency.trx, + 12: CryptoCurrency.usdt, + 13: CryptoCurrency.usdterc20, + 14: CryptoCurrency.xlm, + 15: CryptoCurrency.xrp, + 16: CryptoCurrency.xhv, + 17: CryptoCurrency.xag, + 18: CryptoCurrency.xau, + 19: CryptoCurrency.xaud, + 20: CryptoCurrency.xbtc, + 21: CryptoCurrency.xcad, + 22: CryptoCurrency.xchf, + 23: CryptoCurrency.xcny, + 24: CryptoCurrency.xeur, + 25: CryptoCurrency.xgbp, + 26: CryptoCurrency.xjpy, + 27: CryptoCurrency.xnok, + 28: CryptoCurrency.xnzd, + 29: CryptoCurrency.xusd, + 30: CryptoCurrency.ape, + 31: CryptoCurrency.avaxc, + 32: CryptoCurrency.btt, + 33: CryptoCurrency.bttbsc, + 34: CryptoCurrency.doge, + 35: CryptoCurrency.firo, + 36: CryptoCurrency.usdttrc20, + 37: CryptoCurrency.hbar, + 38: CryptoCurrency.sc, + 39: CryptoCurrency.sol, + 40: CryptoCurrency.usdc, + 41: CryptoCurrency.usdcsol, + 42: CryptoCurrency.zaddr, + 43: CryptoCurrency.zec, + 44: CryptoCurrency.zen, + 45: CryptoCurrency.xvg + }; + static const mapFromString = { + 'xmr': CryptoCurrency.xmr, + 'ada': CryptoCurrency.ada, + 'bch': CryptoCurrency.bch, + 'bnb': CryptoCurrency.bnb, + 'btc': CryptoCurrency.btc, + 'dai': CryptoCurrency.dai, + 'dash': CryptoCurrency.dash, + 'eos': CryptoCurrency.eos, + 'eth': CryptoCurrency.eth, + 'ltc': CryptoCurrency.ltc, + 'nano': CryptoCurrency.nano, + 'trx': CryptoCurrency.trx, + 'usdt': CryptoCurrency.usdt, + 'usdterc20': CryptoCurrency.usdterc20, + 'xlm': CryptoCurrency.xlm, + 'xrp': CryptoCurrency.xrp, + 'xhv': CryptoCurrency.xhv, + 'xag': CryptoCurrency.xag, + 'xau': CryptoCurrency.xau, + 'xaud': CryptoCurrency.xaud, + 'xbtc': CryptoCurrency.xbtc, + 'xcad': CryptoCurrency.xcad, + 'xchf': CryptoCurrency.xchf, + 'xcny': CryptoCurrency.xcny, + 'xeur': CryptoCurrency.xeur, + 'xgbp': CryptoCurrency.xgbp, + 'xjpy': CryptoCurrency.xjpy, + 'xnok': CryptoCurrency.xnok, + 'xnzd': CryptoCurrency.xnzd, + 'xusd': CryptoCurrency.xusd, + 'ape': CryptoCurrency.ape, + 'avaxc': CryptoCurrency.avaxc, + 'btt': CryptoCurrency.btt, + 'bttbsc': CryptoCurrency.bttbsc, + 'doge': CryptoCurrency.doge, + 'firo': CryptoCurrency.firo, + 'usdttrc20': CryptoCurrency.usdttrc20, + 'hbar': CryptoCurrency.hbar, + 'sc': CryptoCurrency.sc, + 'sol': CryptoCurrency.sol, + 'usdc': CryptoCurrency.usdc, + 'usdcsol': CryptoCurrency.usdcsol, + 'zaddr': CryptoCurrency.zaddr, + 'zec': CryptoCurrency.zec, + 'zen': CryptoCurrency.zen, + 'xvg': CryptoCurrency.xvg + }; static CryptoCurrency deserialize({required int raw}) { - switch (raw) { - case 0: - return CryptoCurrency.xmr; - case 1: - return CryptoCurrency.ada; - case 2: - return CryptoCurrency.bch; - case 3: - return CryptoCurrency.bnb; - case 4: - return CryptoCurrency.btc; - case 5: - return CryptoCurrency.dai; - case 6: - return CryptoCurrency.dash; - case 7: - return CryptoCurrency.eos; - case 8: - return CryptoCurrency.eth; - case 9: - return CryptoCurrency.ltc; - case 10: - return CryptoCurrency.nano; - case 11: - return CryptoCurrency.trx; - case 12: - return CryptoCurrency.usdt; - case 13: - return CryptoCurrency.usdterc20; - case 14: - return CryptoCurrency.xlm; - case 15: - return CryptoCurrency.xrp; - case 16: - return CryptoCurrency.xhv; - case 17: - return CryptoCurrency.xag; - case 18: - return CryptoCurrency.xau; - case 19: - return CryptoCurrency.xaud; - case 20: - return CryptoCurrency.xbtc; - case 21: - return CryptoCurrency.xcad; - case 22: - return CryptoCurrency.xchf; - case 23: - return CryptoCurrency.xcny; - case 24: - return CryptoCurrency.xeur; - case 25: - return CryptoCurrency.xgbp; - case 26: - return CryptoCurrency.xjpy; - case 27: - return CryptoCurrency.xnok; - case 28: - return CryptoCurrency.xnzd; - case 29: - return CryptoCurrency.xusd; - case 30: - return CryptoCurrency.ape; - case 31: - return CryptoCurrency.avaxc; - case 32: - return CryptoCurrency.btt; - case 33: - return CryptoCurrency.bttbsc; - case 34: - return CryptoCurrency.doge; - case 35: - return CryptoCurrency.firo; - case 36: - return CryptoCurrency.usdttrc20; - case 37: - return CryptoCurrency.hbar; - case 38: - return CryptoCurrency.sc; - case 39: - return CryptoCurrency.sol; - case 40: - return CryptoCurrency.usdc; - case 41: - return CryptoCurrency.usdcsol; - case 42: - return CryptoCurrency.zaddr; - case 43: - return CryptoCurrency.zec; - case 44: - return CryptoCurrency.zen; - case 45: - return CryptoCurrency.xvg; - case 46: - return CryptoCurrency.usdcpoly; - case 47: - return CryptoCurrency.dcr; - case 48: - return CryptoCurrency.husd; - case 49: - return CryptoCurrency.kmd; - case 50: - return CryptoCurrency.mana; - case 51: - return CryptoCurrency.maticpoly; - case 52: - return CryptoCurrency.matic; - case 53: - return CryptoCurrency.mkr; - case 54: - return CryptoCurrency.near; - case 55: - return CryptoCurrency.oxt; - case 56: - return CryptoCurrency.paxg; - case 57: - return CryptoCurrency.pivx; - case 58: - return CryptoCurrency.rune; - case 59: - return CryptoCurrency.rvn; - case 60: - return CryptoCurrency.scrt; - case 61: - return CryptoCurrency.uni; - case 62: - return CryptoCurrency.stx; - default: - throw Exception('Unexpected token: $raw for CryptoCurrency deserialize'); + + if (CryptoCurrency.mapFromInt[raw] == null) { + final s = 'Unexpected token: $raw for CryptoCurrency deserialize'; + throw ArgumentError.value(raw, 'raw', s); } + return CryptoCurrency.mapFromInt[raw]!; } static CryptoCurrency fromString(String raw) { - switch (raw.toLowerCase()) { - case 'xmr': - return CryptoCurrency.xmr; - case 'ada': - return CryptoCurrency.ada; - case 'bch': - return CryptoCurrency.bch; - case 'bnbmainnet': - return CryptoCurrency.bnb; - case 'btc': - return CryptoCurrency.btc; - case 'dai': - return CryptoCurrency.dai; - case 'dash': - return CryptoCurrency.dash; - case 'eos': - return CryptoCurrency.eos; - case 'eth': - return CryptoCurrency.eth; - case 'ltc': - return CryptoCurrency.ltc; - case 'nano': - return CryptoCurrency.nano; - case 'trx': - return CryptoCurrency.trx; - case 'usdc': - return CryptoCurrency.usdc; - case 'usdterc20': - return CryptoCurrency.usdterc20; - case 'xlm': - return CryptoCurrency.xlm; - case 'xrp': - return CryptoCurrency.xrp; - case 'xhv': - return CryptoCurrency.xhv; - case 'xag': - return CryptoCurrency.xag; - case 'xau': - return CryptoCurrency.xau; - case 'xaud': - return CryptoCurrency.xaud; - case 'xbtc': - return CryptoCurrency.xbtc; - case 'xcad': - return CryptoCurrency.xcad; - case 'xchf': - return CryptoCurrency.xchf; - case 'xcny': - return CryptoCurrency.xcny; - case 'xeur': - return CryptoCurrency.xeur; - case 'xgbp': - return CryptoCurrency.xgbp; - case 'xjpy': - return CryptoCurrency.xjpy; - case 'xnok': - return CryptoCurrency.xnok; - case 'xnzd': - return CryptoCurrency.xnzd; - case 'xusd': - return CryptoCurrency.xusd; - case 'ape': - return CryptoCurrency.ape; - case 'avax': - return CryptoCurrency.avaxc; - case 'btt': - return CryptoCurrency.btt; - case 'bttbsc': - return CryptoCurrency.bttbsc; - case 'doge': - return CryptoCurrency.doge; - case 'firo': - return CryptoCurrency.firo; - case 'usdttrc20': - return CryptoCurrency.usdttrc20; - case 'hbar': - return CryptoCurrency.hbar; - case 'sc': - return CryptoCurrency.sc; - case 'sol': - return CryptoCurrency.sol; - case 'usdt': - return CryptoCurrency.usdt; - case 'usdcsol': - return CryptoCurrency.usdcsol; - case 'zaddr': - return CryptoCurrency.zaddr; - case 'zec': - return CryptoCurrency.zec; - case 'zen': - return CryptoCurrency.zen; - case 'xvg': - return CryptoCurrency.xvg; - case 'usdcpoly': - return CryptoCurrency.usdcpoly; - case 'dcr': - return CryptoCurrency.dcr; - case 'husd': - return CryptoCurrency.husd; - case 'kmd': - return CryptoCurrency.kmd; - case 'mana': - return CryptoCurrency.mana; - case 'maticpoly': - return CryptoCurrency.maticpoly; - case 'matic': - return CryptoCurrency.matic; - case 'mkr': - return CryptoCurrency.mkr; - case 'near': - return CryptoCurrency.near; - case 'oxt': - return CryptoCurrency.oxt; - case 'paxg': - return CryptoCurrency.paxg; - case 'pivx': - return CryptoCurrency.pivx; - case 'rune': - return CryptoCurrency.rune; - case 'rvn': - return CryptoCurrency.rvn; - case 'scrt': - return CryptoCurrency.scrt; - case 'uni': - return CryptoCurrency.uni; - case 'stx': - return CryptoCurrency.stx; - default: - throw Exception('Unexpected token: $raw for CryptoCurrency fromString'); + + if (CryptoCurrency.mapFromString[raw.toLowerCase()] == null) { + final s = 'Unexpected token: $raw for CryptoCurrency fromString'; + throw ArgumentError.value(raw, 'raw', s); } + return CryptoCurrency.mapFromString[raw.toLowerCase()]!; } @override From afa16fbe1c33a07b1b5ff5a8095ffa1f591634d0 Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 24 Oct 2022 15:01:33 +0300 Subject: [PATCH 007/100] add new assets --- cw_core/lib/crypto_currency.dart | 38 ++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index d348ebdd6..446c667fd 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -183,7 +183,24 @@ class CryptoCurrency extends EnumerableItem with Serializable { 42: CryptoCurrency.zaddr, 43: CryptoCurrency.zec, 44: CryptoCurrency.zen, - 45: CryptoCurrency.xvg + 45: CryptoCurrency.xvg, + 46: CryptoCurrency.usdcpoly, + 47: CryptoCurrency.dcr, + 48: CryptoCurrency.husd, + 49: CryptoCurrency.kmd, + 50: CryptoCurrency.mana, + 51: CryptoCurrency.maticpoly, + 52: CryptoCurrency.matic, + 53: CryptoCurrency.mkr, + 54: CryptoCurrency.near, + 55: CryptoCurrency.oxt, + 56: CryptoCurrency.paxg, + 57: CryptoCurrency.pivx, + 58: CryptoCurrency.rune, + 59: CryptoCurrency.rvn, + 60: CryptoCurrency.scrt, + 61: CryptoCurrency.uni, + 62: CryptoCurrency.stx }; static const mapFromString = { @@ -232,7 +249,24 @@ class CryptoCurrency extends EnumerableItem with Serializable { 'zaddr': CryptoCurrency.zaddr, 'zec': CryptoCurrency.zec, 'zen': CryptoCurrency.zen, - 'xvg': CryptoCurrency.xvg + 'xvg': CryptoCurrency.xvg, + 'usdcpoly': CryptoCurrency.usdcpoly, + 'dcr': CryptoCurrency.dcr, + 'husd': CryptoCurrency.husd, + 'kmd': CryptoCurrency.kmd, + 'mana': CryptoCurrency.mana, + 'maticpoly': CryptoCurrency.maticpoly, + 'matic': CryptoCurrency.matic, + 'mkr': CryptoCurrency.mkr, + 'near': CryptoCurrency.near, + 'oxt': CryptoCurrency.oxt, + 'paxg': CryptoCurrency.paxg, + 'pivx': CryptoCurrency.pivx, + 'rune': CryptoCurrency.rune, + 'rvn': CryptoCurrency.rvn, + 'scrt': CryptoCurrency.scrt, + 'uni': CryptoCurrency.uni, + 'stx': CryptoCurrency.stx }; static CryptoCurrency deserialize({required int raw}) { From f078457c7b6eab9cb8977b777727e366e090f636 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Tue, 8 Nov 2022 16:56:27 +0200 Subject: [PATCH 008/100] Update Branch to null safety Add deep linking to iOS --- android/app/src/main/AndroidManifestBase.xml | 2 +- ios/Runner/InfoBase.plist | 54 +++++++++++++++----- lib/di.dart | 4 +- lib/main.dart | 29 +++++++---- lib/router.dart | 2 +- lib/src/screens/send/widgets/send_card.dart | 9 ++-- lib/utils/payment_request.dart | 6 +-- lib/view_model/send/send_view_model.dart | 4 +- 8 files changed, 74 insertions(+), 36 deletions(-) diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml index f4023f532..8d94ba24f 100644 --- a/android/app/src/main/AndroidManifestBase.xml +++ b/android/app/src/main/AndroidManifestBase.xml @@ -38,7 +38,7 @@ android:scheme="cakewallet" android:host="y.at" /> - + diff --git a/ios/Runner/InfoBase.plist b/ios/Runner/InfoBase.plist index ad8816ca3..794391665 100644 --- a/ios/Runner/InfoBase.plist +++ b/ios/Runner/InfoBase.plist @@ -21,18 +21,48 @@ CFBundleSignature ???? CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLName - y.at - CFBundleURLSchemes - - cakewallet - - - + + + CFBundleTypeRole + Editor + CFBundleURLName + y.at + CFBundleURLSchemes + + cakewallet + + + + CFBundleTypeRole + Editor + CFBundleURLName + bitcoin + CFBundleURLSchemes + + bitcoin + + + + CFBundleTypeRole + Editor + CFBundleURLName + monero + CFBundleURLSchemes + + monero + + + + CFBundleTypeRole + Editor + CFBundleURLName + litecoin + CFBundleURLSchemes + + litecoin + + + CFBundleVersion $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS diff --git a/lib/di.dart b/lib/di.dart index 9a554b25a..3481d783e 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -377,8 +377,8 @@ Future setup( getIt.get(), _transactionDescriptionBox)); - getIt.registerFactoryParam( - (PaymentRequest initialPaymentRequest, _) => SendPage( + getIt.registerFactoryParam( + (PaymentRequest? initialPaymentRequest, _) => SendPage( sendViewModel: getIt.get(), settingsViewModel: getIt.get(), initialPaymentRequest: initialPaymentRequest, diff --git a/lib/main.dart b/lib/main.dart index 7a3cc5ffe..8e971ec4b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -39,6 +39,8 @@ import 'package:cw_core/unspent_coins_info.dart'; import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; +import 'src/screens/auth/auth_page.dart'; + final navigatorKey = GlobalKey(); final rootKey = GlobalKey(); @@ -213,15 +215,15 @@ class AppState extends State with SingleTickerProviderStateMixin { super.dispose(); } - /// handle app links while the app is already started - be it in - /// the foreground or in the background. + /// handle app links while the app is already started + /// whether its in the foreground or in the background. Future initUniLinks() async { try { - stream = getUriLinksStream().listen((Uri uri) { + stream = uriLinkStream.listen((Uri? uri) { handleDeepLinking(uri); }); - final Uri initialUri = await getInitialUri(); + final Uri? initialUri = await getInitialUri(); handleDeepLinking(initialUri); } catch (e) { @@ -229,14 +231,21 @@ class AppState extends State with SingleTickerProviderStateMixin { } } - void handleDeepLinking(Uri uri) { + void handleDeepLinking(Uri? uri) { if (uri == null || !mounted) return; - Navigator.pushNamed( - navigatorKey.currentContext, - Routes.send, - arguments: PaymentRequest.fromUri(uri), - ); + Navigator.of(navigatorKey.currentContext!).pushNamed(Routes.auth, + arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { + if (isAuthenticatedSuccessfully) { + auth.close(route: Routes.send, arguments: PaymentRequest.fromUri(uri)); + } + }); + + // Navigator.pushNamed( + // navigatorKey.currentContext!, + // Routes.send, + // arguments: PaymentRequest.fromUri(uri), + // ); } Future _handleInitialUri() async { diff --git a/lib/router.dart b/lib/router.dart index 08c91db22..065e91a31 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -210,7 +210,7 @@ Route createRoute(RouteSettings settings) { builder: (_) => getIt.get()); case Routes.send: - final initialPaymentRequest = settings.arguments as PaymentRequest; + final initialPaymentRequest = settings.arguments as PaymentRequest?; return CupertinoPageRoute( fullscreenDialog: true, builder: (_) => getIt.get( diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index acc53e782..07b33843a 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -1,4 +1,3 @@ -import 'dart:ui'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cw_core/transaction_priority.dart'; @@ -44,7 +43,7 @@ class SendCardState extends State required this.output, required this.sendViewModel, this.initialPaymentRequest}) - : addressController = TextEditingController(text: initialPaymentRequest?.address?.toLowerCase()), + : addressController = TextEditingController(text: initialPaymentRequest?.address.toLowerCase()), cryptoAmountController = TextEditingController(text: initialPaymentRequest?.amount), fiatAmountController = TextEditingController(), noteController = TextEditingController(), @@ -77,8 +76,8 @@ class SendCardState extends State /// if the current wallet doesn't match the one in the qr code if (initialPaymentRequest != null && - sendViewModel.walletCurrencyName != initialPaymentRequest.scheme?.toLowerCase()) { - WidgetsBinding.instance?.addPostFrameCallback((timeStamp) { + sendViewModel.walletCurrencyName != initialPaymentRequest!.scheme.toLowerCase()) { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { showPopUp( context: context, builder: (BuildContext context) { @@ -544,7 +543,7 @@ class SendCardState extends State addressController.text = output.address; } if (output.cryptoAmount.isNotEmpty || - sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme?.toLowerCase()) { + sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme.toLowerCase()) { cryptoAmountController.text = output.cryptoAmount; } fiatAmountController.text = output.fiatAmount; diff --git a/lib/utils/payment_request.dart b/lib/utils/payment_request.dart index 0a6306cd8..88730f037 100644 --- a/lib/utils/payment_request.dart +++ b/lib/utils/payment_request.dart @@ -1,7 +1,7 @@ class PaymentRequest { - PaymentRequest(this.address, this.amount, this.note, {this.scheme}); + PaymentRequest(this.address, this.amount, this.note, this.scheme); - factory PaymentRequest.fromUri(Uri uri) { + factory PaymentRequest.fromUri(Uri? uri) { var address = ""; var amount = ""; var note = ""; @@ -15,7 +15,7 @@ class PaymentRequest { scheme = uri.scheme; } - return PaymentRequest(address, amount, note, scheme: scheme); + return PaymentRequest(address, amount, note, scheme); } final String address; diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index a17635a89..5632f8855 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -137,7 +137,7 @@ abstract class SendViewModelBase with Store { PendingTransaction? pendingTransaction; @computed - String get balance => balanceViewModel.availableBalance ?? '0.0'; + String get balance => balanceViewModel.availableBalance; @computed bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus; @@ -164,7 +164,7 @@ abstract class SendViewModelBase with Store { WalletType get walletType => _wallet.type; - String get walletCurrencyName => _wallet.currency.name.toLowerCase(); + String? get walletCurrencyName => _wallet.currency.name?.toLowerCase(); bool get hasCurrecyChanger => walletType == WalletType.haven; From dfb52223e02ba2c727c8f2561ea6bf388535a349 Mon Sep 17 00:00:00 2001 From: Serhii Date: Tue, 8 Nov 2022 17:49:51 +0200 Subject: [PATCH 009/100] fix increasing brightness brightness decreases after leaving "gift card barcode screen" --- lib/main.dart | 2 + .../cards/ionia_gift_card_detail_page.dart | 16 +++-- lib/utils/route_aware.dart | 65 +++++++++++++++++++ 3 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 lib/utils/route_aware.dart diff --git a/lib/main.dart b/lib/main.dart index 3cd5679b3..035552eb7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,6 +40,7 @@ import 'package:cake_wallet/wallet_type_utils.dart'; final navigatorKey = GlobalKey(); final rootKey = GlobalKey(); +final RouteObserver routeObserver = RouteObserver(); Future main() async { try { @@ -282,6 +283,7 @@ class AppState extends State with SingleTickerProviderStateMixin { authenticationStore: authenticationStore, navigatorKey: navigatorKey, child: MaterialApp( + navigatorObservers: [routeObserver], navigatorKey: navigatorKey, debugShowCheckedModeBanner: false, theme: settingsStore.theme, diff --git a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart index 1c768fa17..d2ff358ee 100644 --- a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart @@ -11,6 +11,7 @@ import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart'; import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; +import 'package:cake_wallet/utils/route_aware.dart'; import 'package:cake_wallet/view_model/ionia/ionia_gift_card_details_view_model.dart'; import 'package:device_display_brightness/device_display_brightness.dart'; import 'package:flutter/material.dart'; @@ -47,10 +48,7 @@ class IoniaGiftCardDetailPage extends BasePage { //highlightColor: Colors.transparent, //splashColor: Colors.transparent, //padding: EdgeInsets.all(0), - onPressed: () { - onClose(context); - DeviceDisplayBrightness.setBrightness(viewModel.brightness); - }, + onPressed: ()=> onClose(context), child: _backButton), ), ), @@ -67,7 +65,6 @@ class IoniaGiftCardDetailPage extends BasePage { @override Widget body(BuildContext context) { - viewModel.increaseBrightness(); reaction((_) => viewModel.redeemState, (ExecutionState state) { if (state is FailureState) { WidgetsBinding.instance.addPostFrameCallback((_) { @@ -84,7 +81,12 @@ class IoniaGiftCardDetailPage extends BasePage { } }); - return ScrollableWithBottomSection( + return RouteAwareWidget( + pushToWidget: ()=> viewModel.increaseBrightness(), + pushToNextWidget: ()=> DeviceDisplayBrightness.setBrightness(viewModel.brightness), + popNextWidget: ()=> viewModel.increaseBrightness(), + popWidget: ()=> DeviceDisplayBrightness.setBrightness(viewModel.brightness), + child: ScrollableWithBottomSection( contentPadding: EdgeInsets.all(24), content: Column( children: [ @@ -163,7 +165,7 @@ class IoniaGiftCardDetailPage extends BasePage { }, ), ), - ); + )); } Widget buildIoniaTile(BuildContext context, {required String title, required String subTitle}) { diff --git a/lib/utils/route_aware.dart b/lib/utils/route_aware.dart new file mode 100644 index 000000000..28c72c4a4 --- /dev/null +++ b/lib/utils/route_aware.dart @@ -0,0 +1,65 @@ +import 'package:flutter/material.dart'; +import 'package:cake_wallet/main.dart'; + +class RouteAwareWidget extends StatefulWidget { + RouteAwareWidget( + {required this.child, + this.pushToWidget, + this.pushToNextWidget, + this.popWidget, + this.popNextWidget}); + + final Widget child; + final Function()? pushToWidget; + final Function()? pushToNextWidget; + final Function()? popWidget; + final Function()? popNextWidget; + + @override + State createState() => RouteAwareWidgetState(); +} + +class RouteAwareWidgetState extends State with RouteAware { + @override + void didChangeDependencies() { + super.didChangeDependencies(); + routeObserver.subscribe(this, ModalRoute.of(context) as PageRoute); + } + + @override + void dispose() { + routeObserver.unsubscribe(this); + super.dispose(); + } + + @override + void didPush() { + if (widget.pushToWidget != null) { + widget.pushToWidget!(); + } + } + + @override + void didPushNext() { + if (widget.pushToNextWidget != null) { + widget.pushToNextWidget!(); + } + } + + @override + void didPop() { + if (widget.popWidget != null) { + widget.popWidget!(); + } + } + + @override + void didPopNext() { + if (widget.popNextWidget != null) { + widget.popNextWidget!(); + } + } + + @override + Widget build(BuildContext context) => widget.child; +} From f68798dd197b3a09ac3b23f59c45fef959785562 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Tue, 8 Nov 2022 18:12:01 +0200 Subject: [PATCH 010/100] Move handling deep links to app root --- lib/main.dart | 44 ---------------------------------- lib/src/screens/root/root.dart | 39 +++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 45 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 8e971ec4b..6431d2f6e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,7 +5,6 @@ import 'package:cake_wallet/buy/order.dart'; import 'package:cake_wallet/ionia/ionia_category.dart'; import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/store/yat/yat_store.dart'; -import 'package:cake_wallet/utils/payment_request.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -39,8 +38,6 @@ import 'package:cw_core/unspent_coins_info.dart'; import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/wallet_type_utils.dart'; -import 'src/screens/auth/auth_page.dart'; - final navigatorKey = GlobalKey(); final rootKey = GlobalKey(); @@ -205,47 +202,6 @@ class AppState extends State with SingleTickerProviderStateMixin { super.initState(); //_handleIncomingLinks(); //_handleInitialUri(); - - initUniLinks(); - } - - @override - void dispose() { - stream?.cancel(); - super.dispose(); - } - - /// handle app links while the app is already started - /// whether its in the foreground or in the background. - Future initUniLinks() async { - try { - stream = uriLinkStream.listen((Uri? uri) { - handleDeepLinking(uri); - }); - - final Uri? initialUri = await getInitialUri(); - - handleDeepLinking(initialUri); - } catch (e) { - print(e); - } - } - - void handleDeepLinking(Uri? uri) { - if (uri == null || !mounted) return; - - Navigator.of(navigatorKey.currentContext!).pushNamed(Routes.auth, - arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { - if (isAuthenticatedSuccessfully) { - auth.close(route: Routes.send, arguments: PaymentRequest.fromUri(uri)); - } - }); - - // Navigator.pushNamed( - // navigatorKey.currentContext!, - // Routes.send, - // arguments: PaymentRequest.fromUri(uri), - // ); } Future _handleInitialUri() async { diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index c507f6e1f..014dd0451 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -1,10 +1,12 @@ import 'dart:async'; +import 'package:cake_wallet/utils/payment_request.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/store/app_store.dart'; import 'package:cake_wallet/store/authentication_store.dart'; import 'package:cake_wallet/entities/qr_scanner.dart'; +import 'package:uni_links/uni_links.dart'; class Root extends StatefulWidget { Root( @@ -35,6 +37,9 @@ class RootState extends State with WidgetsBindingObserver { bool _isInactive; bool _postFrameCallback; + StreamSubscription? stream; + Uri? launchUri; + @override void initState() { _isInactiveController = StreamController.broadcast(); @@ -42,6 +47,34 @@ class RootState extends State with WidgetsBindingObserver { _postFrameCallback = false; WidgetsBinding.instance.addObserver(this); super.initState(); + + initUniLinks(); + } + + @override + void dispose() { + stream?.cancel(); + super.dispose(); + } + + /// handle app links while the app is already started + /// whether its in the foreground or in the background. + Future initUniLinks() async { + try { + stream = uriLinkStream.listen((Uri? uri) { + handleDeepLinking(uri); + }); + + handleDeepLinking(await getInitialUri()); + } catch (e) { + print(e); + } + } + + void handleDeepLinking(Uri? uri) { + if (uri == null || !mounted) return; + + launchUri = uri; } @override @@ -75,7 +108,11 @@ class RootState extends State with WidgetsBindingObserver { } _reset(); - auth.close(); + auth.close( + route: launchUri != null ? Routes.send : null, + arguments: PaymentRequest.fromUri(launchUri), + ); + launchUri = null; }); }); } From 1f08d8747159a6455a637544714bf69bf9d9eb8b Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 10 Nov 2022 13:25:03 +0200 Subject: [PATCH 011/100] Rework filter on the transactions list screen --- .../exchange_provider_description.dart | 5 + .../dashboard/widgets/filter_tile.dart | 7 +- .../dashboard/widgets/filter_widget.dart | 231 ++++++++++-------- lib/src/widgets/rounded_checkbox.dart | 91 +++++++ lib/store/dashboard/trade_filter_store.dart | 82 ++++--- .../dashboard/transaction_filter_store.dart | 57 +++-- .../dashboard/dashboard_view_model.dart | 28 ++- lib/view_model/dashboard/filter_item.dart | 6 +- 8 files changed, 350 insertions(+), 157 deletions(-) create mode 100644 lib/src/widgets/rounded_checkbox.dart diff --git a/lib/exchange/exchange_provider_description.dart b/lib/exchange/exchange_provider_description.dart index f9e359454..2fd231085 100644 --- a/lib/exchange/exchange_provider_description.dart +++ b/lib/exchange/exchange_provider_description.dart @@ -24,6 +24,9 @@ class ExchangeProviderDescription extends EnumerableItem static const simpleSwap = ExchangeProviderDescription(title: 'SimpleSwap', raw: 4, image: 'assets/images/simpleSwap.png'); + static const all = + ExchangeProviderDescription(title: 'All trades', raw: 5, image:''); + static ExchangeProviderDescription deserialize({required int raw}) { switch (raw) { case 0: @@ -36,6 +39,8 @@ class ExchangeProviderDescription extends EnumerableItem return sideShift; case 4: return simpleSwap; + case 5: + return all; default: throw Exception('Unexpected token: $raw for ExchangeProviderDescription deserialize'); } diff --git a/lib/src/screens/dashboard/widgets/filter_tile.dart b/lib/src/screens/dashboard/widgets/filter_tile.dart index 9a5646ac9..3be96073a 100644 --- a/lib/src/screens/dashboard/widgets/filter_tile.dart +++ b/lib/src/screens/dashboard/widgets/filter_tile.dart @@ -9,12 +9,7 @@ class FilterTile extends StatelessWidget { Widget build(BuildContext context) { return Container( width: double.infinity, - padding: EdgeInsets.only( - top: 18, - bottom: 18, - left: 24, - right: 24 - ), + padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 24.0), child: child, ); } diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 98d5add81..8719df562 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -6,20 +6,21 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_close_button.dart'; -import 'package:cake_wallet/src/widgets/checkbox_widget.dart'; +import 'package:cake_wallet/src/widgets/rounded_checkbox.dart'; import 'package:cake_wallet/generated/i18n.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; //import 'package:date_range_picker/date_range_picker.dart' as date_rage_picker; class FilterWidget extends StatelessWidget { FilterWidget({required this.dashboardViewModel}); final DashboardViewModel dashboardViewModel; - final backVector = Image.asset('assets/images/back_vector.png', - color: Palette.darkBlueCraiola - ); + final closeIcon = + Image.asset('assets/images/close.png', color: Palette.darkBlueCraiola); @override Widget build(BuildContext context) { + const sectionDivider = SectionDivider(); return AlertBackground( child: Stack( alignment: Alignment.center, @@ -38,118 +39,150 @@ class FilterWidget extends StatelessWidget { ), ), Padding( - padding: EdgeInsets.only( - left: 24, - right: 24, - top: 24 - ), + padding: EdgeInsets.only(left: 24, right: 24, top: 24), child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(14)), + borderRadius: BorderRadius.all(Radius.circular(24)), child: Container( - color: Theme.of(context).textTheme!.bodyText1!.decorationColor!, - child: ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemCount: dashboardViewModel.filterItems.length, - separatorBuilder: (context, _) => Container( - height: 1, - color: Theme.of(context).accentTextTheme!.subtitle1!.backgroundColor!, - ), - itemBuilder: (_, index1) { - final title = dashboardViewModel.filterItems.keys.elementAt(index1); - final section = dashboardViewModel.filterItems.values.elementAt(index1); - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 20, - left: 24, - right: 24 - ), - child: Text( - title, - style: TextStyle( - color: Theme.of(context).accentTextTheme!.subtitle1!.color!, - fontSize: 16, - fontWeight: FontWeight.w500, - fontFamily: 'Lato', - decoration: TextDecoration.none - ), + color: Theme.of(context) + .textTheme! + .bodyText1! + .decorationColor!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(24.0), + child: Text( + S.of(context).filters, + style: TextStyle( + color: Theme.of(context) + .textTheme! + .bodyText1! + .decorationColor!, + fontSize: 16, + fontFamily: 'Lato', + decoration: TextDecoration.none, ), ), - ListView.separated( - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemCount: section.length, - separatorBuilder: (context, _) => Container( - height: 1, - padding: EdgeInsets.only(left: 24), - color: Theme.of(context).textTheme!.bodyText1!.decorationColor!, - child: Container( - height: 1, - color: Theme.of(context).accentTextTheme!.subtitle1!.backgroundColor!, - ), - ), - itemBuilder: (_, index2) { - - final item = section[index2]; - final content = item.onChanged != null - ? CheckboxWidget( - value: item.value(), - caption: item.caption, - onChanged: item.onChanged - ) - : GestureDetector( - onTap: () async { - //final List picked = - //await date_rage_picker.showDatePicker( - // context: context, - // initialFirstDate: DateTime.now() - // .subtract(Duration(days: 1)), - // initialLastDate: (DateTime.now()), - // firstDate: DateTime(2015), - // lastDate: DateTime.now() - // .add(Duration(days: 1))); - - //if (picked != null && picked.length == 2) { - // dashboardViewModel.transactionFilterStore - // .changeStartDate(picked.first); - // dashboardViewModel.transactionFilterStore - // .changeEndDate(picked.last); - //} - }, - child: Padding( - padding: EdgeInsets.only(left: 32), + ), + sectionDivider, + ListView.separated( + padding: EdgeInsets.zero, + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: dashboardViewModel.filterItems.length, + separatorBuilder: (context, _) => sectionDivider, + itemBuilder: (_, index1) { + final title = dashboardViewModel.filterItems.keys + .elementAt(index1); + final section = dashboardViewModel + .filterItems.values + .elementAt(index1); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + top: 20, left: 24, right: 24), child: Text( - item.caption, + title, style: TextStyle( - color: Theme.of(context).primaryTextTheme!.headline6!.color!, - fontSize: 18, + color: Theme.of(context) + .primaryTextTheme! + .headline6! + .color!, + fontSize: 16, fontFamily: 'Lato', - fontWeight: FontWeight.w500, - decoration: TextDecoration.none - ), + fontWeight: FontWeight.bold, + decoration: TextDecoration.none), ), ), - ); + ListView.builder( + padding: + EdgeInsets.symmetric(vertical: 8.0), + shrinkWrap: true, + physics: + const NeverScrollableScrollPhysics(), + itemCount: section.length, + itemBuilder: (_, index2) { + final item = section[index2]; + final content = item.onChanged != null + ? Observer( + builder: (_) => + RoundedCheckboxWidget( + value: item.value.value, + caption: item.caption, + onChanged: item.onChanged, + currentTheme: + dashboardViewModel + .settingsStore + .currentTheme, + )) + : GestureDetector( + onTap: () async { + //final List picked = + //await date_rage_picker.showDatePicker( + // context: context, + // initialFirstDate: DateTime.now() + // .subtract(Duration(days: 1)), + // initialLastDate: (DateTime.now()), + // firstDate: DateTime(2015), + // lastDate: DateTime.now() + // .add(Duration(days: 1))); - return FilterTile(child: content); - }, - ) - ], - ); - }, - ), + //if (picked != null && picked.length == 2) { + // dashboardViewModel.transactionFilterStore + // .changeStartDate(picked.first); + // dashboardViewModel.transactionFilterStore + // .changeEndDate(picked.last); + //} + }, + child: Padding( + padding: + EdgeInsets.only(left: 32), + child: Text( + item.caption, + style: TextStyle( + color: Colors.red, + //Theme.of(context).primaryTextTheme.title.color,// + fontSize: 18, + fontFamily: 'Lato', + fontWeight: + FontWeight.w500, + decoration: + TextDecoration.none), + ), + ), + ); + + return FilterTile(child: content); + }, + ) + ], + ); + }, + ), + ]), ), ), ), ], ), - AlertCloseButton(image: backVector) + AlertCloseButton(image: closeIcon) ], ), ); } +} + +class SectionDivider extends StatelessWidget { + const SectionDivider(); + + @override + Widget build(BuildContext context) { + return Container( + height: 1, + color: Colors.red,//Fixme Theme.of(context).accentTextTheme.subhead.backgroundColor, + ); + } } \ No newline at end of file diff --git a/lib/src/widgets/rounded_checkbox.dart b/lib/src/widgets/rounded_checkbox.dart new file mode 100644 index 000000000..6e5b08f1e --- /dev/null +++ b/lib/src/widgets/rounded_checkbox.dart @@ -0,0 +1,91 @@ +import 'package:cake_wallet/palette.dart'; +import 'package:flutter/material.dart'; +import 'package:cake_wallet/themes/theme_base.dart'; + +class RoundedCheckboxWidget extends StatelessWidget { + RoundedCheckboxWidget( + {required this.value, + required this.caption, + required this.onChanged, + this.currentTheme}); + + final bool value; + final String caption; + final Function onChanged; + final ThemeBase? currentTheme; + + bool get darkTheme => currentTheme!.type == ThemeType.dark; + + @override + Widget build(BuildContext context) { + + final baseGradient = LinearGradient(colors: [ + Colors.red, //Fixme Theme.of(context).primaryTextTheme!.subtitle!.color!, + Colors.red //Fixme Theme.of(context).primaryTextTheme!.subtitle!.decorationColor!, + ], begin: Alignment.centerLeft, end: Alignment.centerRight); + + final darkThemeGradient = LinearGradient(colors: [ + Palette.blueCraiola, + Palette.blueGreyCraiola, + ], begin: Alignment.topLeft, end: Alignment.bottomRight); + + final gradient = darkTheme ? darkThemeGradient : baseGradient; + + final uncheckedColor = darkTheme + ? Colors.red //Fixme Theme.of(context).accentTextTheme.subhead.decorationColor + : Colors.white; + + final borderColor = darkTheme + ? Colors.red //Fixme Theme.of(context).accentTextTheme.subtitle.backgroundColor + : Colors.transparent; + + final checkedOuterBoxDecoration = + BoxDecoration(shape: BoxShape.circle, gradient: gradient); + final outerBoxDecoration = BoxDecoration( + shape: BoxShape.circle, + color: Theme.of(context).accentTextTheme.overline!.color!, + border: Border.all(color: borderColor)); + + final checkedInnerBoxDecoration = + BoxDecoration(shape: BoxShape.circle, color: Colors.white); + final innerBoxDecoration = + BoxDecoration(shape: BoxShape.circle, color: uncheckedColor); + + return GestureDetector( + onTap: () => onChanged(), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + height: 24.0, + width: 24.0, + child: DecoratedBox( + decoration: + value ? checkedOuterBoxDecoration : outerBoxDecoration, + child: Padding( + padding: EdgeInsets.all(value ? 4.0 : 1.0), + child: DecoratedBox( + decoration: + value ? checkedInnerBoxDecoration : innerBoxDecoration, + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 16), + child: Text( + caption, + style: TextStyle( + color: Colors.red, //Fixme Theme.of(context).primaryTextTheme.title.color, + fontSize: 18, + fontFamily: 'Lato', + fontWeight: FontWeight.w500, + decoration: TextDecoration.none), + ), + ) + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/store/dashboard/trade_filter_store.dart b/lib/store/dashboard/trade_filter_store.dart index bee63b21e..4319c3bc7 100644 --- a/lib/store/dashboard/trade_filter_store.dart +++ b/lib/store/dashboard/trade_filter_store.dart @@ -8,39 +8,61 @@ part'trade_filter_store.g.dart'; class TradeFilterStore = TradeFilterStoreBase with _$TradeFilterStore; abstract class TradeFilterStoreBase with Store { - TradeFilterStoreBase( - {this.displayXMRTO = true, - this.displayChangeNow = true, - this.displayMorphToken = true, - this.displaySimpleSwap = true, - }); + TradeFilterStoreBase(); - @observable - bool displayXMRTO; - - @observable - bool displayChangeNow; - - @observable - bool displayMorphToken; - - @observable - bool displaySimpleSwap; + Observable displayXMRTO = Observable(true); + Observable displayAllTrades = Observable(true); + Observable displayChangeNow = Observable(true); + Observable displaySideShift = Observable(true); + Observable displayMorphToken = Observable(true); + Observable displaySimpleSwap = Observable(true); @action void toggleDisplayExchange(ExchangeProviderDescription provider) { switch (provider) { case ExchangeProviderDescription.changeNow: - displayChangeNow = !displayChangeNow; + displayAllTrades.value = false; + displayChangeNow.value = !displayChangeNow.value; + if (displayChangeNow.value && displaySideShift.value && displaySimpleSwap.value) { + displayAllTrades.value = true; + } break; - case ExchangeProviderDescription.xmrto: - displayXMRTO = !displayXMRTO; - break; - case ExchangeProviderDescription.morphToken: - displayMorphToken = !displayMorphToken; + case ExchangeProviderDescription.sideShift: + displayAllTrades.value = false; + displaySideShift.value = !displaySideShift.value; + if (displayChangeNow.value && displaySideShift.value && displaySimpleSwap.value) { + displayAllTrades.value = true; + } break; case ExchangeProviderDescription.simpleSwap: - displaySimpleSwap = !displaySimpleSwap; + displayAllTrades.value = false; + displaySimpleSwap.value = !displaySimpleSwap.value; + if (displayChangeNow.value && displaySideShift.value && displaySimpleSwap.value) { + displayAllTrades.value = true; + } + break; + case ExchangeProviderDescription.xmrto: + displayXMRTO.value = !displayXMRTO.value; + break; + case ExchangeProviderDescription.morphToken: + displayMorphToken.value = !displayMorphToken.value; + break; + case ExchangeProviderDescription.all: + displayAllTrades.value = !displayAllTrades.value; + if (displayAllTrades.value) { + displayChangeNow.value = true; + displaySideShift.value = true; + displayXMRTO.value = true; + displayMorphToken.value = true; + displaySimpleSwap.value = true; + } + if (!displayAllTrades.value) { + displayChangeNow.value = false; + displaySideShift.value = false; + displayXMRTO.value = false; + displayMorphToken.value = false; + displaySimpleSwap.value = false; + } break; } } @@ -48,20 +70,22 @@ abstract class TradeFilterStoreBase with Store { List filtered({required List trades, required WalletBase wallet}) { final _trades = trades.where((item) => item.trade.walletId == wallet.id).toList(); - final needToFilter = !displayChangeNow || !displayXMRTO || !displayMorphToken || !displaySimpleSwap; + final needToFilter = !displayChangeNow.value || !displaySideShift.value + || !displayXMRTO.value || !displayMorphToken.value + || !displaySimpleSwap.value; return needToFilter ? _trades .where((item) => - (displayXMRTO && + (displayXMRTO.value && item.trade.provider == ExchangeProviderDescription.xmrto) || - (displayChangeNow && + (displayChangeNow.value && item.trade.provider == ExchangeProviderDescription.changeNow) || - (displayMorphToken && + (displayMorphToken.value && item.trade.provider == ExchangeProviderDescription.morphToken) - ||(displaySimpleSwap && + ||(displaySimpleSwap.value && item.trade.provider == ExchangeProviderDescription.simpleSwap)) .toList() diff --git a/lib/store/dashboard/transaction_filter_store.dart b/lib/store/dashboard/transaction_filter_store.dart index 4444075b7..4198f7d8c 100644 --- a/lib/store/dashboard/transaction_filter_store.dart +++ b/lib/store/dashboard/transaction_filter_store.dart @@ -1,6 +1,8 @@ import 'package:mobx/mobx.dart'; import 'package:cw_core/transaction_direction.dart'; import 'package:cake_wallet/view_model/dashboard/transaction_list_item.dart'; +import 'package:cake_wallet/view_model/dashboard/filter_item.dart'; +import 'package:cake_wallet/generated/i18n.dart'; part 'transaction_filter_store.g.dart'; @@ -8,14 +10,11 @@ class TransactionFilterStore = TransactionFilterStoreBase with _$TransactionFilterStore; abstract class TransactionFilterStoreBase with Store { - TransactionFilterStoreBase( - {this.displayIncoming = true, this.displayOutgoing = true}); + TransactionFilterStoreBase(); - @observable - bool displayIncoming; - - @observable - bool displayOutgoing; + Observable displayAll = Observable(true); + Observable displayIncoming = Observable(true); + Observable displayOutgoing = Observable(true); @observable DateTime? startDate; @@ -24,10 +23,40 @@ abstract class TransactionFilterStoreBase with Store { DateTime? endDate; @action - void toggleIncoming() => displayIncoming = !displayIncoming; + void toggleIAll() { + displayAll.value = (!displayAll.value); + if (displayAll.value) { + displayOutgoing.value = true; + displayIncoming.value = true; + } + if (!displayAll.value) { + displayOutgoing.value = false; + displayIncoming.value = false; + } + } @action - void toggleOutgoing() => displayOutgoing = !displayOutgoing; + void toggleIncoming() { + displayIncoming.value = (!displayIncoming.value); + if (displayIncoming.value && displayOutgoing.value) { + displayAll.value = true; + } + if (!displayIncoming.value || !displayOutgoing.value) { + displayAll.value = false; + } + } + + + @action + void toggleOutgoing() { + displayOutgoing.value = (!displayOutgoing.value); + if (displayIncoming.value && displayOutgoing.value) { + displayAll.value = true; + } + if (!displayIncoming.value || !displayOutgoing.value) { + displayAll.value = false; + } + } @action void changeStartDate(DateTime date) => startDate = date; @@ -37,8 +66,8 @@ abstract class TransactionFilterStoreBase with Store { List filtered({required List transactions}) { var _transactions = []; - final needToFilter = !displayOutgoing || - !displayIncoming || + final needToFilter = !displayOutgoing.value || + !displayIncoming.value || (startDate != null && endDate != null); if (needToFilter) { @@ -50,11 +79,11 @@ abstract class TransactionFilterStoreBase with Store { && (endDate?.isAfter(item.transaction.date) ?? false); } - if (allowed && (!displayOutgoing || !displayIncoming)) { - allowed = (displayOutgoing && + if (allowed && (!displayOutgoing.value || !displayIncoming.value)) { + allowed = (displayOutgoing.value && item.transaction.direction == TransactionDirection.outgoing) || - (displayIncoming && + (displayIncoming.value && item.transaction.direction == TransactionDirection.incoming); } diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 49dd2437a..d736769e2 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -60,13 +60,17 @@ abstract class DashboardViewModelBase with Store { filterItems = { S.current.transactions: [ FilterItem( - value: () => transactionFilterStore.displayIncoming, - caption: S.current.incoming, - onChanged: (value) => transactionFilterStore.toggleIncoming()), + value: transactionFilterStore.displayAll, + caption: 'S.current.all_transactions',//Fixme + onChanged: () => transactionFilterStore.toggleIAll()), FilterItem( - value: () => transactionFilterStore.displayOutgoing, + value: transactionFilterStore.displayIncoming, + caption: S.current.incoming, + onChanged: () => transactionFilterStore.toggleIncoming()), + FilterItem( + value: transactionFilterStore.displayOutgoing, caption: S.current.outgoing, - onChanged: (value) => transactionFilterStore.toggleOutgoing()), + onChanged: () => transactionFilterStore.toggleOutgoing()), // FilterItem( // value: () => false, // caption: S.current.transactions_by_date, @@ -74,10 +78,20 @@ abstract class DashboardViewModelBase with Store { ], S.current.trades: [ FilterItem( - value: () => tradeFilterStore.displayChangeNow, + value: tradeFilterStore.displayAllTrades, + caption: 'S.current.all_trades',//Fixme + onChanged: () => tradeFilterStore + .toggleDisplayExchange(ExchangeProviderDescription.all)), + FilterItem( + value: tradeFilterStore.displayChangeNow, caption: 'Change.NOW', - onChanged: (value) => tradeFilterStore + onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.changeNow)), + FilterItem( + value: tradeFilterStore.displaySideShift, + caption: 'SideShift', + onChanged: () => tradeFilterStore + .toggleDisplayExchange(ExchangeProviderDescription.sideShift)), ] }, subname = '', diff --git a/lib/view_model/dashboard/filter_item.dart b/lib/view_model/dashboard/filter_item.dart index 0230899b4..8bc0f0bf1 100644 --- a/lib/view_model/dashboard/filter_item.dart +++ b/lib/view_model/dashboard/filter_item.dart @@ -1,10 +1,12 @@ +import 'package:mobx/mobx.dart'; + class FilterItem { FilterItem({ required this.value, required this.caption, required this.onChanged}); - bool Function() value; + Observable value; String caption; - Function(bool) onChanged; + Function onChanged; } \ No newline at end of file From 4269f18d013162b7fec61e5b0f37dc77fee00a86 Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 10 Nov 2022 16:43:01 +0200 Subject: [PATCH 012/100] fix colors --- .../dashboard/widgets/filter_widget.dart | 18 +++--------------- lib/src/widgets/rounded_checkbox.dart | 10 +++++----- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 8719df562..10bda6798 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -28,16 +28,6 @@ class FilterWidget extends StatelessWidget { Column( mainAxisSize: MainAxisSize.min, children: [ - Text( - S.of(context).filters, - style: TextStyle( - color: Colors.white, - fontSize: 18, - fontWeight: FontWeight.bold, - fontFamily: 'Lato', - decoration: TextDecoration.none, - ), - ), Padding( padding: EdgeInsets.only(left: 24, right: 24, top: 24), child: ClipRRect( @@ -55,10 +45,8 @@ class FilterWidget extends StatelessWidget { child: Text( S.of(context).filters, style: TextStyle( - color: Theme.of(context) - .textTheme! - .bodyText1! - .decorationColor!, + color: Theme.of(context).primaryTextTheme + .overline!.color!, fontSize: 16, fontFamily: 'Lato', decoration: TextDecoration.none, @@ -182,7 +170,7 @@ class SectionDivider extends StatelessWidget { Widget build(BuildContext context) { return Container( height: 1, - color: Colors.red,//Fixme Theme.of(context).accentTextTheme.subhead.backgroundColor, + color: Theme.of(context).dividerColor, ); } } \ No newline at end of file diff --git a/lib/src/widgets/rounded_checkbox.dart b/lib/src/widgets/rounded_checkbox.dart index 6e5b08f1e..1bdfb267d 100644 --- a/lib/src/widgets/rounded_checkbox.dart +++ b/lib/src/widgets/rounded_checkbox.dart @@ -20,8 +20,8 @@ class RoundedCheckboxWidget extends StatelessWidget { Widget build(BuildContext context) { final baseGradient = LinearGradient(colors: [ - Colors.red, //Fixme Theme.of(context).primaryTextTheme!.subtitle!.color!, - Colors.red //Fixme Theme.of(context).primaryTextTheme!.subtitle!.decorationColor!, + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, ], begin: Alignment.centerLeft, end: Alignment.centerRight); final darkThemeGradient = LinearGradient(colors: [ @@ -32,11 +32,11 @@ class RoundedCheckboxWidget extends StatelessWidget { final gradient = darkTheme ? darkThemeGradient : baseGradient; final uncheckedColor = darkTheme - ? Colors.red //Fixme Theme.of(context).accentTextTheme.subhead.decorationColor + ? Theme.of(context).primaryTextTheme.subtitle1!.decorationColor! : Colors.white; final borderColor = darkTheme - ? Colors.red //Fixme Theme.of(context).accentTextTheme.subtitle.backgroundColor + ? Theme.of(context).accentTextTheme.subtitle2!.backgroundColor! : Colors.transparent; final checkedOuterBoxDecoration = @@ -77,7 +77,7 @@ class RoundedCheckboxWidget extends StatelessWidget { child: Text( caption, style: TextStyle( - color: Colors.red, //Fixme Theme.of(context).primaryTextTheme.title.color, + color: Theme.of(context).primaryTextTheme.headline6!.color!, fontSize: 18, fontFamily: 'Lato', fontWeight: FontWeight.w500, From bf86fd6ed08890ef62a7b320d4d7b3595eb1ea68 Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 10 Nov 2022 17:38:23 +0200 Subject: [PATCH 013/100] update localization --- lib/view_model/dashboard/dashboard_view_model.dart | 4 ++-- res/values/strings_de.arb | 6 ++++-- res/values/strings_en.arb | 6 ++++-- res/values/strings_es.arb | 6 ++++-- res/values/strings_fr.arb | 6 ++++-- res/values/strings_hi.arb | 6 ++++-- res/values/strings_hr.arb | 6 ++++-- res/values/strings_it.arb | 6 ++++-- res/values/strings_ja.arb | 6 ++++-- res/values/strings_ko.arb | 6 ++++-- res/values/strings_nl.arb | 6 ++++-- res/values/strings_pl.arb | 6 ++++-- res/values/strings_pt.arb | 6 ++++-- res/values/strings_ru.arb | 6 ++++-- res/values/strings_uk.arb | 6 ++++-- res/values/strings_zh.arb | 4 +++- 16 files changed, 61 insertions(+), 31 deletions(-) diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index d736769e2..c1d57e241 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -61,7 +61,7 @@ abstract class DashboardViewModelBase with Store { S.current.transactions: [ FilterItem( value: transactionFilterStore.displayAll, - caption: 'S.current.all_transactions',//Fixme + caption: S.current.all_transactions, onChanged: () => transactionFilterStore.toggleIAll()), FilterItem( value: transactionFilterStore.displayIncoming, @@ -79,7 +79,7 @@ abstract class DashboardViewModelBase with Store { S.current.trades: [ FilterItem( value: tradeFilterStore.displayAllTrades, - caption: 'S.current.all_trades',//Fixme + caption: S.current.all_trades, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.all)), FilterItem( diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 685d817d5..36f3b5172 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -48,7 +48,7 @@ "outgoing" : "Ausgehend", "transactions_by_date" : "Transaktionen nach Datum", "trades" : "Börsen", - "filters" : "Filter", + "filters" : "Filtern nach", "today" : "Heute", "yesterday" : "Gestern", "received" : "Empfangen", @@ -651,5 +651,7 @@ "ignor": "Ignorieren", "use_suggested": "Vorgeschlagen verwenden", "do_not_share_warning_text" : "Teilen Sie diese nicht mit anderen, einschließlich des Supports.\n\nSie werden Ihr Geld stehlen!", - "help": "hilfe" + "help": "hilfe", + "all_transactions": "Alle Transaktionen", + "all_trades": "Alle Gewerke" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 877d09231..694de99c3 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -48,7 +48,7 @@ "outgoing" : "Outgoing", "transactions_by_date" : "Transactions by date", "trades" : "Trades", - "filters" : "Filter", + "filters" : "Filter by", "today" : "Today", "yesterday" : "Yesterday", "received" : "Received", @@ -651,5 +651,7 @@ "ignor": "Ignore", "use_suggested": "Use Suggested", "do_not_share_warning_text" : "Do not share these with anyone else, including support.\n\nThey will steal your money!", - "help": "help" + "help": "help", + "all_transactions": "All transactions", + "all_trades": "All trades" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 505f3ffa8..b3af2a5c7 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -48,7 +48,7 @@ "outgoing" : "Saliente", "transactions_by_date" : "Transacciones por fecha", "trades" : "Cambios", - "filters" : "Filtrar", + "filters" : "Filtrado por", "today" : "Hoy", "yesterday" : "Ayer", "received" : "Recibido", @@ -651,5 +651,7 @@ "ignor": "Pasar por alto", "use_suggested": "Usar sugerido", "do_not_share_warning_text" : "No comparta estos con nadie más, incluido el soporte.\n\n¡Te robarán tu dinero!", - "help": "ayuda" + "help": "ayuda", + "all_transactions": "Todas las transacciones", + "all_trades": "Todos los oficios" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 941016c0b..aa50a4859 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -46,7 +46,7 @@ "outgoing" : "Sortantes", "transactions_by_date" : "Transactions par date", "trades" : "Échanges", - "filters" : "Filtre", + "filters" : "Filtrer par", "today" : "Aujourd'hui", "yesterday" : "Hier", "received" : "Reçus", @@ -649,5 +649,7 @@ "ignor": "Ignorer", "use_suggested": "Utilisation suggérée", "do_not_share_warning_text" : "Ne les partagez avec personne d'autre, y compris avec l'assistance.\n\nIls vont voler votre argent!", - "help": "aider" + "help": "aider", + "all_transactions": "Toutes transactions", + "all_trades": "Tous métiers" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 7faa06f7f..f64e1c42c 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -48,7 +48,7 @@ "outgoing" : "निवर्तमान", "transactions_by_date" : "तारीख से लेन-देन", "trades" : "ट्रेडों", - "filters" : "फ़िल्टर", + "filters" : "के द्वारा छनित", "today" : "आज", "yesterday" : "बिता कल", "received" : "प्राप्त किया", @@ -651,5 +651,7 @@ "ignor": "नज़रअंदाज़ करना", "use_suggested": "सुझाए गए का प्रयोग करें", "do_not_share_warning_text" : "इन्हें समर्थन सहित किसी और के साथ साझा न करें।\n\nवे आपका पैसा चुरा लेंगे!", - "help": "मदद करना" + "help": "मदद करना", + "all_transactions": "सभी लेन - देन", + "all_trades": "सभी व्यापार" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 4fa77948a..94668ff47 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -48,7 +48,7 @@ "outgoing" : "Odlazno", "transactions_by_date" : "Transakcije prema datumu", "trades" : "Razmjene", - "filters" : "Filter", + "filters" : "Filtrirati po", "today" : "Danas", "yesterday" : "Jučer", "received" : "Primljeno", @@ -651,5 +651,7 @@ "ignor": "Zanemariti", "use_suggested": "Koristite predloženo", "do_not_share_warning_text" : "Nemojte ih dijeliti ni s kim, uključujući podršku.\n\nUkrast će vam novac!", - "help": "pomozite" + "help": "pomozite", + "all_transactions": "Sve transakcije", + "all_trades": "Svi obrti" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 9a42a588b..c8016f481 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -48,7 +48,7 @@ "outgoing" : "In uscita", "transactions_by_date" : "Transazioni per data", "trades" : "Scambi", - "filters" : "Filtri", + "filters" : "Filtrirati po", "today" : "Oggi", "yesterday" : "Ieri", "received" : "Ricevuto", @@ -651,5 +651,7 @@ "ignor": "Ignorare", "use_suggested": "Usa suggerito", "do_not_share_warning_text" : "Non condividerli con nessun altro, incluso il supporto.\n\nTi ruberanno i soldi!", - "help": "aiuto" + "help": "aiuto", + "all_transactions": "Sve transakcije", + "all_trades": "Svi obrti" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index c1d0de4e3..220e4f5df 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -48,7 +48,7 @@ "outgoing" : "発信", "transactions_by_date" : "日付ごとの取引", "trades" : "取引", - "filters" : "フィルタ", + "filters" : "でフィルタリング", "today" : "今日", "yesterday" : "昨日", "received" : "受け取った", @@ -651,5 +651,7 @@ "ignor": "無視", "use_suggested": "推奨を使用", "do_not_share_warning_text" : "サポートを含め、これらを他の誰とも共有しないでください。\n\n彼らはあなたのお金を盗みます!", - "help": "ヘルプ" + "help": "ヘルプ", + "all_transactions": "全取引", + "all_trades": "すべての取引" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 127aa949e..1bef56dbc 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -48,7 +48,7 @@ "outgoing" : "나가는", "transactions_by_date" : "날짜 별 거래", "trades" : "거래", - "filters" : "필터", + "filters" : "필터링 기준", "today" : "오늘", "yesterday" : "어제", "received" : "받았습니다", @@ -651,5 +651,7 @@ "ignor": "무시하다", "use_suggested": "추천 사용", "do_not_share_warning_text" : "지원을 포함하여 다른 사람과 이러한 정보를 공유하지 마십시오.\n\n그들은 당신의 돈을 훔칠 것입니다!", - "help": "돕다" + "help": "돕다", + "all_transactions": "모든 거래 창구", + "all_trades": "A모든 거래" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index fa748b552..3db8ad2f7 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -48,7 +48,7 @@ "outgoing" : "Uitgaande", "transactions_by_date" : "Transacties op datum", "trades" : "Trades", - "filters" : "Filter", + "filters" : "Filteren op", "today" : "Vandaag", "yesterday" : "Gisteren", "received" : "Ontvangen", @@ -651,5 +651,7 @@ "ignor": "Negeren", "use_suggested": "Gebruik aanbevolen", "do_not_share_warning_text" : "Deel deze met niemand anders, ook niet met support.\n\nZe zullen je geld stelen!", - "help": "helpen" + "help": "helpen", + "all_transactions": "Alle transacties", + "all_trades": "Alle transacties" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 454fe9717..83ec99d99 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -48,7 +48,7 @@ "outgoing" : "Towarzyski", "transactions_by_date" : "Transakcje według daty", "trades" : "Transakcje", - "filters" : "Filtr", + "filters" : "Filtruj według", "today" : "Dzisiaj", "yesterday" : "Wczoraj", "received" : "Odebrane", @@ -651,5 +651,7 @@ "ignor": "Ignorować", "use_suggested": "Użyj sugerowane", "do_not_share_warning_text" : "Nie udostępniaj ich nikomu innemu, w tym wsparcia.\n\nUkradną twoje pieniądze!", - "help": "pomoc" + "help": "pomoc", + "all_transactions": "Wszystkie transakcje", + "all_trades": "Wszystkie operacje" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 04a0a3ff2..866dcd26c 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -48,7 +48,7 @@ "outgoing" : "Enviadas", "transactions_by_date" : "Transações por data", "trades" : "Trocas", - "filters" : "Filtro", + "filters" : "Filtrar por", "today" : "Hoje", "yesterday" : "Ontem", "received" : "Recebida", @@ -651,5 +651,7 @@ "ignor": "Ignorar", "use_suggested": "Uso sugerido", "do_not_share_warning_text" : "Não os compartilhe com mais ninguém, incluindo suporte.\n\nEles vão roubar seu dinheiro!", - "help": "ajuda" + "help": "ajuda", + "all_transactions": "Todas as transacções", + "all_trades": "Todas as negociações" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 632b0990c..b34d4df15 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -48,7 +48,7 @@ "outgoing" : "Исходящие", "transactions_by_date" : "Сортировать по дате", "trades" : "Сделки", - "filters" : "Фильтр", + "filters" : "Фильтровать по", "today" : "Сегодня", "yesterday" : "Вчера", "received" : "Полученные", @@ -651,5 +651,7 @@ "ignor": "Игнорировать", "use_suggested": "Использовать предложенный", "do_not_share_warning_text" : "Не делитесь ими с кем-либо еще, в том числе со службой поддержки.\n\nОни украдут ваши деньги!", - "help": "помощь" + "help": "помощь", + "all_transactions": "Все транзакции", + "all_trades": "Все сделки" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 5e0f0d18a..285a67fa5 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -48,7 +48,7 @@ "outgoing" : "Вихідні", "transactions_by_date" : "Сортувати по даті", "trades" : "Торгові операції", - "filters" : "Фільтр", + "filters" : "Фільтрувати по", "today" : "Сьогодні", "yesterday" : "Вчора", "received" : "Отримані", @@ -650,5 +650,7 @@ "ignor": "Ігнорувати", "use_suggested": "Використати запропоноване", "do_not_share_warning_text" : "Не повідомляйте їх нікому, включно зі службою підтримки.\n\nВони вкрадуть ваші гроші!", - "help": "допомога" + "help": "допомога", + "all_transactions": "Всі транзакції", + "all_trades": "Всі операції" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index c46d07d59..8212d83b6 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -649,5 +649,7 @@ "ignor": "忽视", "use_suggested": "使用建议", "do_not_share_warning_text" : "不要與其他任何人分享這些內容,包括支持。\n\n他們會偷你的錢!", - "help": "帮助" + "help": "帮助", + "all_transactions": "所有交易", + "all_trades": "所有的变化" } From 74cbb6f0018c2b27d7f2fb42ed9b371f795af290 Mon Sep 17 00:00:00 2001 From: Serhii Date: Sun, 13 Nov 2022 21:18:01 +0200 Subject: [PATCH 014/100] fix UI with new design CW-138 --- lib/view_model/trade_details_view_model.dart | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/view_model/trade_details_view_model.dart b/lib/view_model/trade_details_view_model.dart index f2985463c..5a1f78774 100644 --- a/lib/view_model/trade_details_view_model.dart +++ b/lib/view_model/trade_details_view_model.dart @@ -142,17 +142,5 @@ abstract class TradeDetailsViewModelBase with Store { items.add(TrackTradeListItem( title: 'Track', value: buildURL, onTap: () => launch(buildURL))); } - - if (trade.createdAt != null) { - items.add(StandartListItem( - title: S.current.trade_details_created_at, - value: trade.createdAt != null ? dateFormat.format(trade.createdAt!).toString() : '')); - } - - if (trade.from != null && trade.to != null) { - items.add(StandartListItem( - title: S.current.trade_details_pair, - value: '${trade.from.toString()} → ${trade.to.toString()}')); - } } } From 196187255fcd731decee29ce1d34dd321250840e Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 21 Nov 2022 21:09:00 +0200 Subject: [PATCH 015/100] refactoring mapFromInt static variable --- cw_core/lib/crypto_currency.dart | 74 +++----------------------------- 1 file changed, 7 insertions(+), 67 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 446c667fd..b483f8aa5 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -137,71 +137,11 @@ class CryptoCurrency extends EnumerableItem with Serializable { static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 61); static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 62); - static const mapFromInt = { - 0: CryptoCurrency.xmr, - 1: CryptoCurrency.ada, - 2: CryptoCurrency.bch, - 3: CryptoCurrency.bnb, - 4: CryptoCurrency.btc, - 5: CryptoCurrency.dai, - 6: CryptoCurrency.dash, - 7: CryptoCurrency.eos, - 8: CryptoCurrency.eth, - 9: CryptoCurrency.ltc, - 10: CryptoCurrency.nano, - 11: CryptoCurrency.trx, - 12: CryptoCurrency.usdt, - 13: CryptoCurrency.usdterc20, - 14: CryptoCurrency.xlm, - 15: CryptoCurrency.xrp, - 16: CryptoCurrency.xhv, - 17: CryptoCurrency.xag, - 18: CryptoCurrency.xau, - 19: CryptoCurrency.xaud, - 20: CryptoCurrency.xbtc, - 21: CryptoCurrency.xcad, - 22: CryptoCurrency.xchf, - 23: CryptoCurrency.xcny, - 24: CryptoCurrency.xeur, - 25: CryptoCurrency.xgbp, - 26: CryptoCurrency.xjpy, - 27: CryptoCurrency.xnok, - 28: CryptoCurrency.xnzd, - 29: CryptoCurrency.xusd, - 30: CryptoCurrency.ape, - 31: CryptoCurrency.avaxc, - 32: CryptoCurrency.btt, - 33: CryptoCurrency.bttbsc, - 34: CryptoCurrency.doge, - 35: CryptoCurrency.firo, - 36: CryptoCurrency.usdttrc20, - 37: CryptoCurrency.hbar, - 38: CryptoCurrency.sc, - 39: CryptoCurrency.sol, - 40: CryptoCurrency.usdc, - 41: CryptoCurrency.usdcsol, - 42: CryptoCurrency.zaddr, - 43: CryptoCurrency.zec, - 44: CryptoCurrency.zen, - 45: CryptoCurrency.xvg, - 46: CryptoCurrency.usdcpoly, - 47: CryptoCurrency.dcr, - 48: CryptoCurrency.husd, - 49: CryptoCurrency.kmd, - 50: CryptoCurrency.mana, - 51: CryptoCurrency.maticpoly, - 52: CryptoCurrency.matic, - 53: CryptoCurrency.mkr, - 54: CryptoCurrency.near, - 55: CryptoCurrency.oxt, - 56: CryptoCurrency.paxg, - 57: CryptoCurrency.pivx, - 58: CryptoCurrency.rune, - 59: CryptoCurrency.rvn, - 60: CryptoCurrency.scrt, - 61: CryptoCurrency.uni, - 62: CryptoCurrency.stx - }; + static Map rawCurrencyMap = + all.fold>({}, (acc, item) { + acc.addAll({item.raw: item}); + return acc; + }); static const mapFromString = { 'xmr': CryptoCurrency.xmr, @@ -271,11 +211,11 @@ class CryptoCurrency extends EnumerableItem with Serializable { static CryptoCurrency deserialize({required int raw}) { - if (CryptoCurrency.mapFromInt[raw] == null) { + if (CryptoCurrency.rawCurrencyMap[raw] == null) { final s = 'Unexpected token: $raw for CryptoCurrency deserialize'; throw ArgumentError.value(raw, 'raw', s); } - return CryptoCurrency.mapFromInt[raw]!; + return CryptoCurrency.rawCurrencyMap[raw]!; } static CryptoCurrency fromString(String raw) { From 818a8afe208418136cfa49cdf801be928d0a1d74 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Tue, 22 Nov 2022 22:52:28 +0200 Subject: [PATCH 016/100] [CW-225] Add pin timeout setting --- lib/core/auth_service.dart | 24 +++++++ lib/di.dart | 3 +- lib/entities/pin_code_required_duration.dart | 32 ++++++++++ lib/entities/preferences_key.dart | 3 + .../settings/security_backup_page.dart | 64 ++++++++++++------- .../screens/wallet_list/wallet_list_page.dart | 47 ++++++++++---- lib/store/settings_store.dart | 20 ++++-- lib/view_model/auth_view_model.dart | 12 +++- .../settings/settings_view_model.dart | 30 ++++++--- .../wallet_list/wallet_list_view_model.dart | 6 +- res/values/strings_de.arb | 5 +- res/values/strings_en.arb | 5 +- res/values/strings_es.arb | 5 +- res/values/strings_fr.arb | 5 +- res/values/strings_hi.arb | 5 +- res/values/strings_hr.arb | 5 +- res/values/strings_it.arb | 5 +- res/values/strings_ja.arb | 5 +- res/values/strings_ko.arb | 5 +- res/values/strings_nl.arb | 5 +- res/values/strings_pl.arb | 5 +- res/values/strings_pt.arb | 5 +- res/values/strings_ru.arb | 5 +- res/values/strings_uk.arb | 5 +- res/values/strings_zh.arb | 5 +- 25 files changed, 250 insertions(+), 66 deletions(-) create mode 100644 lib/entities/pin_code_required_duration.dart diff --git a/lib/core/auth_service.dart b/lib/core/auth_service.dart index 2ae37e2b0..6b167fa40 100644 --- a/lib/core/auth_service.dart +++ b/lib/core/auth_service.dart @@ -4,6 +4,8 @@ import 'package:shared_preferences/shared_preferences.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cake_wallet/entities/encrypt.dart'; +import 'package:cake_wallet/di.dart'; +import 'package:cake_wallet/store/settings_store.dart'; class AuthService with Store { AuthService({required this.secureStorage, required this.sharedPreferences}); @@ -39,4 +41,26 @@ class AuthService with Store { return decodedPin == pin; } + + void saveLastAuthTime(){ + int timestamp = DateTime.now().millisecondsSinceEpoch; + sharedPreferences.setInt(PreferencesKey.lastAuthTimeMilliseconds, timestamp); + } + + bool requireAuth(){ + final timestamp = sharedPreferences.getInt(PreferencesKey.lastAuthTimeMilliseconds); + final duration = _durationToRequireAuth(timestamp ?? 0); + final requiredPinInterval = getIt.get().pinTimeOutDuration; + + return duration >= requiredPinInterval.value; + } + + int _durationToRequireAuth(int timestamp){ + + DateTime before = DateTime.fromMillisecondsSinceEpoch(timestamp); + DateTime now = DateTime.now(); + Duration timeDifference = now.difference(before); + + return timeDifference.inMinutes; + } } diff --git a/lib/di.dart b/lib/di.dart index 815a3740e..fe8032513 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -440,7 +440,8 @@ Future setup( getIt.registerFactory(() { final appStore = getIt.get(); final yatStore = getIt.get(); - return SettingsViewModel(appStore.settingsStore, yatStore, appStore.wallet!); + final authService = getIt.get(); + return SettingsViewModel(appStore.settingsStore, yatStore, authService, appStore.wallet!); }); getIt diff --git a/lib/entities/pin_code_required_duration.dart b/lib/entities/pin_code_required_duration.dart new file mode 100644 index 000000000..fef5715b5 --- /dev/null +++ b/lib/entities/pin_code_required_duration.dart @@ -0,0 +1,32 @@ +import 'package:cake_wallet/generated/i18n.dart'; + +enum PinCodeRequiredDuration { + always(0), + tenminutes(10), + onehour(60); + + const PinCodeRequiredDuration(this.value); + final int value; + + static PinCodeRequiredDuration deserialize({required int raw}) => + PinCodeRequiredDuration.values.firstWhere((e) => e.value == raw); + + @override + String toString(){ + String label = ''; + switch (this) { + case PinCodeRequiredDuration.always: + label = S.current.always; + break; + case PinCodeRequiredDuration.tenminutes: + label = S.current.minutes_to_pin_code('10'); + break; + case PinCodeRequiredDuration.onehour: + label = S.current.minutes_to_pin_code('60'); + break; + } + return label; + + } + +} \ No newline at end of file diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index 6cf7e5608..36394d936 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -23,6 +23,9 @@ class PreferencesKey { static const shouldShowReceiveWarning = 'should_show_receive_warning'; static const shouldShowYatPopup = 'should_show_yat_popup'; static const moneroWalletPasswordUpdateV1Base = 'monero_wallet_update_v1'; + static const pinTimeOutDuration = 'pin_timeout_duration'; + static const lastAuthTimeMilliseconds = 'last_auth_time_milliseconds'; + static String moneroWalletUpdateV1Key(String name) => '${PreferencesKey.moneroWalletPasswordUpdateV1Base}_${name}'; diff --git a/lib/src/screens/settings/security_backup_page.dart b/lib/src/screens/settings/security_backup_page.dart index d950597f0..a3babb0bb 100644 --- a/lib/src/screens/settings/security_backup_page.dart +++ b/lib/src/screens/settings/security_backup_page.dart @@ -1,9 +1,11 @@ +import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart'; +import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart'; import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart'; import 'package:cake_wallet/view_model/settings/settings_view_model.dart'; @@ -20,27 +22,28 @@ class SecurityBackupPage extends BasePage { @override Widget body(BuildContext context) { + return Container( padding: EdgeInsets.only(top: 10), child: Column(mainAxisSize: MainAxisSize.min, children: [ SettingsCellWithArrow( title: S.current.show_keys, - handler: (_) => Navigator.of(context).pushNamed(Routes.auth, + handler: (_) => settingsViewModel.checkPinCodeRiquired() ? Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { if (isAuthenticatedSuccessfully) { auth.close(route: Routes.showKeys); } - }), + }) : Navigator.of(context).pushNamed(Routes.showKeys), ), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), SettingsCellWithArrow( title: S.current.create_backup, - handler: (_) => Navigator.of(context).pushNamed(Routes.auth, + handler: (_) => settingsViewModel.checkPinCodeRiquired() ? Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { if (isAuthenticatedSuccessfully) { auth.close(route: Routes.backup); } - }), + }) : Navigator.of(context).pushNamed(Routes.backup), ), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), SettingsCellWithArrow( @@ -56,28 +59,41 @@ class SecurityBackupPage extends BasePage { })), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), Observer(builder: (_) { - return SettingsSwitcherCell( - title: S.current.settings_allow_biometrical_authentication, - value: settingsViewModel.allowBiometricalAuthentication, - onValueChange: (BuildContext context, bool value) { - if (value) { - Navigator.of(context).pushNamed(Routes.auth, - arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { - if (isAuthenticatedSuccessfully) { - if (await settingsViewModel.biometricAuthenticated()) { - settingsViewModel.setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); - } - } else { - settingsViewModel.setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); - } + return Column( + children: [ + SettingsSwitcherCell( + title: S.current.settings_allow_biometrical_authentication, + value: settingsViewModel.allowBiometricalAuthentication, + onValueChange: (BuildContext context, bool value) { + if (value) { + Navigator.of(context).pushNamed(Routes.auth, + arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { + if (isAuthenticatedSuccessfully) { + if (await settingsViewModel.biometricAuthenticated()) { + settingsViewModel.setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); + } + } else { + settingsViewModel.setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); + } - auth.close(); - }); - } else { - settingsViewModel.setAllowBiometricalAuthentication(value); - } - }); + auth.close(); + }); + } else { + settingsViewModel.setAllowBiometricalAuthentication(value); + } + }), + SettingsPickerCell( + title: S.current.require_pin_after, + items: PinCodeRequiredDuration.values, + selectedItem: settingsViewModel.pinCodeRequiredDuration, + onItemSelected: (PinCodeRequiredDuration code) { + settingsViewModel.setPinCodeRequiredDuration(code); + }, + ), + ], + ); }), + ]), ); } diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index c1a7ea953..5d9650ef2 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -220,7 +220,8 @@ class WalletListBodyState extends State { } Future _loadWallet(WalletListItem wallet) async { - await Navigator.of(context).pushNamed(Routes.auth, arguments: + if(await widget.walletListViewModel.checkIfAuthRequired()){ + await Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { if (!isAuthenticatedSuccessfully) { return; @@ -241,17 +242,36 @@ class WalletListBodyState extends State { .wallet_list_failed_to_load(wallet.name, e.toString())); } }); + }else{ + try { + changeProcessText(S.of(context).wallet_list_loading_wallet(wallet.name)); + await widget.walletListViewModel.loadWallet(wallet); + hideProgressText(); + Navigator.of(context).pop(); + } catch (e) { + changeProcessText(S + .of(context) + .wallet_list_failed_to_load(wallet.name, e.toString())); + } + } } Future _removeWallet(WalletListItem wallet) async { - await Navigator.of(context).pushNamed(Routes.auth, arguments: + if(widget.walletListViewModel.checkIfAuthRequired()){ + await Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { if (!isAuthenticatedSuccessfully) { return; } + _onSuccessfulAuth(wallet, auth); + }); + }else{ + _onSuccessfulAuth(wallet, null); + } + } - bool confirmed = false; - + _onSuccessfulAuth(WalletListItem wallet, AuthPageState? auth)async{ + bool confirmed = false; await showPopUp( context: context, builder: (BuildContext context) { @@ -270,18 +290,23 @@ class WalletListBodyState extends State { if (confirmed) { try { - auth.changeProcessText( - S.of(context).wallet_list_removing_wallet(wallet.name)); + auth != null ? + auth.changeProcessText( + S.of(context).wallet_list_removing_wallet(wallet.name)) + : changeProcessText( S.of(context).wallet_list_removing_wallet(wallet.name)); await widget.walletListViewModel.remove(wallet); } catch (e) { - auth.changeProcessText(S - .of(context) - .wallet_list_failed_to_remove(wallet.name, e.toString())); + auth != null ? + auth.changeProcessText( + S.of(context).wallet_list_failed_to_remove(wallet.name, e.toString()), + ) + : changeProcessText( + S.of(context).wallet_list_failed_to_remove(wallet.name, e.toString()), + ); } } - auth.close(); - }); + auth?.close(); } void changeProcessText(String text) { diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 2b3105a34..c6534bcea 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -1,9 +1,9 @@ import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_list.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; @@ -17,7 +17,6 @@ import 'package:cake_wallet/entities/fiat_currency.dart'; import 'package:cw_core/node.dart'; import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/entities/action_list_display_mode.dart'; -import 'package:cake_wallet/.secrets.g.dart' as secrets; part 'settings_store.g.dart'; @@ -39,6 +38,7 @@ abstract class SettingsStoreBase with Store { required this.shouldShowYatPopup, required this.isBitcoinBuyEnabled, required this.actionlistDisplayMode, + required this.pinTimeOutDuration, TransactionPriority? initialBitcoinTransactionPriority, TransactionPriority? initialMoneroTransactionPriority}) : nodes = ObservableMap.of(nodes), @@ -108,6 +108,11 @@ abstract class SettingsStoreBase with Store { (String languageCode) => sharedPreferences.setString( PreferencesKey.currentLanguageCode, languageCode)); + reaction( + (_) => pinTimeOutDuration, + (PinCodeRequiredDuration pinCodeInterval) => sharedPreferences.setInt( + PreferencesKey.pinTimeOutDuration, pinCodeInterval.value)); + reaction( (_) => balanceDisplayMode, (BalanceDisplayMode mode) => sharedPreferences.setInt( @@ -124,6 +129,7 @@ abstract class SettingsStoreBase with Store { static const defaultPinLength = 4; static const defaultActionsMode = 11; + static const defaultPinCodeTimeOutDuration = 10; @observable FiatCurrency fiatCurrency; @@ -149,6 +155,9 @@ abstract class SettingsStoreBase with Store { @observable int pinCodeLength; + @observable + PinCodeRequiredDuration pinTimeOutDuration; + @computed ThemeData get theme => currentTheme.themeData; @@ -227,13 +236,15 @@ abstract class SettingsStoreBase with Store { : ThemeType.bright.index; final savedTheme = ThemeList.deserialize( raw: sharedPreferences.getInt(PreferencesKey.currentTheme) ?? - legacyTheme ?? - 0); + legacyTheme); final actionListDisplayMode = ObservableList(); actionListDisplayMode.addAll(deserializeActionlistDisplayModes( sharedPreferences.getInt(PreferencesKey.displayActionListModeKey) ?? defaultActionsMode)); var pinLength = sharedPreferences.getInt(PreferencesKey.currentPinLength); + final pinCodeTimeOutDuration = PinCodeRequiredDuration.deserialize(raw: sharedPreferences.getInt(PreferencesKey.pinTimeOutDuration) + ?? defaultPinCodeTimeOutDuration); + // If no value if (pinLength == null || pinLength == 0) { pinLength = defaultPinLength; @@ -287,6 +298,7 @@ abstract class SettingsStoreBase with Store { initialTheme: savedTheme, actionlistDisplayMode: actionListDisplayMode, initialPinLength: pinLength, + pinTimeOutDuration: pinCodeTimeOutDuration, initialLanguageCode: savedLanguageCode, initialMoneroTransactionPriority: moneroTransactionPriority, initialBitcoinTransactionPriority: bitcoinTransactionPriority, diff --git a/lib/view_model/auth_view_model.dart b/lib/view_model/auth_view_model.dart index 29ef46b47..42201ddab 100644 --- a/lib/view_model/auth_view_model.dart +++ b/lib/view_model/auth_view_model.dart @@ -17,7 +17,9 @@ abstract class AuthViewModelBase with Store { AuthViewModelBase(this._authService, this._sharedPreferences, this._settingsStore, this._biometricAuth) : _failureCounter = 0, - state = InitialExecutionState(); + state = InitialExecutionState(){ + reaction((_) => state, _saveLastAuthTime); + } static const maxFailedLogins = 3; static const banTimeout = 180; // 3 minutes @@ -57,7 +59,7 @@ abstract class AuthViewModelBase with Store { if (isSuccessfulAuthenticated) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - state = ExecutedSuccessfullyState(); + state = ExecutedSuccessfullyState(); _failureCounter = 0; }); } else { @@ -118,4 +120,10 @@ abstract class AuthViewModelBase with Store { state = FailureState(e.toString()); } } + + void _saveLastAuthTime(ExecutionState state){ + if(state is ExecutedSuccessfullyState){ + _authService.saveLastAuthTime(); + } + } } diff --git a/lib/view_model/settings/settings_view_model.dart b/lib/view_model/settings/settings_view_model.dart index 9caacb211..96f11e82e 100644 --- a/lib/view_model/settings/settings_view_model.dart +++ b/lib/view_model/settings/settings_view_model.dart @@ -1,3 +1,5 @@ +import 'package:cake_wallet/core/auth_service.dart'; +import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/store/yat/yat_store.dart'; import 'package:mobx/mobx.dart'; import 'package:package_info/package_info.dart'; @@ -41,6 +43,7 @@ abstract class SettingsViewModelBase with Store { SettingsViewModelBase( this._settingsStore, this._yatStore, + this._authService, WalletBase, TransactionInfo> wallet) @@ -94,6 +97,10 @@ abstract class SettingsViewModelBase with Store { @computed FiatCurrency get fiatCurrency => _settingsStore.fiatCurrency; + @computed + PinCodeRequiredDuration get pinCodeRequiredDuration => + _settingsStore.pinTimeOutDuration; + @computed String get languageCode => _settingsStore.languageCode; @@ -135,6 +142,7 @@ abstract class SettingsViewModelBase with Store { final Map itemHeaders; final SettingsStore _settingsStore; final YatStore _yatStore; + final AuthService _authService; final WalletType walletType; final BiometricAuth _biometricAuth; final WalletBase, @@ -207,19 +215,25 @@ abstract class SettingsViewModelBase with Store { } } + @action + setPinCodeRequiredDuration(PinCodeRequiredDuration duration) => + _settingsStore.pinTimeOutDuration = duration; + String getDisplayPriority(dynamic priority) { - final _priority = priority as TransactionPriority; + final _priority = priority as TransactionPriority; - if (_wallet.type == WalletType.bitcoin - || _wallet.type == WalletType.litecoin) { - final rate = bitcoin!.getFeeRate(_wallet, _priority); - return bitcoin!.bitcoinTransactionPriorityWithLabel(_priority, rate); - } + if (_wallet.type == WalletType.bitcoin + || _wallet.type == WalletType.litecoin) { + final rate = bitcoin!.getFeeRate(_wallet, _priority); + return bitcoin!.bitcoinTransactionPriorityWithLabel(_priority, rate); + } - return priority.toString(); + return priority.toString(); } void onDisplayPrioritySelected(TransactionPriority priority) => - _settingsStore.priority[_wallet.type] = priority; + _settingsStore.priority[_wallet.type] = priority; + + bool checkPinCodeRiquired() => _authService.requireAuth(); } diff --git a/lib/view_model/wallet_list/wallet_list_view_model.dart b/lib/view_model/wallet_list/wallet_list_view_model.dart index 0bbc68748..50908f24e 100644 --- a/lib/view_model/wallet_list/wallet_list_view_model.dart +++ b/lib/view_model/wallet_list/wallet_list_view_model.dart @@ -1,5 +1,5 @@ +import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/wallet_loading_service.dart'; -import 'package:cake_wallet/view_model/wallet_new_vm.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/di.dart'; @@ -55,4 +55,8 @@ abstract class WalletListViewModelBase with Store { info.type == _appStore.wallet!.type, isEnabled: availableWalletTypes.contains(info.type)))); } + + bool checkIfAuthRequired(){ + return getIt.get().requireAuth(); + } } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index cea889b15..eacc8e618 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -655,5 +655,8 @@ "privacy_settings": "Datenschutzeinstellungen", "privacy": "Datenschutz", "display_settings": "Anzeigeeinstellungen", - "other_settings": "Andere Einstellungen" + "other_settings": "Andere Einstellungen", + "require_pin_after": "PIN anfordern nach", + "always": "immer", + "minutes_to_pin_code": "${minute} Minuten" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index e764a0b90..65b72f5c6 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -658,5 +658,8 @@ "privacy_settings": "Privacy settings", "privacy": "Privacy", "display_settings": "Display settings", - "other_settings": "Other settings" + "other_settings": "Other settings", + "require_pin_after": "Require PIN after", + "always": "Always", + "minutes_to_pin_code": "${minute} minutes" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index bd43abe58..903e6c380 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -655,5 +655,8 @@ "privacy_settings": "Configuración de privacidad", "privacy": "Privacidad", "display_settings": "Configuración de pantalla", - "other_settings": "Otras configuraciones" + "other_settings": "Otras configuraciones", + "require_pin_after": "Requerir PIN después de", + "always": "siempre", + "minutes_to_pin_code": "${minute} minutos" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index df43f41a6..d82f1d2de 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -653,5 +653,8 @@ "privacy_settings": "Paramètres de confidentialité", "privacy": "Confidentialité", "display_settings": "Paramètres d'affichage", - "other_settings": "Autres paramètres" + "other_settings": "Autres paramètres", + "require_pin_after": "NIP requis après", + "always": "toujours", + "minutes_to_pin_code": "${minute} minutes" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 06d95d3b2..9175cb17c 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -655,5 +655,8 @@ "privacy_settings": "गोपनीयता सेटिंग्स", "privacy": "गोपनीयता", "display_settings": "प्रदर्शन सेटिंग्स", - "other_settings": "अन्य सेटिंग्स" + "other_settings": "अन्य सेटिंग्स", + "require_pin_after": "इसके बाद पिन आवश्यक है", + "always": "हमेशा", + "minutes_to_pin_code": "${minute} मिनट" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 7c25928e5..e60bedd74 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -655,5 +655,8 @@ "privacy_settings": "Postavke privatnosti", "privacy": "Privatnost", "display_settings": "Postavke zaslona", - "other_settings": "Ostale postavke" + "other_settings": "Ostale postavke", + "require_pin_after": "Zahtijevaj PIN nakon", + "always": "Uvijek", + "minutes_to_pin_code": "${minute} minuta" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 45d9d8164..548c51b22 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -655,5 +655,8 @@ "privacy_settings": "Impostazioni privacy", "privacy": "Privacy", "display_settings": "Impostazioni di visualizzazione", - "other_settings": "Altre impostazioni" + "other_settings": "Altre impostazioni", + "require_pin_after": "Richiedi PIN dopo", + "always": "sempre", + "minutes_to_pin_code": "${minute} minuti" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index ffb2cbb71..7fc1f5105 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -655,5 +655,8 @@ "privacy_settings": "プライバシー設定", "privacy": "プライバシー", "display_settings": "表示設定", - "other_settings": "その他の設定" + "other_settings": "その他の設定", + "require_pin_after": "後に PIN が必要", + "always": "いつも", + "minutes_to_pin_code": "${minute} 分" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 598fe2f56..471d9ed11 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -655,5 +655,8 @@ "privacy_settings": "개인정보 설정", "privacy": "프라이버시", "display_settings": "디스플레이 설정", - "other_settings": "기타 설정" + "other_settings": "기타 설정", + "require_pin_after": "다음 이후에 PIN 필요", + "always": "언제나", + "minutes_to_pin_code": "${minute}분" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 12e2f5569..1eb16e051 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -655,5 +655,8 @@ "privacy_settings": "Privacy-instellingen", "privacy": "Privacy", "display_settings": "Weergave-instellingen", - "other_settings": "Andere instellingen" + "other_settings": "Andere instellingen", + "require_pin_after": "Pincode vereist na", + "always": "altijd", + "minutes_to_pin_code": "${minute} minuten" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index fd092d332..78793c074 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -655,5 +655,8 @@ "privacy_settings": "Ustawienia prywatności", "privacy": "Prywatność", "display_settings": "Ustawienia wyświetlania", - "other_settings": "Inne ustawienia" + "other_settings": "Inne ustawienia", + "require_pin_after": "Wymagaj kodu PIN po", + "always": "zawsze", + "minutes_to_pin_code": "${minute} minut" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index e4d7ef647..e7fc9aa92 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -655,5 +655,8 @@ "privacy_settings": "Configurações de privacidade", "privacy": "Privacidade", "display_settings": "Configurações de exibição", - "other_settings": "Outras configurações" + "other_settings": "Outras configurações", + "require_pin_after": "Exigir PIN após", + "always": "sempre", + "minutes_to_pin_code": "${minute} minutos" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 786f11e36..34fe7a145 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -655,5 +655,8 @@ "privacy_settings": "Настройки конфиденциальности", "privacy": "Конфиденциальность", "display_settings": "Настройки отображения", - "other_settings": "Другие настройки" + "other_settings": "Другие настройки", + "require_pin_after": "Требовать ПИН после", + "always": "всегда", + "minutes_to_pin_code": "${minute} минут" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 48951e806..fab6ed71e 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -654,6 +654,9 @@ "privacy_settings": "Налаштування конфіденційності", "privacy": "Конфіденційність", "display_settings": "Налаштування дисплея", - "other_settings": "Інші налаштування" + "other_settings": "Інші налаштування", + "require_pin_after": "Вимагати PIN після", + "always": "Завжди", + "minutes_to_pin_code": "${minute} хвилин" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 29d7351d5..8f89f7b63 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -653,5 +653,8 @@ "privacy_settings": "隐私设置", "privacy":"隐私", "display_settings": "显示设置", - "other_settings": "其他设置" + "other_settings": "其他设置", + "require_pin_after": "之后需要 PIN", + "always": "总是", + "minutes_to_pin_code": "${minute} 分钟" } From d7d3b78905849c9a0ba554940e349ddec7654e5f Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 23 Nov 2022 13:47:02 +0200 Subject: [PATCH 017/100] refactoring mapFomString method --- cw_core/lib/crypto_currency.dart | 218 +++++++----------- .../exchange/widgets/currency_picker.dart | 2 +- ...let_address_edit_or_create_view_model.dart | 2 +- 3 files changed, 82 insertions(+), 140 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index b483f8aa5..bcefe89f6 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -9,12 +9,14 @@ class CryptoCurrency extends EnumerableItem with Serializable { String title = '', int raw = -1, this.name, + this.fullName, this.iconPath, - this.tag,}) + this.tag}) : super(title: title, raw: raw); - final String? tag; final String? name; + final String? tag; + final String? fullName; final String? iconPath; static const all = [ @@ -70,161 +72,101 @@ class CryptoCurrency extends EnumerableItem with Serializable { CryptoCurrency.stx, ]; - static const xmr = CryptoCurrency(title: 'XMR', iconPath: 'assets/images/monero_icon.png', name: 'Monero', raw: 0); - static const ada = CryptoCurrency(title: 'ADA', iconPath: 'assets/images/ada_icon.png', name: 'Cardano', raw: 1); - static const bch = CryptoCurrency(title: 'BCH', iconPath: 'assets/images/bch_icon.png',name: 'Bitcoin Cash', raw: 2); - static const bnb = CryptoCurrency(title: 'BNB', iconPath: 'assets/images/bnb_icon.png', tag: 'BSC', name: 'Binance Coin', raw: 3); - static const btc = CryptoCurrency(title: 'BTC', iconPath: 'assets/images/btc.png', name: 'Bitcoin', raw: 4); - static const dai = CryptoCurrency(title: 'DAI', iconPath: 'assets/images/dai_icon.png', tag: 'ETH', name: 'Dai', raw: 5); - static const dash = CryptoCurrency(title: 'DASH', iconPath: 'assets/images/dash_icon.png', name: 'Dash', raw: 6); - static const eos = CryptoCurrency(title: 'EOS', iconPath: 'assets/images/eos_icon.png', name: 'EOS', raw: 7); - static const eth = CryptoCurrency(title: 'ETH', iconPath: 'assets/images/eth_icon.png', name: 'Ethereum', raw: 8); - static const ltc = CryptoCurrency(title: 'LTC', iconPath: 'assets/images/litecoin-ltc_icon.png', name: 'Litecoin', raw: 9); - static const nano = CryptoCurrency(title: 'NANO', raw: 10); - static const trx = CryptoCurrency(title: 'TRX', iconPath: 'assets/images/trx_icon.png', name: 'TRON', raw: 11); - static const usdt = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdt_icon.png', tag: 'OMNI', name: 'USDT', raw: 12); - static const usdterc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdterc20_icon.png', tag: 'ETH', name: 'USDT', raw: 13); - static const xlm = CryptoCurrency(title: 'XLM', iconPath: 'assets/images/xlm_icon.png', name: 'Stellar', raw: 14); - static const xrp = CryptoCurrency(title: 'XRP', iconPath: 'assets/images/xrp_icon.png', name: 'Ripple', raw: 15); - static const xhv = CryptoCurrency(title: 'XHV', iconPath: 'assets/images/xhv_logo.png', name: 'Haven Protocol', raw: 16); + static const xmr = CryptoCurrency(title: 'XMR', iconPath: 'assets/images/monero_icon.png', fullName: 'Monero', raw: 0, name: 'xmr'); + static const ada = CryptoCurrency(title: 'ADA', iconPath: 'assets/images/ada_icon.png', fullName: 'Cardano', raw: 1, name: 'ada'); + static const bch = CryptoCurrency(title: 'BCH', iconPath: 'assets/images/bch_icon.png',fullName: 'Bitcoin Cash', raw: 2, name: 'bch'); + static const bnb = CryptoCurrency(title: 'BNB', iconPath: 'assets/images/bnb_icon.png', tag: 'BSC', fullName: 'Binance Coin', raw: 3, name: 'bnb'); + static const btc = CryptoCurrency(title: 'BTC', iconPath: 'assets/images/btc.png', fullName: 'Bitcoin', raw: 4, name: 'btc'); + static const dai = CryptoCurrency(title: 'DAI', iconPath: 'assets/images/dai_icon.png', tag: 'ETH', fullName: 'Dai', raw: 5, name: 'dai'); + static const dash = CryptoCurrency(title: 'DASH', iconPath: 'assets/images/dash_icon.png', fullName: 'Dash', raw: 6, name: 'dash'); + static const eos = CryptoCurrency(title: 'EOS', iconPath: 'assets/images/eos_icon.png', fullName: 'EOS', raw: 7, name: 'eos'); + static const eth = CryptoCurrency(title: 'ETH', iconPath: 'assets/images/eth_icon.png', fullName: 'Ethereum', raw: 8, name: 'eth'); + static const ltc = CryptoCurrency(title: 'LTC', iconPath: 'assets/images/litecoin-ltc_icon.png', fullName: 'Litecoin', raw: 9, name: 'ltc'); + static const nano = CryptoCurrency(title: 'NANO', raw: 10, name: 'nano'); + static const trx = CryptoCurrency(title: 'TRX', iconPath: 'assets/images/trx_icon.png', fullName: 'TRON', raw: 11, name: 'trx'); + static const usdt = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdt_icon.png', tag: 'OMNI', fullName: 'USDT', raw: 12, name: 'usdt'); + static const usdterc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdterc20_icon.png', tag: 'ETH', fullName: 'USDT', raw: 13, name: 'usdterc20'); + static const xlm = CryptoCurrency(title: 'XLM', iconPath: 'assets/images/xlm_icon.png', fullName: 'Stellar', raw: 14, name: 'xlm'); + static const xrp = CryptoCurrency(title: 'XRP', iconPath: 'assets/images/xrp_icon.png', fullName: 'Ripple', raw: 15, name: 'xrp'); + static const xhv = CryptoCurrency(title: 'XHV', iconPath: 'assets/images/xhv_logo.png', fullName: 'Haven Protocol', raw: 16, name: 'xhv'); - static const xag = CryptoCurrency(title: 'XAG', tag: 'XHV', raw: 17); - static const xau = CryptoCurrency(title: 'XAU', tag: 'XHV', raw: 18); - static const xaud = CryptoCurrency(title: 'XAUD', tag: 'XHV', raw: 19); - static const xbtc = CryptoCurrency(title: 'XBTC', tag: 'XHV', raw: 20); - static const xcad = CryptoCurrency(title: 'XCAD', tag: 'XHV', raw: 21); - static const xchf = CryptoCurrency(title: 'XCHF', tag: 'XHV', raw: 22); - static const xcny = CryptoCurrency(title: 'XCNY', tag: 'XHV', raw: 23); - static const xeur = CryptoCurrency(title: 'XEUR', tag: 'XHV', raw: 24); - static const xgbp = CryptoCurrency(title: 'XGBP', tag: 'XHV', raw: 25); - static const xjpy = CryptoCurrency(title: 'XJPY', tag: 'XHV', raw: 26); - static const xnok = CryptoCurrency(title: 'XNOK', tag: 'XHV', raw: 27); - static const xnzd = CryptoCurrency(title: 'XNZD', tag: 'XHV', raw: 28); - static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29); + static const xag = CryptoCurrency(title: 'XAG', tag: 'XHV', raw: 17, name: 'xag'); + static const xau = CryptoCurrency(title: 'XAU', tag: 'XHV', raw: 18, name: 'xau'); + static const xaud = CryptoCurrency(title: 'XAUD', tag: 'XHV', raw: 19, name: 'xaud'); + static const xbtc = CryptoCurrency(title: 'XBTC', tag: 'XHV', raw: 20, name: 'xbtc'); + static const xcad = CryptoCurrency(title: 'XCAD', tag: 'XHV', raw: 21, name: 'xcad'); + static const xchf = CryptoCurrency(title: 'XCHF', tag: 'XHV', raw: 22, name: 'xchf'); + static const xcny = CryptoCurrency(title: 'XCNY', tag: 'XHV', raw: 23, name: 'xcny'); + static const xeur = CryptoCurrency(title: 'XEUR', tag: 'XHV', raw: 24, name: 'xeur'); + static const xgbp = CryptoCurrency(title: 'XGBP', tag: 'XHV', raw: 25, name: 'xgbp'); + static const xjpy = CryptoCurrency(title: 'XJPY', tag: 'XHV', raw: 26, name: 'xjpy'); + static const xnok = CryptoCurrency(title: 'XNOK', tag: 'XHV', raw: 27, name: 'xnok'); + static const xnzd = CryptoCurrency(title: 'XNZD', tag: 'XHV', raw: 28, name: 'xnzd'); + static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29, name: 'xusd'); - static const ape = CryptoCurrency(title: 'APE', iconPath: 'assets/images/ape_icon.png', tag: 'ETH', raw: 30); - static const avaxc = CryptoCurrency(title: 'AVAX', iconPath: 'assets/images/avaxc_icon.png', tag: 'C-CHAIN', raw: 31); - static const btt = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/btt_icon.png', raw: 32); - static const bttbsc = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/bttbsc_icon.png', tag: 'BSC', raw: 33); - static const doge = CryptoCurrency(title: 'DOGE', iconPath: 'assets/images/doge_icon.png', raw: 34); - static const firo = CryptoCurrency(title: 'FIRO', iconPath: 'assets/images/firo_icon.png', raw: 35); - static const usdttrc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdttrc20_icon.png', tag: 'TRX', raw: 36); - static const hbar = CryptoCurrency(title: 'HBAR', iconPath: 'assets/images/hbar_icon.png', raw: 37); - static const sc = CryptoCurrency(title: 'SC', iconPath: 'assets/images/sc_icon.png', raw: 38); - static const sol = CryptoCurrency(title: 'SOL', iconPath: 'assets/images/sol_icon.png', raw: 39); - static const usdc = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'ETH', raw: 40); - static const usdcsol = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdcsol_icon.png', tag: 'SOL', raw: 41); - static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', name: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 42); - static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', name: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 43); - static const zen = CryptoCurrency(title: 'ZEN', iconPath: 'assets/images/zen_icon.png', raw: 44); - static const xvg = CryptoCurrency(title: 'XVG', name: 'Verge', iconPath: 'assets/images/xvg_icon.png', raw: 45); + static const ape = CryptoCurrency(title: 'APE', iconPath: 'assets/images/ape_icon.png', tag: 'ETH', raw: 30, name: 'ape'); + static const avaxc = CryptoCurrency(title: 'AVAX', iconPath: 'assets/images/avaxc_icon.png', tag: 'C-CHAIN', raw: 31, name: 'avaxc'); + static const btt = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/btt_icon.png', raw: 32, name: 'btt'); + static const bttbsc = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/bttbsc_icon.png', tag: 'BSC', raw: 33, name: 'bttbsc'); + static const doge = CryptoCurrency(title: 'DOGE', iconPath: 'assets/images/doge_icon.png', raw: 34, name: 'doge'); + static const firo = CryptoCurrency(title: 'FIRO', iconPath: 'assets/images/firo_icon.png', raw: 35, name: 'firo'); + static const usdttrc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdttrc20_icon.png', tag: 'TRX', raw: 36, name: 'usdttrc20'); + static const hbar = CryptoCurrency(title: 'HBAR', iconPath: 'assets/images/hbar_icon.png', raw: 37, name: 'hbar'); + static const sc = CryptoCurrency(title: 'SC', iconPath: 'assets/images/sc_icon.png', raw: 38, name: 'sc'); + static const sol = CryptoCurrency(title: 'SOL', iconPath: 'assets/images/sol_icon.png', raw: 39, name: 'sol'); + static const usdc = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'ETH', raw: 40, name: 'usdc'); + static const usdcsol = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdcsol_icon.png', tag: 'SOL', raw: 41, name: 'usdcsol'); + static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 42, name: 'zaddr'); + static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 43, name: 'zec'); + static const zen = CryptoCurrency(title: 'ZEN', iconPath: 'assets/images/zen_icon.png', raw: 44, name: 'zen'); + static const xvg = CryptoCurrency(title: 'XVG', fullName: 'Verge', iconPath: 'assets/images/xvg_icon.png', raw: 45, name: 'xvg'); - static const usdcpoly = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'POLY', raw: 46); - static const dcr = CryptoCurrency(title: 'DCR', iconPath: 'assets/images/dcr_icon.png', raw: 47); - static const husd = CryptoCurrency(title: 'HUSD', iconPath: 'assets/images/husd_icon.png', tag: 'ETH', raw: 48); - static const kmd = CryptoCurrency(title: 'KMD', iconPath: 'assets/images/kmd_icon.png', raw: 49); - static const mana = CryptoCurrency(title: 'MANA', iconPath: 'assets/images/mana_icon.png', tag: 'ETH', raw: 50); - static const maticpoly = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'POLY', raw: 51); - static const matic = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'ETH', raw: 52); - static const mkr = CryptoCurrency(title: 'MKR', iconPath: 'assets/images/mkr_icon.png', tag: 'ETH', raw: 53); - static const near = CryptoCurrency(title: 'NEAR', iconPath: 'assets/images/near_icon.png', raw: 54); - static const oxt = CryptoCurrency(title: 'OXT', iconPath: 'assets/images/oxt_icon.png', tag: 'ETH', raw: 55); - static const paxg = CryptoCurrency(title: 'PAXG', iconPath: 'assets/images/paxg_icon.png', tag: 'ETH', raw: 56); - static const pivx = CryptoCurrency(title: 'PIVX', iconPath: 'assets/images/pivx_icon.png', raw: 57); - static const rune = CryptoCurrency(title: 'RUNE', iconPath: 'assets/images/rune_icon.png', raw: 58); - static const rvn = CryptoCurrency(title: 'RVN', iconPath: 'assets/images/rvn_icon.png', raw: 59); - static const scrt = CryptoCurrency(title: 'SCRT', iconPath: 'assets/images/scrt_icon.png', raw: 60); - static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 61); - static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 62); + static const usdcpoly = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'POLY', raw: 46, name: 'usdcpoly'); + static const dcr = CryptoCurrency(title: 'DCR', iconPath: 'assets/images/dcr_icon.png', raw: 47, name: 'dcr'); + static const husd = CryptoCurrency(title: 'HUSD', iconPath: 'assets/images/husd_icon.png', tag: 'ETH', raw: 48, name: 'husd'); + static const kmd = CryptoCurrency(title: 'KMD', iconPath: 'assets/images/kmd_icon.png', raw: 49, name: 'kmd'); + static const mana = CryptoCurrency(title: 'MANA', iconPath: 'assets/images/mana_icon.png', tag: 'ETH', raw: 50, name: 'mana'); + static const maticpoly = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'POLY', raw: 51, name: 'maticpoly'); + static const matic = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'ETH', raw: 52, name: 'matic'); + static const mkr = CryptoCurrency(title: 'MKR', iconPath: 'assets/images/mkr_icon.png', tag: 'ETH', raw: 53, name: 'mkr'); + static const near = CryptoCurrency(title: 'NEAR', iconPath: 'assets/images/near_icon.png', raw: 54, name: 'near'); + static const oxt = CryptoCurrency(title: 'OXT', iconPath: 'assets/images/oxt_icon.png', tag: 'ETH', raw: 55, name: 'oxt'); + static const paxg = CryptoCurrency(title: 'PAXG', iconPath: 'assets/images/paxg_icon.png', tag: 'ETH', raw: 56, name: 'paxg'); + static const pivx = CryptoCurrency(title: 'PIVX', iconPath: 'assets/images/pivx_icon.png', raw: 57, name: 'pivx'); + static const rune = CryptoCurrency(title: 'RUNE', iconPath: 'assets/images/rune_icon.png', raw: 58, name: 'rune'); + static const rvn = CryptoCurrency(title: 'RVN', iconPath: 'assets/images/rvn_icon.png', raw: 59, name: 'rvn'); + static const scrt = CryptoCurrency(title: 'SCRT', iconPath: 'assets/images/scrt_icon.png', raw: 60, name: 'scrt'); + static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 61, name: 'uni'); + static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 62, name: 'stx'); - static Map rawCurrencyMap = + static final Map _rawCurrencyMap = all.fold>({}, (acc, item) { acc.addAll({item.raw: item}); return acc; }); - static const mapFromString = { - 'xmr': CryptoCurrency.xmr, - 'ada': CryptoCurrency.ada, - 'bch': CryptoCurrency.bch, - 'bnb': CryptoCurrency.bnb, - 'btc': CryptoCurrency.btc, - 'dai': CryptoCurrency.dai, - 'dash': CryptoCurrency.dash, - 'eos': CryptoCurrency.eos, - 'eth': CryptoCurrency.eth, - 'ltc': CryptoCurrency.ltc, - 'nano': CryptoCurrency.nano, - 'trx': CryptoCurrency.trx, - 'usdt': CryptoCurrency.usdt, - 'usdterc20': CryptoCurrency.usdterc20, - 'xlm': CryptoCurrency.xlm, - 'xrp': CryptoCurrency.xrp, - 'xhv': CryptoCurrency.xhv, - 'xag': CryptoCurrency.xag, - 'xau': CryptoCurrency.xau, - 'xaud': CryptoCurrency.xaud, - 'xbtc': CryptoCurrency.xbtc, - 'xcad': CryptoCurrency.xcad, - 'xchf': CryptoCurrency.xchf, - 'xcny': CryptoCurrency.xcny, - 'xeur': CryptoCurrency.xeur, - 'xgbp': CryptoCurrency.xgbp, - 'xjpy': CryptoCurrency.xjpy, - 'xnok': CryptoCurrency.xnok, - 'xnzd': CryptoCurrency.xnzd, - 'xusd': CryptoCurrency.xusd, - 'ape': CryptoCurrency.ape, - 'avaxc': CryptoCurrency.avaxc, - 'btt': CryptoCurrency.btt, - 'bttbsc': CryptoCurrency.bttbsc, - 'doge': CryptoCurrency.doge, - 'firo': CryptoCurrency.firo, - 'usdttrc20': CryptoCurrency.usdttrc20, - 'hbar': CryptoCurrency.hbar, - 'sc': CryptoCurrency.sc, - 'sol': CryptoCurrency.sol, - 'usdc': CryptoCurrency.usdc, - 'usdcsol': CryptoCurrency.usdcsol, - 'zaddr': CryptoCurrency.zaddr, - 'zec': CryptoCurrency.zec, - 'zen': CryptoCurrency.zen, - 'xvg': CryptoCurrency.xvg, - 'usdcpoly': CryptoCurrency.usdcpoly, - 'dcr': CryptoCurrency.dcr, - 'husd': CryptoCurrency.husd, - 'kmd': CryptoCurrency.kmd, - 'mana': CryptoCurrency.mana, - 'maticpoly': CryptoCurrency.maticpoly, - 'matic': CryptoCurrency.matic, - 'mkr': CryptoCurrency.mkr, - 'near': CryptoCurrency.near, - 'oxt': CryptoCurrency.oxt, - 'paxg': CryptoCurrency.paxg, - 'pivx': CryptoCurrency.pivx, - 'rune': CryptoCurrency.rune, - 'rvn': CryptoCurrency.rvn, - 'scrt': CryptoCurrency.scrt, - 'uni': CryptoCurrency.uni, - 'stx': CryptoCurrency.stx - }; + static final Map _nameCurrencyMap = + all.fold>({}, (acc, item) { + acc.addAll({item.name: item}); + return acc; + }); static CryptoCurrency deserialize({required int raw}) { - if (CryptoCurrency.rawCurrencyMap[raw] == null) { + if (CryptoCurrency._rawCurrencyMap[raw] == null) { final s = 'Unexpected token: $raw for CryptoCurrency deserialize'; throw ArgumentError.value(raw, 'raw', s); } - return CryptoCurrency.rawCurrencyMap[raw]!; + return CryptoCurrency._rawCurrencyMap[raw]!; } - static CryptoCurrency fromString(String raw) { + static CryptoCurrency fromString(String name) { - if (CryptoCurrency.mapFromString[raw.toLowerCase()] == null) { - final s = 'Unexpected token: $raw for CryptoCurrency fromString'; - throw ArgumentError.value(raw, 'raw', s); + if (CryptoCurrency._nameCurrencyMap[name.toLowerCase()] == null) { + final s = 'Unexpected token: $name for CryptoCurrency fromString'; + throw ArgumentError.value(name, 'name', s); } - return CryptoCurrency.mapFromString[raw.toLowerCase()]!; + return CryptoCurrency._nameCurrencyMap[name.toLowerCase()]!; } @override diff --git a/lib/src/screens/exchange/widgets/currency_picker.dart b/lib/src/screens/exchange/widgets/currency_picker.dart index 9f8b9e493..b785378c5 100644 --- a/lib/src/screens/exchange/widgets/currency_picker.dart +++ b/lib/src/screens/exchange/widgets/currency_picker.dart @@ -56,7 +56,7 @@ class CurrencyPickerState extends State { .where((element) => (element.title != null ? element.title.toLowerCase().contains(subString.toLowerCase()) : false) || (element.tag != null ? element.tag!.toLowerCase().contains(subString.toLowerCase()) : false) || - (element.name != null ? element.name!.toLowerCase().contains(subString.toLowerCase()) : false)) + (element.fullName != null ? element.fullName!.toLowerCase().contains(subString.toLowerCase()) : false)) .toList(); return; } diff --git a/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart b/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart index c9d2c77f5..43db6099f 100644 --- a/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart +++ b/lib/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart @@ -30,7 +30,7 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store { {required WalletBase wallet, dynamic item}) : isEdit = item != null, state = AddressEditOrCreateStateInitial(), - label = item?.name as String? ?? '', + label = item?.fullName as String? ?? '', _item = item, _wallet = wallet; From ec15a9b229a8029d61f7d7ac3945a33182d1aa1a Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 28 Nov 2022 00:53:20 +0200 Subject: [PATCH 018/100] fix updateTradeList bug --- lib/store/dashboard/trades_store.dart | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/store/dashboard/trades_store.dart b/lib/store/dashboard/trades_store.dart index 6e763196b..72442b46f 100644 --- a/lib/store/dashboard/trades_store.dart +++ b/lib/store/dashboard/trades_store.dart @@ -31,13 +31,8 @@ abstract class TradesStoreBase with Store { void setTrade(Trade trade) => this.trade = trade; @action - Future updateTradeList() async { - if (trade == null) { - return; - } - - trades = tradesSource.values.map((trade) => TradeListItem( - trade: trade!, - settingsStore: settingsStore)).toList(); - } + Future updateTradeList() async => trades = + tradesSource.values.map((trade) => TradeListItem( + trade: trade, + settingsStore: settingsStore)).toList(); } \ No newline at end of file From 0fda0531507073286afa7a21c64163aefab87cb8 Mon Sep 17 00:00:00 2001 From: Serhii Date: Tue, 29 Nov 2022 21:53:07 +0200 Subject: [PATCH 019/100] remove Hive from CryptoCurrency --- cw_core/lib/crypto_currency.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index bcefe89f6..686064f09 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -1,20 +1,16 @@ import 'package:cw_core/enumerable_item.dart'; -import 'package:hive/hive.dart'; -part 'crypto_currency.g.dart'; - -@HiveType(typeId: 0) class CryptoCurrency extends EnumerableItem with Serializable { const CryptoCurrency({ String title = '', int raw = -1, - this.name, + required this.name, this.fullName, this.iconPath, this.tag}) : super(title: title, raw: raw); - final String? name; + final String name; final String? tag; final String? fullName; final String? iconPath; From 8511805ee35fca9ddbf5818fb50622dc305c180b Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 30 Nov 2022 10:00:05 +0200 Subject: [PATCH 020/100] Fix correct adjusted amount for custom redeem --- lib/ionia/ionia_gift_card.dart | 2 +- lib/ionia/ionia_service.dart | 4 +-- .../ionia/cards/ionia_custom_redeem_page.dart | 2 +- .../cards/ionia_gift_card_detail_page.dart | 28 +++++++++---------- .../ionia/cards/ionia_more_options_page.dart | 6 ++-- .../ionia/widgets/ionia_filter_modal.dart | 2 +- .../ionia_gift_card_details_view_model.dart | 10 +++++-- 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/lib/ionia/ionia_gift_card.dart b/lib/ionia/ionia_gift_card.dart index b729e261f..04b45b907 100644 --- a/lib/ionia/ionia_gift_card.dart +++ b/lib/ionia/ionia_gift_card.dart @@ -37,7 +37,7 @@ class IoniaGiftCard { purchaseAmount: element['PurchaseAmount'] as double, actualAmount: element['ActualAmount'] as double, totalTransactionAmount: element['TotalTransactionAmount'] as double, - totalDashTransactionAmount: element['TotalDashTransactionAmount'] as double, + totalDashTransactionAmount: element['TotalDashTransactionAmount'] != null ? element['TotalDashTransactionAmount'] as double : 0.0, remainingAmount: element['RemainingAmount'] as double, isActive: element['IsActive'] as bool, isEmpty: element['IsEmpty'] as bool, diff --git a/lib/ionia/ionia_service.dart b/lib/ionia/ionia_service.dart index 942bc25b5..51e23ad28 100644 --- a/lib/ionia/ionia_service.dart +++ b/lib/ionia/ionia_service.dart @@ -148,8 +148,8 @@ class IoniaService { // Redeem - Future redeem(IoniaGiftCard giftCard) async { - await chargeGiftCard(giftCardId: giftCard.id, amount: giftCard.remainingAmount); + Future redeem({required int giftCardId, required double amount}) async { + await chargeGiftCard(giftCardId: giftCardId, amount: amount); } // Get Gift Card diff --git a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart index 53e41ff22..f9ce0ae88 100644 --- a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart +++ b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart @@ -149,7 +149,7 @@ class IoniaCustomRedeemPage extends BasePage { padding: EdgeInsets.only(bottom: 12), child: PrimaryButton( onPressed: () { - Navigator.of(context).pop(ioniaCustomRedeemViewModel.remaining.toString()); + Navigator.of(context).pop([ioniaCustomRedeemViewModel.remaining.toString(), ioniaCustomRedeemViewModel.amount.toString()]); }, isDisabled: ioniaCustomRedeemViewModel.disableRedeem, text: S.of(context).add_custom_redemption, diff --git a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart index 1c768fa17..2e7162e40 100644 --- a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart @@ -130,19 +130,19 @@ class IoniaGiftCardDetailPage extends BasePage { if (!viewModel.giftCard.isEmpty) { return Column( children: [ - //PrimaryButton( - // onPressed: () async { - // final amount = await Navigator.of(context) - // .pushNamed(Routes.ioniaMoreOptionsPage, arguments: [viewModel.giftCard]) as String; - // if (amount != null) { - // viewModel.updateRemaining(double.parse(amount)); - // } - // }, - // text: S.of(context).more_options, - // color: Theme.of(context).accentTextTheme!.caption!.color!, - // textColor: Theme.of(context).primaryTextTheme!.headline6!.color!, - //), - //SizedBox(height: 12), + PrimaryButton( + onPressed: () async { + final amount = await Navigator.of(context) + .pushNamed(Routes.ioniaMoreOptionsPage, arguments: [viewModel.giftCard]) as List?; + if (amount != null) { + viewModel.updateRemaining( balance: double.parse(amount.first), customAmount: double.parse(amount.last)); + } + }, + text: S.of(context).more_options, + color: Theme.of(context).accentTextTheme.caption!.color!, + textColor: Theme.of(context).primaryTextTheme.headline6!.color!, + ), + SizedBox(height: 12), LoadingPrimaryButton( isLoading: viewModel.redeemState is IsExecutingState, onPressed: () => viewModel.redeem().then( @@ -152,7 +152,7 @@ class IoniaGiftCardDetailPage extends BasePage { }, ), text: S.of(context).mark_as_redeemed, - color: Theme.of(context).accentTextTheme!.bodyText1!.color!, + color: Theme.of(context).accentTextTheme.bodyText1!.color!, textColor: Colors.white, ), ], diff --git a/lib/src/screens/ionia/cards/ionia_more_options_page.dart b/lib/src/screens/ionia/cards/ionia_more_options_page.dart index 84f0bed30..d4e378f84 100644 --- a/lib/src/screens/ionia/cards/ionia_more_options_page.dart +++ b/lib/src/screens/ionia/cards/ionia_more_options_page.dart @@ -35,9 +35,9 @@ class IoniaMoreOptionsPage extends BasePage { SizedBox(height: 40,), InkWell( onTap: () async { - final amount = await Navigator.of(context).pushNamed(Routes.ioniaCustomRedeemPage, arguments: [giftCard]) as String; - if(amount.isNotEmpty){ - Navigator.pop(context, amount); + final amounts = await Navigator.of(context).pushNamed(Routes.ioniaCustomRedeemPage, arguments: [giftCard]) as List; + if(amounts.first.isNotEmpty){ + Navigator.pop(context, amounts); } }, child: _GradiantContainer( diff --git a/lib/src/screens/ionia/widgets/ionia_filter_modal.dart b/lib/src/screens/ionia/widgets/ionia_filter_modal.dart index ec6e84cc0..b6bcac070 100644 --- a/lib/src/screens/ionia/widgets/ionia_filter_modal.dart +++ b/lib/src/screens/ionia/widgets/ionia_filter_modal.dart @@ -53,7 +53,7 @@ class IoniaFilterModal extends StatelessWidget { prefixIcon: searchIcon, hintText: S.of(context).search_category, contentPadding: EdgeInsets.only(bottom: 5), - fillColor: Theme.of(context).textTheme!.subtitle1!.backgroundColor!, + fillColor: Theme.of(context).textTheme.subtitle1?.backgroundColor, border: OutlineInputBorder( borderSide: BorderSide.none, borderRadius: BorderRadius.circular(8), diff --git a/lib/view_model/ionia/ionia_gift_card_details_view_model.dart b/lib/view_model/ionia/ionia_gift_card_details_view_model.dart index 8e0a2795b..745f2d530 100644 --- a/lib/view_model/ionia/ionia_gift_card_details_view_model.dart +++ b/lib/view_model/ionia/ionia_gift_card_details_view_model.dart @@ -15,6 +15,7 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store { required this.giftCard}) : redeemState = InitialExecutionState(), remainingAmount = giftCard.remainingAmount, + adjustedAmount = 0, brightness = 0; final IoniaService ioniaService; @@ -27,6 +28,8 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store { @observable double remainingAmount; + double adjustedAmount; + @observable ExecutionState redeemState; @@ -35,7 +38,7 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store { giftCard.remainingAmount = remainingAmount; try { redeemState = IsExecutingState(); - await ioniaService.redeem(giftCard); + await ioniaService.redeem(giftCardId: giftCard.id, amount : adjustedAmount > 0 ? adjustedAmount : giftCard.remainingAmount); giftCard = await ioniaService.getGiftCard(id: giftCard.id); redeemState = ExecutedSuccessfullyState(); } catch(e) { @@ -44,8 +47,9 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store { } @action - void updateRemaining(double amount){ - remainingAmount = amount; + void updateRemaining({required double balance, required double customAmount}) { + remainingAmount = balance; + adjustedAmount = customAmount; } void increaseBrightness() async { From 0c28d83cbcb17a20053e6787732c0c291a292c23 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 30 Nov 2022 22:50:42 +0200 Subject: [PATCH 021/100] Fix authentication required when minimize app --- android/.project | 11 ++++++ .../org.eclipse.buildship.core.prefs | 13 ++++++- cw_monero/android/.project | 11 ++++++ ios/Podfile | 2 +- ios/Podfile.lock | 34 +++++++++---------- lib/src/screens/root/root.dart | 11 +++++- 6 files changed, 62 insertions(+), 20 deletions(-) diff --git a/android/.project b/android/.project index 17c95d4b1..93e645b27 100644 --- a/android/.project +++ b/android/.project @@ -14,4 +14,15 @@ org.eclipse.buildship.core.gradleprojectnature + + + 1668366526072 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs index 9d2efc8e7..52768efe3 100644 --- a/android/.settings/org.eclipse.buildship.core.prefs +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,13 @@ +arguments=--init-script /var/folders/_g/6xnbffg10l741qh63jr5cds80000gp/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/_g/6xnbffg10l741qh63jr5cds80000gp/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= -eclipse.preferences.version=1 \ No newline at end of file +eclipse.preferences.version=1 +gradle.user.home= +java.home=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/cw_monero/android/.project b/cw_monero/android/.project index e0799208f..15eb18708 100644 --- a/cw_monero/android/.project +++ b/cw_monero/android/.project @@ -20,4 +20,15 @@ org.eclipse.jdt.core.javanature org.eclipse.buildship.core.gradleprojectnature + + + 1668366526081 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/ios/Podfile b/ios/Podfile index b29d40484..d02ce2d3f 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '14.0' source 'https://github.com/CocoaPods/Specs.git' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3a810430d..28ee07db9 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -7,7 +7,7 @@ PODS: - connectivity (0.0.1): - Flutter - Reachability - - CryptoSwift (1.3.2) + - CryptoSwift (1.6.0) - cw_haven (0.0.1): - cw_haven/Boost (= 0.0.1) - cw_haven/Haven (= 0.0.1) @@ -67,14 +67,14 @@ PODS: - Flutter - devicelocale (0.0.1): - Flutter - - DKImagePickerController/Core (4.3.2): + - DKImagePickerController/Core (4.3.4): - DKImagePickerController/ImageDataManager - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.2) - - DKImagePickerController/PhotoGallery (4.3.2): + - DKImagePickerController/ImageDataManager (4.3.4) + - DKImagePickerController/PhotoGallery (4.3.4): - DKImagePickerController/Core - DKPhotoGallery - - DKImagePickerController/Resource (4.3.2) + - DKImagePickerController/Resource (4.3.4) - DKPhotoGallery (0.0.17): - DKPhotoGallery/Core (= 0.0.17) - DKPhotoGallery/Model (= 0.0.17) @@ -116,15 +116,15 @@ PODS: - platform_device_id (0.0.1): - Flutter - Reachability (3.2) - - SDWebImage (5.9.1): - - SDWebImage/Core (= 5.9.1) - - SDWebImage/Core (5.9.1) + - SDWebImage (5.13.5): + - SDWebImage/Core (= 5.13.5) + - SDWebImage/Core (5.13.5) - share_plus (0.0.1): - Flutter - shared_preferences_ios (0.0.1): - Flutter - - SwiftProtobuf (1.18.0) - - SwiftyGif (5.3.0) + - SwiftProtobuf (1.20.2) + - SwiftyGif (5.4.3) - uni_links (0.0.1): - Flutter - UnstoppableDomainsResolution (4.0.0): @@ -221,14 +221,14 @@ SPEC CHECKSUMS: barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 BigInt: f668a80089607f521586bbe29513d708491ef2f7 connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 - CryptoSwift: 093499be1a94b0cae36e6c26b70870668cb56060 + CryptoSwift: 562f8eceb40e80796fffc668b0cad9313284cfa6 cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a cw_monero: 4cf3b96f2da8e95e2ef7d6703dd4d2c509127b7d cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 devicelocale: b22617f40038496deffba44747101255cee005b0 - DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d + DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 @@ -240,16 +240,16 @@ SPEC CHECKSUMS: permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 - SDWebImage: a990c053fff71e388a10f3357edb0be17929c9c5 + SDWebImage: 23d714cd599354ee7906dbae26dff89b421c4370 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad - SwiftProtobuf: c3c12645230d9b09c72267e0de89468c5543bd86 - SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40 + SwiftProtobuf: 9f458aaa7844a2fc0b910053e66578bc4e2da9c1 + SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780 uni_links: d97da20c7701486ba192624d99bffaaffcfc298a UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f +PODFILE CHECKSUM: f2068ffd90d0bcc7e39f94a818dbbbbdbe8cda3e -COCOAPODS: 1.11.3 +COCOAPODS: 1.11.2 diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index c507f6e1f..8d2b61a65 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -1,4 +1,6 @@ import 'dart:async'; +import 'package:cake_wallet/core/auth_service.dart'; +import 'package:cake_wallet/di.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; @@ -28,15 +30,18 @@ class RootState extends State with WidgetsBindingObserver { RootState() : _isInactiveController = StreamController.broadcast(), _isInactive = false, + _requestAuth = getIt.get().requireAuth(), _postFrameCallback = false; Stream get isInactive => _isInactiveController.stream; StreamController _isInactiveController; bool _isInactive; bool _postFrameCallback; + bool _requestAuth; @override void initState() { + _isInactiveController = StreamController.broadcast(); _isInactive = false; _postFrameCallback = false; @@ -52,6 +57,10 @@ class RootState extends State with WidgetsBindingObserver { return; } + setState(() { + _requestAuth = getIt.get().requireAuth(); + }); + if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) { setState(() => _setInactive(true)); @@ -65,7 +74,7 @@ class RootState extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { - if (_isInactive && !_postFrameCallback) { + if (_isInactive && !_postFrameCallback && _requestAuth) { _postFrameCallback = true; WidgetsBinding.instance.addPostFrameCallback((_) { widget.navigatorKey.currentState?.pushNamed(Routes.unlock, From 34cfe7591f7917150c0191af92cf9412f75fe561 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 30 Nov 2022 22:57:48 +0200 Subject: [PATCH 022/100] Fix authentication required when minimize app --- lib/src/screens/root/root.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index c507f6e1f..8d2b61a65 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -1,4 +1,6 @@ import 'dart:async'; +import 'package:cake_wallet/core/auth_service.dart'; +import 'package:cake_wallet/di.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; @@ -28,15 +30,18 @@ class RootState extends State with WidgetsBindingObserver { RootState() : _isInactiveController = StreamController.broadcast(), _isInactive = false, + _requestAuth = getIt.get().requireAuth(), _postFrameCallback = false; Stream get isInactive => _isInactiveController.stream; StreamController _isInactiveController; bool _isInactive; bool _postFrameCallback; + bool _requestAuth; @override void initState() { + _isInactiveController = StreamController.broadcast(); _isInactive = false; _postFrameCallback = false; @@ -52,6 +57,10 @@ class RootState extends State with WidgetsBindingObserver { return; } + setState(() { + _requestAuth = getIt.get().requireAuth(); + }); + if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) { setState(() => _setInactive(true)); @@ -65,7 +74,7 @@ class RootState extends State with WidgetsBindingObserver { @override Widget build(BuildContext context) { - if (_isInactive && !_postFrameCallback) { + if (_isInactive && !_postFrameCallback && _requestAuth) { _postFrameCallback = true; WidgetsBinding.instance.addPostFrameCallback((_) { widget.navigatorKey.currentState?.pushNamed(Routes.unlock, From 23d2e54c464569742c70b9498137ba265621f344 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 30 Nov 2022 23:08:31 +0200 Subject: [PATCH 023/100] Revert commit --- android/.project | 11 ------ .../org.eclipse.buildship.core.prefs | 13 +------ cw_monero/android/.project | 11 ------ ios/Podfile | 2 +- ios/Podfile.lock | 34 +++++++++---------- 5 files changed, 19 insertions(+), 52 deletions(-) diff --git a/android/.project b/android/.project index 93e645b27..17c95d4b1 100644 --- a/android/.project +++ b/android/.project @@ -14,15 +14,4 @@ org.eclipse.buildship.core.gradleprojectnature - - - 1668366526072 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs index 52768efe3..9d2efc8e7 100644 --- a/android/.settings/org.eclipse.buildship.core.prefs +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -1,13 +1,2 @@ -arguments=--init-script /var/folders/_g/6xnbffg10l741qh63jr5cds80000gp/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/_g/6xnbffg10l741qh63jr5cds80000gp/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle -auto.sync=false -build.scans.enabled=false -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= -eclipse.preferences.version=1 -gradle.user.home= -java.home=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home -jvm.arguments= -offline.mode=false -override.workspace.settings=true -show.console.view=true -show.executions.view=true +eclipse.preferences.version=1 \ No newline at end of file diff --git a/cw_monero/android/.project b/cw_monero/android/.project index 15eb18708..e0799208f 100644 --- a/cw_monero/android/.project +++ b/cw_monero/android/.project @@ -20,15 +20,4 @@ org.eclipse.jdt.core.javanature org.eclipse.buildship.core.gradleprojectnature - - - 1668366526081 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - diff --git a/ios/Podfile b/ios/Podfile index d02ce2d3f..b29d40484 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '14.0' +platform :ios, '11.0' source 'https://github.com/CocoaPods/Specs.git' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 28ee07db9..3a810430d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -7,7 +7,7 @@ PODS: - connectivity (0.0.1): - Flutter - Reachability - - CryptoSwift (1.6.0) + - CryptoSwift (1.3.2) - cw_haven (0.0.1): - cw_haven/Boost (= 0.0.1) - cw_haven/Haven (= 0.0.1) @@ -67,14 +67,14 @@ PODS: - Flutter - devicelocale (0.0.1): - Flutter - - DKImagePickerController/Core (4.3.4): + - DKImagePickerController/Core (4.3.2): - DKImagePickerController/ImageDataManager - DKImagePickerController/Resource - - DKImagePickerController/ImageDataManager (4.3.4) - - DKImagePickerController/PhotoGallery (4.3.4): + - DKImagePickerController/ImageDataManager (4.3.2) + - DKImagePickerController/PhotoGallery (4.3.2): - DKImagePickerController/Core - DKPhotoGallery - - DKImagePickerController/Resource (4.3.4) + - DKImagePickerController/Resource (4.3.2) - DKPhotoGallery (0.0.17): - DKPhotoGallery/Core (= 0.0.17) - DKPhotoGallery/Model (= 0.0.17) @@ -116,15 +116,15 @@ PODS: - platform_device_id (0.0.1): - Flutter - Reachability (3.2) - - SDWebImage (5.13.5): - - SDWebImage/Core (= 5.13.5) - - SDWebImage/Core (5.13.5) + - SDWebImage (5.9.1): + - SDWebImage/Core (= 5.9.1) + - SDWebImage/Core (5.9.1) - share_plus (0.0.1): - Flutter - shared_preferences_ios (0.0.1): - Flutter - - SwiftProtobuf (1.20.2) - - SwiftyGif (5.4.3) + - SwiftProtobuf (1.18.0) + - SwiftyGif (5.3.0) - uni_links (0.0.1): - Flutter - UnstoppableDomainsResolution (4.0.0): @@ -221,14 +221,14 @@ SPEC CHECKSUMS: barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 BigInt: f668a80089607f521586bbe29513d708491ef2f7 connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 - CryptoSwift: 562f8eceb40e80796fffc668b0cad9313284cfa6 + CryptoSwift: 093499be1a94b0cae36e6c26b70870668cb56060 cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a cw_monero: 4cf3b96f2da8e95e2ef7d6703dd4d2c509127b7d cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7 device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 devicelocale: b22617f40038496deffba44747101255cee005b0 - DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac + DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 @@ -240,16 +240,16 @@ SPEC CHECKSUMS: permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 - SDWebImage: 23d714cd599354ee7906dbae26dff89b421c4370 + SDWebImage: a990c053fff71e388a10f3357edb0be17929c9c5 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad - SwiftProtobuf: 9f458aaa7844a2fc0b910053e66578bc4e2da9c1 - SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780 + SwiftProtobuf: c3c12645230d9b09c72267e0de89468c5543bd86 + SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40 uni_links: d97da20c7701486ba192624d99bffaaffcfc298a UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: f2068ffd90d0bcc7e39f94a818dbbbbdbe8cda3e +PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 From dd9e48558e63d0af448654439609600ff03ebc5d Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 30 Nov 2022 23:21:56 +0200 Subject: [PATCH 024/100] Attempt to fix test by upgrading ubuntu version --- .github/workflows/pr_test_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 190b891e1..c98e9604a 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -7,7 +7,7 @@ on: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04(ubuntu-latest) steps: - uses: actions/checkout@v2 From 57382ef7dc1f0bde5a2e009bfb70c4b5560cf4fb Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 30 Nov 2022 23:34:32 +0200 Subject: [PATCH 025/100] revert ubuntu version --- .github/workflows/pr_test_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index c98e9604a..190b891e1 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -7,7 +7,7 @@ on: jobs: test: - runs-on: ubuntu-20.04(ubuntu-latest) + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 From 292c4c396cc2a313d3b3a352c10bb8caebbe39d1 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 30 Nov 2022 21:18:12 +0200 Subject: [PATCH 026/100] remove HUSD and rename BTTBSC --- assets/images/husd_icon.png | Bin 69161 -> 0 bytes cw_core/lib/crypto_currency.dart | 34 +++++++++--------- lib/core/address_validator.dart | 4 +-- .../sideshift_exchange_provider.dart | 2 +- 4 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 assets/images/husd_icon.png diff --git a/assets/images/husd_icon.png b/assets/images/husd_icon.png deleted file mode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ryptoCurrency.ape, CryptoCurrency.avaxc, CryptoCurrency.btt, - CryptoCurrency.bttbsc, + CryptoCurrency.bttc, CryptoCurrency.doge, CryptoCurrency.firo, CryptoCurrency.usdttrc20, @@ -51,7 +51,6 @@ class CryptoCurrency extends EnumerableItem with Serializable { CryptoCurrency.xvg, CryptoCurrency.usdcpoly, CryptoCurrency.dcr, - CryptoCurrency.husd, CryptoCurrency.kmd, CryptoCurrency.mana, CryptoCurrency.maticpoly, @@ -103,7 +102,7 @@ class CryptoCurrency extends EnumerableItem with Serializable { static const ape = CryptoCurrency(title: 'APE', iconPath: 'assets/images/ape_icon.png', tag: 'ETH', raw: 30, name: 'ape'); static const avaxc = CryptoCurrency(title: 'AVAX', iconPath: 'assets/images/avaxc_icon.png', tag: 'C-CHAIN', raw: 31, name: 'avaxc'); static const btt = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/btt_icon.png', raw: 32, name: 'btt'); - static const bttbsc = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/bttbsc_icon.png', tag: 'BSC', raw: 33, name: 'bttbsc'); + static const bttc = CryptoCurrency(title: 'BTTC', iconPath: 'assets/images/bttbsc_icon.png',fullName: 'BitTorrent-NEW (Binance Smart Chain)', tag: 'BSC', raw: 33, name: 'bttc'); static const doge = CryptoCurrency(title: 'DOGE', iconPath: 'assets/images/doge_icon.png', raw: 34, name: 'doge'); static const firo = CryptoCurrency(title: 'FIRO', iconPath: 'assets/images/firo_icon.png', raw: 35, name: 'firo'); static const usdttrc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdttrc20_icon.png', tag: 'TRX', raw: 36, name: 'usdttrc20'); @@ -119,21 +118,20 @@ class CryptoCurrency extends EnumerableItem with Serializable { static const usdcpoly = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'POLY', raw: 46, name: 'usdcpoly'); static const dcr = CryptoCurrency(title: 'DCR', iconPath: 'assets/images/dcr_icon.png', raw: 47, name: 'dcr'); - static const husd = CryptoCurrency(title: 'HUSD', iconPath: 'assets/images/husd_icon.png', tag: 'ETH', raw: 48, name: 'husd'); - static const kmd = CryptoCurrency(title: 'KMD', iconPath: 'assets/images/kmd_icon.png', raw: 49, name: 'kmd'); - static const mana = CryptoCurrency(title: 'MANA', iconPath: 'assets/images/mana_icon.png', tag: 'ETH', raw: 50, name: 'mana'); - static const maticpoly = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'POLY', raw: 51, name: 'maticpoly'); - static const matic = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'ETH', raw: 52, name: 'matic'); - static const mkr = CryptoCurrency(title: 'MKR', iconPath: 'assets/images/mkr_icon.png', tag: 'ETH', raw: 53, name: 'mkr'); - static const near = CryptoCurrency(title: 'NEAR', iconPath: 'assets/images/near_icon.png', raw: 54, name: 'near'); - static const oxt = CryptoCurrency(title: 'OXT', iconPath: 'assets/images/oxt_icon.png', tag: 'ETH', raw: 55, name: 'oxt'); - static const paxg = CryptoCurrency(title: 'PAXG', iconPath: 'assets/images/paxg_icon.png', tag: 'ETH', raw: 56, name: 'paxg'); - static const pivx = CryptoCurrency(title: 'PIVX', iconPath: 'assets/images/pivx_icon.png', raw: 57, name: 'pivx'); - static const rune = CryptoCurrency(title: 'RUNE', iconPath: 'assets/images/rune_icon.png', raw: 58, name: 'rune'); - static const rvn = CryptoCurrency(title: 'RVN', iconPath: 'assets/images/rvn_icon.png', raw: 59, name: 'rvn'); - static const scrt = CryptoCurrency(title: 'SCRT', iconPath: 'assets/images/scrt_icon.png', raw: 60, name: 'scrt'); - static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 61, name: 'uni'); - static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 62, name: 'stx'); + static const kmd = CryptoCurrency(title: 'KMD', iconPath: 'assets/images/kmd_icon.png', raw: 48, name: 'kmd'); + static const mana = CryptoCurrency(title: 'MANA', iconPath: 'assets/images/mana_icon.png', tag: 'ETH', raw: 49, name: 'mana'); + static const maticpoly = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'POLY', raw: 50, name: 'maticpoly'); + static const matic = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'ETH', raw: 51, name: 'matic'); + static const mkr = CryptoCurrency(title: 'MKR', iconPath: 'assets/images/mkr_icon.png', tag: 'ETH', raw: 52, name: 'mkr'); + static const near = CryptoCurrency(title: 'NEAR', iconPath: 'assets/images/near_icon.png', raw: 53, name: 'near'); + static const oxt = CryptoCurrency(title: 'OXT', iconPath: 'assets/images/oxt_icon.png', tag: 'ETH', raw: 54, name: 'oxt'); + static const paxg = CryptoCurrency(title: 'PAXG', iconPath: 'assets/images/paxg_icon.png', tag: 'ETH', raw: 55, name: 'paxg'); + static const pivx = CryptoCurrency(title: 'PIVX', iconPath: 'assets/images/pivx_icon.png', raw: 56, name: 'pivx'); + static const rune = CryptoCurrency(title: 'RUNE', iconPath: 'assets/images/rune_icon.png', raw: 57, name: 'rune'); + static const rvn = CryptoCurrency(title: 'RVN', iconPath: 'assets/images/rvn_icon.png', raw: 58, name: 'rvn'); + static const scrt = CryptoCurrency(title: 'SCRT', iconPath: 'assets/images/scrt_icon.png', raw: 59, name: 'scrt'); + static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 60, name: 'uni'); + static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 61, name: 'stx'); static final Map _rawCurrencyMap = all.fold>({}, (acc, item) { diff --git a/lib/core/address_validator.dart b/lib/core/address_validator.dart index 9d7b0e3b5..519cd92a3 100644 --- a/lib/core/address_validator.dart +++ b/lib/core/address_validator.dart @@ -24,7 +24,6 @@ class AddressValidator extends TextValidator { return '[0-9a-zA-Z_]'; case CryptoCurrency.usdc: case CryptoCurrency.usdcpoly: - case CryptoCurrency.husd: case CryptoCurrency.ape: case CryptoCurrency.avaxc: case CryptoCurrency.eth: @@ -156,7 +155,7 @@ class AddressValidator extends TextValidator { return [98, 99, 106]; case CryptoCurrency.btt: return [34]; - case CryptoCurrency.bttbsc: + case CryptoCurrency.bttc: return [34]; case CryptoCurrency.doge: return [34]; @@ -181,7 +180,6 @@ class AddressValidator extends TextValidator { case CryptoCurrency.stx: return [40, 41, 42]; case CryptoCurrency.usdcpoly: - case CryptoCurrency.husd: case CryptoCurrency.mana: case CryptoCurrency.matic: case CryptoCurrency.maticpoly: diff --git a/lib/exchange/sideshift/sideshift_exchange_provider.dart b/lib/exchange/sideshift/sideshift_exchange_provider.dart index a732f7ef2..cbe9375db 100644 --- a/lib/exchange/sideshift/sideshift_exchange_provider.dart +++ b/lib/exchange/sideshift/sideshift_exchange_provider.dart @@ -28,7 +28,6 @@ class SideShiftExchangeProvider extends ExchangeProvider { static const List _notSupported = [ CryptoCurrency.xhv, CryptoCurrency.dcr, - CryptoCurrency.husd, CryptoCurrency.kmd, CryptoCurrency.mkr, CryptoCurrency.near, @@ -39,6 +38,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { CryptoCurrency.rvn, CryptoCurrency.scrt, CryptoCurrency.stx, + CryptoCurrency.bttc, ]; static List _supportedPairs() { From 7b95533cd3b8173be6576fdbd352bca0e8babdc4 Mon Sep 17 00:00:00 2001 From: Serhii Date: Sun, 4 Dec 2022 20:06:17 +0200 Subject: [PATCH 027/100] fix nullable type --- cw_core/lib/crypto_currency.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 48ebede75..42e72d2eb 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -139,8 +139,8 @@ class CryptoCurrency extends EnumerableItem with Serializable { return acc; }); - static final Map _nameCurrencyMap = - all.fold>({}, (acc, item) { + static final Map _nameCurrencyMap = + all.fold>({}, (acc, item) { acc.addAll({item.name: item}); return acc; }); From 23358e131876b4f4535e3074492da83df9fc1c2d Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Mon, 5 Dec 2022 13:38:29 +0100 Subject: [PATCH 028/100] Update security settings view model --- lib/di.dart | 2 +- .../security_settings_view_model.dart | 20 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/di.dart b/lib/di.dart index d55a147ca..35a1b4d1a 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -434,7 +434,7 @@ Future setup( }); getIt.registerFactory(() { - return SecuritySettingsViewModel(getIt.get()); + return SecuritySettingsViewModel(getIt.get(), getIt.get()); }); getIt.registerFactory(() => WalletSeedViewModel(getIt.get().wallet!)); diff --git a/lib/view_model/settings/security_settings_view_model.dart b/lib/view_model/settings/security_settings_view_model.dart index 4a88b633f..c48223af6 100644 --- a/lib/view_model/settings/security_settings_view_model.dart +++ b/lib/view_model/settings/security_settings_view_model.dart @@ -1,4 +1,6 @@ +import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/entities/biometric_auth.dart'; +import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:mobx/mobx.dart'; @@ -7,19 +9,33 @@ part 'security_settings_view_model.g.dart'; class SecuritySettingsViewModel = SecuritySettingsViewModelBase with _$SecuritySettingsViewModel; abstract class SecuritySettingsViewModelBase with Store { - SecuritySettingsViewModelBase(this._settingsStore) : _biometricAuth = BiometricAuth(); + SecuritySettingsViewModelBase( + this._settingsStore, + this._authService, + ) : _biometricAuth = BiometricAuth(); final BiometricAuth _biometricAuth; final SettingsStore _settingsStore; + final AuthService _authService; @computed bool get allowBiometricalAuthentication => _settingsStore.allowBiometricalAuthentication; + @computed + PinCodeRequiredDuration get pinCodeRequiredDuration => _settingsStore.pinTimeOutDuration; + @action Future biometricAuthenticated() async { return await _biometricAuth.canCheckBiometrics() && await _biometricAuth.isAuthenticated(); } @action - void setAllowBiometricalAuthentication(bool value) => _settingsStore.allowBiometricalAuthentication = value; + void setAllowBiometricalAuthentication(bool value) => + _settingsStore.allowBiometricalAuthentication = value; + + @action + setPinCodeRequiredDuration(PinCodeRequiredDuration duration) => + _settingsStore.pinTimeOutDuration = duration; + + bool checkPinCodeRiquired() => _authService.requireAuth(); } From c156691e09139a36688d992911873ff9efb92b7c Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Mon, 5 Dec 2022 20:14:46 +0100 Subject: [PATCH 029/100] [skip ci] undo formatting in di --- lib/di.dart | 398 ++++++++++-------- .../security_settings_view_model.dart | 20 +- 2 files changed, 235 insertions(+), 183 deletions(-) diff --git a/lib/di.dart b/lib/di.dart index d55a147ca..bf926cbda 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -194,7 +194,8 @@ Future setup( _unspentCoinsInfoSource = unspentCoinsInfoSource; if (!_isSetupFinished) { - getIt.registerSingletonAsync(() => SharedPreferences.getInstance()); + getIt.registerSingletonAsync( + () => SharedPreferences.getInstance()); } final isBitcoinBuyEnabled = (secrets.wyreSecretKey?.isNotEmpty ?? false) && @@ -220,64 +221,73 @@ Future setup( walletList: getIt.get(), settingsStore: getIt.get(), nodeListStore: getIt.get())); - getIt.registerSingleton( - TradesStore(tradesSource: _tradesSource, settingsStore: getIt.get())); - getIt.registerSingleton( - OrdersStore(ordersSource: _ordersSource, settingsStore: getIt.get())); + getIt.registerSingleton(TradesStore( + tradesSource: _tradesSource, settingsStore: getIt.get())); + getIt.registerSingleton(OrdersStore( + ordersSource: _ordersSource, settingsStore: getIt.get())); getIt.registerSingleton(TradeFilterStore()); getIt.registerSingleton(TransactionFilterStore()); getIt.registerSingleton(FiatConversionStore()); - getIt.registerSingleton(SendTemplateStore(templateSource: _templates)); + getIt.registerSingleton( + SendTemplateStore(templateSource: _templates)); getIt.registerSingleton( ExchangeTemplateStore(templateSource: _exchangeTemplates)); - getIt.registerSingleton( - YatStore(appStore: getIt.get(), secureStorage: getIt.get()) - ..init()); + getIt.registerSingleton(YatStore( + appStore: getIt.get(), + secureStorage: getIt.get()) + ..init()); - final secretStore = await SecretStoreBase.load(getIt.get()); + final secretStore = + await SecretStoreBase.load(getIt.get()); getIt.registerSingleton(secretStore); - getIt.registerFactory(() => KeyService(getIt.get())); + getIt.registerFactory( + () => KeyService(getIt.get())); - getIt.registerFactoryParam((type, _) => - WalletCreationService( + getIt.registerFactoryParam( + (type, _) => WalletCreationService( initialType: type, keyService: getIt.get(), secureStorage: getIt.get(), sharedPreferences: getIt.get(), walletInfoSource: _walletInfoSource)); - getIt.registerFactory(() => WalletLoadingService( + getIt.registerFactory( + () => WalletLoadingService( getIt.get(), getIt.get(), (WalletType type) => getIt.get(param1: type))); - getIt.registerFactoryParam((type, _) => WalletNewVM( - getIt.get(), getIt.get(param1: type), _walletInfoSource, - type: type)); + getIt.registerFactoryParam((type, _) => + WalletNewVM(getIt.get(), + getIt.get(param1: type), _walletInfoSource, + type: type)); - getIt.registerFactoryParam((args, _) { + getIt + .registerFactoryParam((args, _) { final type = args.first as WalletType; final language = args[1] as String; final mnemonic = args[2] as String; - return WalletRestorationFromSeedVM( - getIt.get(), getIt.get(param1: type), _walletInfoSource, + return WalletRestorationFromSeedVM(getIt.get(), + getIt.get(param1: type), _walletInfoSource, type: type, language: language, seed: mnemonic); }); - getIt.registerFactoryParam((args, _) { + getIt + .registerFactoryParam((args, _) { final type = args.first as WalletType; final language = args[1] as String; - return WalletRestorationFromKeysVM( - getIt.get(), getIt.get(param1: type), _walletInfoSource, + return WalletRestorationFromKeysVM(getIt.get(), + getIt.get(param1: type), _walletInfoSource, type: type, language: language); }); getIt.registerFactory(() => - WalletAddressListViewModel(appStore: getIt.get(), yatStore: getIt.get())); + WalletAddressListViewModel( + appStore: getIt.get(), yatStore: getIt.get())); getIt.registerFactory(() => BalanceViewModel( appStore: getIt.get(), @@ -298,12 +308,15 @@ Future setup( secureStorage: getIt.get(), sharedPreferences: getIt.get())); - getIt.registerFactory(() => AuthViewModel(getIt.get(), - getIt.get(), getIt.get(), BiometricAuth())); + getIt.registerFactory(() => AuthViewModel( + getIt.get(), + getIt.get(), + getIt.get(), + BiometricAuth())); getIt.registerFactory( - () => AuthPage(getIt.get(), - onAuthenticationFinished: (isAuthenticated, AuthPageState authPageState) { + () => AuthPage(getIt.get(), onAuthenticationFinished: + (isAuthenticated, AuthPageState authPageState) { if (!isAuthenticated) { return; } @@ -318,7 +331,8 @@ Future setup( authPageState.changeProcessText('Loading the wallet'); if (loginError != null) { - authPageState.changeProcessText('ERROR: ${loginError.toString()}'); + authPageState + .changeProcessText('ERROR: ${loginError.toString()}'); } ReactionDisposer? _reaction; @@ -329,29 +343,28 @@ Future setup( }, closable: false), instanceName: 'login'); - getIt.registerFactoryParam( - (onAuthFinished, closable) => AuthPage(getIt.get(), - onAuthenticationFinished: onAuthFinished, closable: closable ?? false)); + getIt + .registerFactoryParam( + (onAuthFinished, closable) => AuthPage(getIt.get(), + onAuthenticationFinished: onAuthFinished, + closable: closable ?? false)); - getIt.registerFactory(() => BalancePage( - dashboardViewModel: getIt.get(), - settingsStore: getIt.get())); + getIt.registerFactory(() => + BalancePage(dashboardViewModel: getIt.get(), settingsStore: getIt.get())); - getIt.registerFactory(() => DashboardPage( - balancePage: getIt.get(), - walletViewModel: getIt.get(), + getIt.registerFactory(() => DashboardPage( balancePage: getIt.get(), walletViewModel: getIt.get(), addressListViewModel: getIt.get())); + getIt.registerFactory(() => ReceivePage( addressListViewModel: getIt.get())); - getIt.registerFactory( - () => ReceivePage(addressListViewModel: getIt.get())); getIt.registerFactory(() => AddressPage( addressListViewModel: getIt.get(), walletViewModel: getIt.get())); - getIt.registerFactoryParam((dynamic item, _) => - WalletAddressEditOrCreateViewModel(wallet: getIt.get().wallet!, item: item)); + getIt.registerFactoryParam( + (dynamic item, _) => WalletAddressEditOrCreateViewModel( + wallet: getIt.get().wallet!, item: item)); - getIt.registerFactoryParam((dynamic item, _) => - AddressEditOrCreatePage( + getIt.registerFactoryParam( + (dynamic item, _) => AddressEditOrCreatePage( addressEditOrCreateViewModel: getIt.get(param1: item))); @@ -369,16 +382,19 @@ Future setup( getIt.get(), _transactionDescriptionBox)); - getIt.registerFactory(() => SendPage(sendViewModel: getIt.get())); - getIt.registerFactory( - () => SendTemplatePage(sendTemplateViewModel: getIt.get())); + () => SendPage(sendViewModel: getIt.get())); + + getIt.registerFactory(() => SendTemplatePage( + sendTemplateViewModel: getIt.get())); getIt.registerFactory(() => WalletListViewModel( - _walletInfoSource, getIt.get(), getIt.get())); + _walletInfoSource, + getIt.get(), + getIt.get())); - getIt - .registerFactory(() => WalletListPage(walletListViewModel: getIt.get())); + getIt.registerFactory(() => + WalletListPage(walletListViewModel: getIt.get())); getIt.registerFactory(() { final wallet = getIt.get().wallet!; @@ -387,12 +403,11 @@ Future setup( return MoneroAccountListViewModel(wallet); } - throw Exception( - 'Unexpected wallet type: ${wallet.type} for generate MoneroAccountListViewModel'); + throw Exception('Unexpected wallet type: ${wallet.type} for generate MoneroAccountListViewModel'); }); - getIt.registerFactory( - () => MoneroAccountListPage(accountListViewModel: getIt.get())); + getIt.registerFactory(() => MoneroAccountListPage( + accountListViewModel: getIt.get())); /*getIt.registerFactory(() { final wallet = getIt.get().wallet; @@ -409,14 +424,16 @@ Future setup( moneroAccountCreationViewModel: getIt.get()));*/ - getIt.registerFactoryParam( + getIt.registerFactoryParam( (AccountListItem? account, _) => MoneroAccountEditOrCreateViewModel( monero!.getAccountList(getIt.get().wallet!), haven?.getAccountList(getIt.get().wallet!), wallet: getIt.get().wallet!, accountListItem: account)); - getIt.registerFactoryParam( + getIt.registerFactoryParam( (AccountListItem? account, _) => MoneroAccountEditOrCreatePage( moneroAccountCreationViewModel: getIt.get(param1: account))); @@ -434,36 +451,44 @@ Future setup( }); getIt.registerFactory(() { - return SecuritySettingsViewModel(getIt.get()); + return SecuritySettingsViewModel(getIt.get(), getIt.get()); }); - getIt.registerFactory(() => WalletSeedViewModel(getIt.get().wallet!)); + getIt + .registerFactory(() => WalletSeedViewModel(getIt.get().wallet!)); - getIt.registerFactoryParam((bool isWalletCreated, _) => - WalletSeedPage(getIt.get(), isNewWalletCreated: isWalletCreated)); + getIt.registerFactoryParam( + (bool isWalletCreated, _) => WalletSeedPage( + getIt.get(), + isNewWalletCreated: isWalletCreated)); - getIt.registerFactory(() => WalletKeysViewModel(getIt.get().wallet!)); + getIt + .registerFactory(() => WalletKeysViewModel(getIt.get().wallet!)); getIt.registerFactory(() => WalletKeysPage(getIt.get())); getIt.registerFactoryParam( - (ContactRecord? contact, _) => ContactViewModel(_contactSource, contact: contact)); + (ContactRecord? contact, _) => + ContactViewModel(_contactSource, contact: contact)); - getIt.registerFactory(() => ContactListViewModel(_contactSource, _walletInfoSource)); + getIt.registerFactory( + () => ContactListViewModel(_contactSource, _walletInfoSource)); - getIt.registerFactoryParam((bool isEditable, _) => - ContactListPage(getIt.get(), isEditable: isEditable)); + getIt.registerFactoryParam( + (bool isEditable, _) => ContactListPage(getIt.get(), + isEditable: isEditable)); getIt.registerFactoryParam( - (ContactRecord? contact, _) => ContactPage(getIt.get(param1: contact))); + (ContactRecord? contact, _) => + ContactPage(getIt.get(param1: contact))); getIt.registerFactory(() { final appStore = getIt.get(); - return NodeListViewModel(_nodeSource, appStore.wallet!, appStore.settingsStore); + return NodeListViewModel( + _nodeSource, appStore.wallet!, appStore.settingsStore); }); - getIt.registerFactory( - () => ConnectionSyncPage(getIt.get(), getIt.get())); + getIt.registerFactory(() => ConnectionSyncPage(getIt.get(), getIt.get())); getIt.registerFactory(() => SecurityBackupPage(getIt.get())); @@ -473,22 +498,24 @@ Future setup( getIt.registerFactory(() => OtherSettingsPage(getIt.get())); - getIt - .registerFactory(() => NodeCreateOrEditViewModel(_nodeSource, getIt.get().wallet!)); + getIt.registerFactory(() => + NodeCreateOrEditViewModel(_nodeSource, getIt.get().wallet!)); - getIt.registerFactory(() => NodeCreateOrEditPage(getIt.get())); + getIt.registerFactory( + () => NodeCreateOrEditPage(getIt.get())); getIt.registerFactory(() => OnRamperPage( - settingsStore: getIt.get().settingsStore, wallet: getIt.get().wallet!)); + settingsStore: getIt.get().settingsStore, + wallet: getIt.get().wallet!)); getIt.registerFactory(() => ExchangeViewModel( - getIt.get().wallet!, - _tradesSource, - getIt.get(), - getIt.get(), - getIt.get().settingsStore, - getIt.get(), - )); + getIt.get().wallet!, + _tradesSource, + getIt.get(), + getIt.get(), + getIt.get().settingsStore, + getIt.get(), + )); getIt.registerFactory(() => ExchangeTradeViewModel( wallet: getIt.get().wallet!, @@ -498,34 +525,40 @@ Future setup( getIt.registerFactory(() => ExchangePage(getIt.get())); - getIt.registerFactory(() => ExchangeConfirmPage(tradesStore: getIt.get())); + getIt.registerFactory( + () => ExchangeConfirmPage(tradesStore: getIt.get())); + + getIt.registerFactory(() => ExchangeTradePage( + exchangeTradeViewModel: getIt.get())); getIt.registerFactory( - () => ExchangeTradePage(exchangeTradeViewModel: getIt.get())); + () => ExchangeTemplatePage(getIt.get())); - getIt.registerFactory(() => ExchangeTemplatePage(getIt.get())); - - getIt.registerFactoryParam((WalletType param1, __) { + getIt.registerFactoryParam( + (WalletType param1, __) { switch (param1) { case WalletType.haven: return haven!.createHavenWalletService(_walletInfoSource); case WalletType.monero: return monero!.createMoneroWalletService(_walletInfoSource); case WalletType.bitcoin: - return bitcoin!.createBitcoinWalletService(_walletInfoSource, _unspentCoinsInfoSource!); + return bitcoin!.createBitcoinWalletService( + _walletInfoSource, _unspentCoinsInfoSource!); case WalletType.litecoin: - return bitcoin!.createLitecoinWalletService(_walletInfoSource, _unspentCoinsInfoSource!); + return bitcoin!.createLitecoinWalletService( + _walletInfoSource, _unspentCoinsInfoSource!); default: throw Exception('Unexpected token: ${param1.toString()} for generating of WalletService'); } }); - getIt.registerFactory( - () => SetupPinCodeViewModel(getIt.get(), getIt.get())); + getIt.registerFactory(() => SetupPinCodeViewModel( + getIt.get(), getIt.get())); - getIt.registerFactoryParam, String), - void>( - (onSuccessfulPinSetup, _) => SetupPinCodePage(getIt.get(), + getIt.registerFactoryParam, String), void>( + (onSuccessfulPinSetup, _) => SetupPinCodePage( + getIt.get(), onSuccessfulPinSetup: onSuccessfulPinSetup)); getIt.registerFactory(() => RescanViewModel(getIt.get().wallet!)); @@ -534,16 +567,17 @@ Future setup( getIt.registerFactory(() => FaqPage(getIt.get())); - getIt.registerFactoryParam((type, _) => - WalletRestoreViewModel( - getIt.get(), getIt.get(param1: type), _walletInfoSource, + getIt.registerFactoryParam( + (type, _) => WalletRestoreViewModel(getIt.get(), + getIt.get(param1: type), _walletInfoSource, type: type)); - getIt.registerFactoryParam( - (type, _) => WalletRestorePage(getIt.get(param1: type))); + getIt.registerFactoryParam((type, _) => + WalletRestorePage(getIt.get(param1: type))); - getIt.registerFactoryParam( - (TransactionInfo transactionInfo, _) { + getIt + .registerFactoryParam( + (TransactionInfo transactionInfo, _) { final wallet = getIt.get().wallet!; return TransactionDetailsViewModel( transactionInfo: transactionInfo, @@ -557,47 +591,52 @@ Future setup( transactionDetailsViewModel: getIt.get(param1: transactionInfo))); - getIt.registerFactoryParam( + getIt.registerFactoryParam( (param1, _) => NewWalletTypePage(onTypeSelected: param1)); getIt.registerFactoryParam( (WalletType type, _) => PreSeedPage(type)); getIt.registerFactoryParam((trade, _) => - TradeDetailsViewModel( - tradeForDetails: trade, - trades: _tradesSource, + TradeDetailsViewModel(tradeForDetails: trade, trades: _tradesSource, settingsStore: getIt.get())); - getIt.registerFactory(() => BackupService(getIt.get(), _walletInfoSource, - getIt.get(), getIt.get())); + getIt.registerFactory(() => BackupService( + getIt.get(), + _walletInfoSource, + getIt.get(), + getIt.get())); - getIt.registerFactory(() => BackupViewModel( - getIt.get(), getIt.get(), getIt.get())); + getIt.registerFactory(() => BackupViewModel(getIt.get(), + getIt.get(), getIt.get())); getIt.registerFactory(() => BackupPage(getIt.get())); - getIt.registerFactory(() => - EditBackupPasswordViewModel(getIt.get(), getIt.get())); + getIt.registerFactory( + () => EditBackupPasswordViewModel(getIt.get(), getIt.get())); - getIt.registerFactory(() => EditBackupPasswordPage(getIt.get())); + getIt.registerFactory( + () => EditBackupPasswordPage(getIt.get())); getIt.registerFactory(() => RestoreOptionsPage()); - getIt.registerFactory(() => RestoreFromBackupViewModel(getIt.get())); + getIt.registerFactory( + () => RestoreFromBackupViewModel(getIt.get())); - getIt.registerFactory(() => RestoreFromBackupPage(getIt.get())); + getIt.registerFactory( + () => RestoreFromBackupPage(getIt.get())); - getIt.registerFactoryParam( - (Trade trade, _) => TradeDetailsPage(getIt.get(param1: trade))); + getIt.registerFactoryParam((Trade trade, _) => + TradeDetailsPage(getIt.get(param1: trade))); getIt.registerFactory(() => BuyAmountViewModel()); getIt.registerFactory(() { final wallet = getIt.get().wallet; - return BuyViewModel(_ordersSource, getIt.get(), getIt.get(), - getIt.get(), + return BuyViewModel(_ordersSource, getIt.get(), + getIt.get(), getIt.get(), wallet: wallet!); }); @@ -609,8 +648,7 @@ Future setup( final url = args.first as String; final buyViewModel = args[1] as BuyViewModel; - return BuyWebViewPage( - buyViewModel: buyViewModel, ordersStore: getIt.get(), url: url); + return BuyWebViewPage(buyViewModel: buyViewModel, ordersStore: getIt.get(), url: url); }); getIt.registerFactoryParam((order, _) { @@ -619,8 +657,8 @@ Future setup( return OrderDetailsViewModel(wallet: wallet!, orderForDetails: order); }); - getIt.registerFactoryParam( - (Order order, _) => OrderDetailsPage(getIt.get(param1: order))); + getIt.registerFactoryParam((Order order, _) => + OrderDetailsPage(getIt.get(param1: order))); getIt.registerFactory(() => SupportViewModel()); @@ -629,18 +667,20 @@ Future setup( getIt.registerFactory(() { final wallet = getIt.get().wallet; - return UnspentCoinsListViewModel(wallet: wallet!, unspentCoinsInfo: _unspentCoinsInfoSource!); + return UnspentCoinsListViewModel( + wallet: wallet!, unspentCoinsInfo: _unspentCoinsInfoSource!); }); - getIt.registerFactory(() => - UnspentCoinsListPage(unspentCoinsListViewModel: getIt.get())); + getIt.registerFactory(() => UnspentCoinsListPage( + unspentCoinsListViewModel: getIt.get())); getIt.registerFactoryParam( - (item, model) => - UnspentCoinsDetailsViewModel(unspentCoinsItem: item, unspentCoinsListViewModel: model)); + (item, model) => UnspentCoinsDetailsViewModel( + unspentCoinsItem: item, unspentCoinsListViewModel: model)); - getIt.registerFactoryParam((List args, _) { + getIt.registerFactoryParam( + (List args, _) { final item = args.first as UnspentCoinsItem; final unspentCoinsListViewModel = args[1] as UnspentCoinsListViewModel; @@ -653,15 +693,12 @@ Future setup( getIt.registerFactory(() => YatService()); - getIt.registerFactory(() => AddressResolver( - yatService: getIt.get(), walletType: getIt.get().wallet!.type)); + getIt.registerFactory(() => AddressResolver(yatService: getIt.get(), + walletType: getIt.get().wallet!.type)); getIt.registerFactoryParam( - (String qrData, bool isLight) => FullscreenQRPage( - qrData: qrData, - isLight: isLight, - )); - + (String qrData, bool isLight) => FullscreenQRPage(qrData: qrData, isLight: isLight,)); + getIt.registerFactory(() => IoniaApi()); getIt.registerFactory(() => AnyPayApi()); @@ -669,24 +706,26 @@ Future setup( getIt.registerFactory( () => IoniaService(getIt.get(), getIt.get())); - getIt.registerFactory(() => IoniaAnyPay( - getIt.get(), getIt.get(), getIt.get().wallet!)); + getIt.registerFactory( + () => IoniaAnyPay( + getIt.get(), + getIt.get(), + getIt.get().wallet!)); getIt.registerFactory(() => IoniaGiftCardsListViewModel(ioniaService: getIt.get())); getIt.registerFactory(() => IoniaAuthViewModel(ioniaService: getIt.get())); - getIt.registerFactoryParam( - (double amount, merchant) { + getIt.registerFactoryParam((double amount, merchant) { return IoniaMerchPurchaseViewModel( - ioniaAnyPayService: getIt.get(), - amount: amount, - ioniaMerchant: merchant, - sendViewModel: getIt.get()); + ioniaAnyPayService: getIt.get(), + amount: amount, + ioniaMerchant: merchant, + sendViewModel: getIt.get() + ); }); - getIt.registerFactoryParam( - (IoniaMerchant merchant, _) { + getIt.registerFactoryParam((IoniaMerchant merchant, _) { return IoniaBuyCardViewModel(ioniaMerchant: merchant); }); @@ -714,44 +753,42 @@ Future setup( getIt.registerFactoryParam((List args, _) { final amount = args.first as double; final merchant = args.last as IoniaMerchant; - return IoniaBuyGiftCardDetailPage( - getIt.get(param1: amount, param2: merchant)); + return IoniaBuyGiftCardDetailPage(getIt.get(param1: amount, param2: merchant)); }); - getIt.registerFactoryParam( - (IoniaGiftCard giftCard, _) { - return IoniaGiftCardDetailsViewModel( - ioniaService: getIt.get(), giftCard: giftCard); + getIt.registerFactoryParam((IoniaGiftCard giftCard, _) { + return IoniaGiftCardDetailsViewModel( + ioniaService: getIt.get(), + giftCard: giftCard); + }); + + getIt.registerFactoryParam((List args, _) { + final amount = args[0] as double; + final merchant = args[1] as IoniaMerchant; + final tip = args[2] as IoniaTip; + + return IoniaCustomTipViewModel(amount: amount, tip: tip, ioniaMerchant: merchant); + }); + + getIt.registerFactoryParam((IoniaGiftCard giftCard, _) { + return IoniaGiftCardDetailPage(getIt.get(param1: giftCard)); }); - getIt.registerFactoryParam((List args, _) { - final amount = args[0] as double; - final merchant = args[1] as IoniaMerchant; - final tip = args[2] as IoniaTip; - - return IoniaCustomTipViewModel(amount: amount, tip: tip, ioniaMerchant: merchant); - }); - - getIt.registerFactoryParam( - (IoniaGiftCard giftCard, _) { - return IoniaGiftCardDetailPage(getIt.get(param1: giftCard)); - }); - - getIt.registerFactoryParam((List args, _) { + getIt.registerFactoryParam((List args, _){ final giftCard = args.first as IoniaGiftCard; - - return IoniaMoreOptionsPage(giftCard); + + return IoniaMoreOptionsPage(giftCard); }); - getIt.registerFactoryParam( - (IoniaGiftCard giftCard, _) => IoniaCustomRedeemViewModel(giftCard)); + getIt.registerFactoryParam((IoniaGiftCard giftCard, _) => IoniaCustomRedeemViewModel(giftCard)); - getIt.registerFactoryParam((List args, _) { + getIt.registerFactoryParam((List args, _){ final giftCard = args.first as IoniaGiftCard; - - return IoniaCustomRedeemPage(getIt.get(param1: giftCard)); + + return IoniaCustomRedeemPage(getIt.get(param1: giftCard) ); }); + getIt.registerFactoryParam((List args, _) { return IoniaCustomTipPage(getIt.get(param1: args)); }); @@ -766,17 +803,16 @@ Future setup( getIt.registerFactory(() => IoniaAccountCardsPage(getIt.get())); - getIt.registerFactoryParam( - (IoniaAnyPayPaymentInfo paymentInfo, AnyPayPaymentCommittedInfo committedInfo) => - IoniaPaymentStatusViewModel(getIt.get(), - paymentInfo: paymentInfo, committedInfo: committedInfo)); + getIt.registerFactoryParam( + (IoniaAnyPayPaymentInfo paymentInfo, AnyPayPaymentCommittedInfo committedInfo) + => IoniaPaymentStatusViewModel( + getIt.get(), + paymentInfo: paymentInfo, + committedInfo: committedInfo)); - getIt.registerFactoryParam( - (IoniaAnyPayPaymentInfo paymentInfo, AnyPayPaymentCommittedInfo committedInfo) => - IoniaPaymentStatusPage( - getIt.get(param1: paymentInfo, param2: committedInfo))); + getIt.registerFactoryParam( + (IoniaAnyPayPaymentInfo paymentInfo, AnyPayPaymentCommittedInfo committedInfo) + => IoniaPaymentStatusPage(getIt.get(param1: paymentInfo, param2: committedInfo))); _isSetupFinished = true; -} +} \ No newline at end of file diff --git a/lib/view_model/settings/security_settings_view_model.dart b/lib/view_model/settings/security_settings_view_model.dart index 4a88b633f..c48223af6 100644 --- a/lib/view_model/settings/security_settings_view_model.dart +++ b/lib/view_model/settings/security_settings_view_model.dart @@ -1,4 +1,6 @@ +import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/entities/biometric_auth.dart'; +import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/store/settings_store.dart'; import 'package:mobx/mobx.dart'; @@ -7,19 +9,33 @@ part 'security_settings_view_model.g.dart'; class SecuritySettingsViewModel = SecuritySettingsViewModelBase with _$SecuritySettingsViewModel; abstract class SecuritySettingsViewModelBase with Store { - SecuritySettingsViewModelBase(this._settingsStore) : _biometricAuth = BiometricAuth(); + SecuritySettingsViewModelBase( + this._settingsStore, + this._authService, + ) : _biometricAuth = BiometricAuth(); final BiometricAuth _biometricAuth; final SettingsStore _settingsStore; + final AuthService _authService; @computed bool get allowBiometricalAuthentication => _settingsStore.allowBiometricalAuthentication; + @computed + PinCodeRequiredDuration get pinCodeRequiredDuration => _settingsStore.pinTimeOutDuration; + @action Future biometricAuthenticated() async { return await _biometricAuth.canCheckBiometrics() && await _biometricAuth.isAuthenticated(); } @action - void setAllowBiometricalAuthentication(bool value) => _settingsStore.allowBiometricalAuthentication = value; + void setAllowBiometricalAuthentication(bool value) => + _settingsStore.allowBiometricalAuthentication = value; + + @action + setPinCodeRequiredDuration(PinCodeRequiredDuration duration) => + _settingsStore.pinTimeOutDuration = duration; + + bool checkPinCodeRiquired() => _authService.requireAuth(); } From 0203f686c555581308c6bf25c05622606782d56f Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Wed, 7 Dec 2022 18:12:45 +0100 Subject: [PATCH 030/100] fix issue with custom redeem amount remaining --- lib/di.dart | 3 +- .../ionia/cards/ionia_custom_redeem_page.dart | 69 ++++++++++-------- .../cards/ionia_gift_card_detail_page.dart | 70 +++++++++---------- .../ionia/cards/ionia_more_options_page.dart | 67 ++++++++++-------- .../ionia/ionia_custom_redeem_view_model.dart | 36 ++++++++-- .../ionia_gift_card_details_view_model.dart | 33 ++++----- 6 files changed, 156 insertions(+), 122 deletions(-) diff --git a/lib/di.dart b/lib/di.dart index 90549cf6f..910feae4a 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -760,7 +760,8 @@ Future setup( return IoniaMoreOptionsPage(giftCard); }); - getIt.registerFactoryParam((IoniaGiftCard giftCard, _) => IoniaCustomRedeemViewModel(giftCard)); + getIt.registerFactoryParam((IoniaGiftCard giftCard, _) + => IoniaCustomRedeemViewModel(giftCard: giftCard, ioniaService: getIt.get())); getIt.registerFactoryParam((List args, _){ final giftCard = args.first as IoniaGiftCard; diff --git a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart index f9ce0ae88..f2702d791 100644 --- a/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart +++ b/lib/src/screens/ionia/cards/ionia_custom_redeem_page.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/card_item.dart'; import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; @@ -18,12 +19,11 @@ class IoniaCustomRedeemPage extends BasePage { ) : _amountFieldFocus = FocusNode(), _amountController = TextEditingController() { _amountController.addListener(() { - ioniaCustomRedeemViewModel.updateAmount(_amountController.text); + ioniaCustomRedeemViewModel.updateAmount(_amountController.text); }); } final IoniaCustomRedeemViewModel ioniaCustomRedeemViewModel; - @override String get title => S.current.custom_redeem_amount; @@ -50,7 +50,7 @@ class IoniaCustomRedeemPage extends BasePage { disableScroll: true, config: KeyboardActionsConfig( keyboardActionsPlatform: KeyboardActionsPlatform.IOS, - keyboardBarColor: Theme.of(context).accentTextTheme!.bodyText1!.backgroundColor!, + keyboardBarColor: Theme.of(context).accentTextTheme.bodyText1!.backgroundColor!, nextFocus: false, actions: [ KeyboardActionsItem( @@ -67,10 +67,11 @@ class IoniaCustomRedeemPage extends BasePage { Container( padding: EdgeInsets.symmetric(horizontal: 25), decoration: BoxDecoration( - borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), gradient: LinearGradient(colors: [ - Theme.of(context).primaryTextTheme!.subtitle1!.color!, - Theme.of(context).primaryTextTheme!.subtitle1!.decorationColor!, + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, ], begin: Alignment.topLeft, end: Alignment.bottomRight), ), child: Column( @@ -85,11 +86,11 @@ class IoniaCustomRedeemPage extends BasePage { inputFormatters: [FilteringTextInputFormatter.deny(RegExp('[\-|\ ]'))], hintText: '1000', placeholderTextStyle: TextStyle( - color: Theme.of(context).primaryTextTheme!.headline5!.color!, + color: Theme.of(context).primaryTextTheme.headline5!.color!, fontWeight: FontWeight.w500, fontSize: 36, ), - borderColor: Theme.of(context).primaryTextTheme!.headline5!.color!, + borderColor: Theme.of(context).primaryTextTheme.headline5!.color!, textColor: Colors.white, textStyle: TextStyle( color: Colors.white, @@ -114,14 +115,17 @@ class IoniaCustomRedeemPage extends BasePage { ), ), SizedBox(height: 8), - Observer(builder: (_)=> - !ioniaCustomRedeemViewModel.disableRedeem ? - Center( - child: Text('\$${giftCard.remainingAmount} - \$${ioniaCustomRedeemViewModel.amount} = \$${ioniaCustomRedeemViewModel.formattedRemaining} ${S.of(context).remaining}', - style: TextStyle( - color: Theme.of(context).primaryTextTheme!.headline5!.color!, - ),), - ) : SizedBox.shrink(), + Observer( + builder: (_) => !ioniaCustomRedeemViewModel.disableRedeem + ? Center( + child: Text( + '\$${giftCard.remainingAmount} - \$${ioniaCustomRedeemViewModel.amount} = \$${ioniaCustomRedeemViewModel.formattedRemaining} ${S.of(context).remaining}', + style: TextStyle( + color: Theme.of(context).primaryTextTheme.headline5!.color!, + ), + ), + ) + : SizedBox.shrink(), ), SizedBox(height: 24), ], @@ -131,30 +135,37 @@ class IoniaCustomRedeemPage extends BasePage { padding: const EdgeInsets.all(24.0), child: CardItem( title: giftCard.legalName, - backgroundColor: Theme.of(context).accentTextTheme!.headline1!.backgroundColor!.withOpacity(0.1), + backgroundColor: Theme.of(context) + .accentTextTheme + .headline1! + .backgroundColor! + .withOpacity(0.1), discount: giftCard.remainingAmount, isAmount: true, discountBackground: AssetImage('assets/images/red_badge_discount.png'), - titleColor: Theme.of(context).accentTextTheme!.headline1!.backgroundColor!, + titleColor: Theme.of(context).accentTextTheme.headline1!.backgroundColor!, subtitleColor: Theme.of(context).hintColor, subTitle: S.of(context).online, logoUrl: giftCard.logoUrl, ), - ), + ), ], ), bottomSection: Column( children: [ - Padding( - padding: EdgeInsets.only(bottom: 12), - child: PrimaryButton( - onPressed: () { - Navigator.of(context).pop([ioniaCustomRedeemViewModel.remaining.toString(), ioniaCustomRedeemViewModel.amount.toString()]); - }, - isDisabled: ioniaCustomRedeemViewModel.disableRedeem, - text: S.of(context).add_custom_redemption, - color: Theme.of(context).accentTextTheme!.bodyText1!.color!, - textColor: Colors.white, + Observer( + builder: (_) => Padding( + padding: EdgeInsets.only(bottom: 12), + child: LoadingPrimaryButton( + isLoading: ioniaCustomRedeemViewModel.redeemState is IsExecutingState, + isDisabled: ioniaCustomRedeemViewModel.disableRedeem, + text: S.of(context).add_custom_redemption, + color: Theme.of(context).accentTextTheme.bodyText1!.color!, + textColor: Colors.white, + onPressed: () => ioniaCustomRedeemViewModel.addCustomRedeem().then((value) { + Navigator.of(context).pop(ioniaCustomRedeemViewModel.remaining.toString()); + }), + ), ), ), SizedBox(height: 30), diff --git a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart index 2e7162e40..5b3c980ec 100644 --- a/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_gift_card_detail_page.dart @@ -32,7 +32,7 @@ class IoniaGiftCardDetailPage extends BasePage { final _backButton = Icon( Icons.arrow_back_ios, - color: Theme.of(context).primaryTextTheme!.headline6!.color!, + color: Theme.of(context).primaryTextTheme.headline6!.color!, size: 16, ); return Padding( @@ -43,7 +43,7 @@ class IoniaGiftCardDetailPage extends BasePage { child: ButtonTheme( minWidth: double.minPositive, child: TextButton( - // FIX-ME: Style + // FIX-ME: Style //highlightColor: Colors.transparent, //splashColor: Colors.transparent, //padding: EdgeInsets.all(0), @@ -61,7 +61,8 @@ class IoniaGiftCardDetailPage extends BasePage { Widget middle(BuildContext context) { return Text( viewModel.giftCard.legalName, - style: textMediumSemiBold(color: Theme.of(context).accentTextTheme!.headline1!.backgroundColor!), + style: + textMediumSemiBold(color: Theme.of(context).accentTextTheme.headline1!.backgroundColor!), ); } @@ -102,20 +103,21 @@ class IoniaGiftCardDetailPage extends BasePage { title: S.of(context).gift_card_number, subTitle: viewModel.giftCard.cardNumber, ), - if (viewModel.giftCard.cardPin?.isNotEmpty ?? false) - ...[Divider(height: 30), + if (viewModel.giftCard.cardPin.isNotEmpty) ...[ + Divider(height: 30), buildIoniaTile( context, title: S.of(context).pin_number, subTitle: viewModel.giftCard.cardPin, - )], + ) + ], Divider(height: 30), - Observer(builder: (_) => - buildIoniaTile( - context, - title: S.of(context).amount, - subTitle: viewModel.remainingAmount.toStringAsFixed(2) ?? '0.00', - )), + Observer( + builder: (_) => buildIoniaTile( + context, + title: S.of(context).amount, + subTitle: viewModel.remainingAmount.toStringAsFixed(2), + )), Divider(height: 50), TextIconButton( label: S.of(context).how_to_use_card, @@ -131,24 +133,23 @@ class IoniaGiftCardDetailPage extends BasePage { return Column( children: [ PrimaryButton( - onPressed: () async { - final amount = await Navigator.of(context) - .pushNamed(Routes.ioniaMoreOptionsPage, arguments: [viewModel.giftCard]) as List?; - if (amount != null) { - viewModel.updateRemaining( balance: double.parse(amount.first), customAmount: double.parse(amount.last)); - } - }, - text: S.of(context).more_options, - color: Theme.of(context).accentTextTheme.caption!.color!, - textColor: Theme.of(context).primaryTextTheme.headline6!.color!, + onPressed: () async { + await Navigator.of(context).pushNamed( + Routes.ioniaMoreOptionsPage, + arguments: [viewModel.giftCard]) as String?; + viewModel.refeshCard(); + }, + text: S.of(context).more_options, + color: Theme.of(context).accentTextTheme.caption!.color!, + textColor: Theme.of(context).primaryTextTheme.headline6!.color!, ), SizedBox(height: 12), LoadingPrimaryButton( isLoading: viewModel.redeemState is IsExecutingState, onPressed: () => viewModel.redeem().then( (_) { - Navigator.of(context) - .pushNamedAndRemoveUntil(Routes.ioniaManageCardsPage, (route) => route.isFirst); + Navigator.of(context).pushNamedAndRemoveUntil( + Routes.ioniaManageCardsPage, (route) => route.isFirst); }, ), text: S.of(context).mark_as_redeemed, @@ -168,12 +169,11 @@ class IoniaGiftCardDetailPage extends BasePage { Widget buildIoniaTile(BuildContext context, {required String title, required String subTitle}) { return IoniaTile( - title: title, - subTitle: subTitle, - onTap: () { - Clipboard.setData(ClipboardData(text: subTitle)); - showBar(context, - S.of(context).transaction_details_copied(title)); + title: title, + subTitle: subTitle, + onTap: () { + Clipboard.setData(ClipboardData(text: subTitle)); + showBar(context, S.of(context).transaction_details_copied(title)); }); } @@ -184,10 +184,10 @@ class IoniaGiftCardDetailPage extends BasePage { showPopUp( context: context, builder: (BuildContext context) { - return IoniaAlertModal( + return IoniaAlertModal( title: S.of(context).how_to_use_card, content: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: viewModel.giftCard.instructions .map((instruction) { return [ @@ -196,13 +196,13 @@ class IoniaGiftCardDetailPage extends BasePage { child: Text( instruction.header, style: textLargeSemiBold( - color: Theme.of(context).textTheme!.headline3!.color!, + color: Theme.of(context).textTheme.headline3!.color!, ), )), Text( instruction.body, style: textMedium( - color: Theme.of(context).textTheme!.headline3!.color!, + color: Theme.of(context).textTheme.headline3!.color!, ), ) ]; @@ -210,7 +210,7 @@ class IoniaGiftCardDetailPage extends BasePage { .expand((e) => e) .toList()), actionTitle: S.of(context).send_got_it, - ); + ); }); } } diff --git a/lib/src/screens/ionia/cards/ionia_more_options_page.dart b/lib/src/screens/ionia/cards/ionia_more_options_page.dart index d4e378f84..facdfaf32 100644 --- a/lib/src/screens/ionia/cards/ionia_more_options_page.dart +++ b/lib/src/screens/ionia/cards/ionia_more_options_page.dart @@ -5,7 +5,6 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/typography.dart'; import 'package:flutter/material.dart'; - class IoniaMoreOptionsPage extends BasePage { IoniaMoreOptionsPage(this.giftCard); @@ -16,7 +15,7 @@ class IoniaMoreOptionsPage extends BasePage { return Text( S.current.more_options, style: textMediumSemiBold( - color: Theme.of(context).accentTextTheme!.headline1!.backgroundColor!, + color: Theme.of(context).accentTextTheme.headline1!.backgroundColor!, ), ); } @@ -27,40 +26,46 @@ class IoniaMoreOptionsPage extends BasePage { padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - SizedBox(height: 10,), - Center(child: Text(S.of(context).choose_from_available_options, style: textMedium( - color: Theme.of(context).primaryTextTheme!.headline6!.color!, - ),)), - SizedBox(height: 40,), - InkWell( - onTap: () async { - final amounts = await Navigator.of(context).pushNamed(Routes.ioniaCustomRedeemPage, arguments: [giftCard]) as List; - if(amounts.first.isNotEmpty){ - Navigator.pop(context, amounts); - } - }, - child: _GradiantContainer( - content: Padding( - padding: const EdgeInsets.only(top: 24, left: 20, right: 24, bottom: 50), - child: Text( - S.of(context).custom_redeem_amount, - style: textXLargeSemiBold(), - ), - ), - ), - ) - ], - ), + children: [ + SizedBox( + height: 10, + ), + Center( + child: Text( + S.of(context).choose_from_available_options, + style: textMedium( + color: Theme.of(context).primaryTextTheme.headline6!.color!, + ), + )), + SizedBox( + height: 40, + ), + InkWell( + onTap: () async { + final amount = await Navigator.of(context) + .pushNamed(Routes.ioniaCustomRedeemPage, arguments: [giftCard]) as String?; + if (amount != null && amount.isNotEmpty) { + Navigator.pop(context); + } + }, + child: _GradiantContainer( + content: Padding( + padding: const EdgeInsets.only(top: 24, left: 20, right: 24, bottom: 50), + child: Text( + S.of(context).custom_redeem_amount, + style: textXLargeSemiBold(), + ), + ), + ), + ) + ], + ), ); } } class _GradiantContainer extends StatelessWidget { - const _GradiantContainer({ - Key? key, - required this.content - }) : super(key: key); + const _GradiantContainer({Key? key, required this.content}) : super(key: key); final Widget content; diff --git a/lib/view_model/ionia/ionia_custom_redeem_view_model.dart b/lib/view_model/ionia/ionia_custom_redeem_view_model.dart index 963604c15..6471c7378 100644 --- a/lib/view_model/ionia/ionia_custom_redeem_view_model.dart +++ b/lib/view_model/ionia/ionia_custom_redeem_view_model.dart @@ -1,29 +1,51 @@ +import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/ionia/ionia_gift_card.dart'; +import 'package:cake_wallet/ionia/ionia_service.dart'; import 'package:mobx/mobx.dart'; part 'ionia_custom_redeem_view_model.g.dart'; + class IoniaCustomRedeemViewModel = IoniaCustomRedeemViewModelBase with _$IoniaCustomRedeemViewModel; abstract class IoniaCustomRedeemViewModelBase with Store { - IoniaCustomRedeemViewModelBase(this.giftCard) - : amount = 0; + IoniaCustomRedeemViewModelBase({ + required this.giftCard, + required this.ioniaService, + }) : amount = 0, + redeemState = InitialExecutionState(); final IoniaGiftCard giftCard; + final IoniaService ioniaService; + + @observable + ExecutionState redeemState; + @observable double amount; @computed - double get remaining => amount <= giftCard.remainingAmount ? giftCard.remainingAmount - amount : 0; + double get remaining => + amount <= giftCard.remainingAmount ? giftCard.remainingAmount - amount : 0; @computed - String get formattedRemaining => remaining.toStringAsFixed(2); + String get formattedRemaining => remaining.toStringAsFixed(2); @computed bool get disableRedeem => amount > giftCard.remainingAmount; @action - void updateAmount(String text){ - amount = text.isEmpty ? 0 : (double.parse(text.replaceAll(',', '.')) ?? 0); + void updateAmount(String text) { + amount = text.isEmpty ? 0 : (double.parse(text.replaceAll(',', '.'))); } -} \ No newline at end of file + @action + Future addCustomRedeem() async { + try { + redeemState = IsExecutingState(); + await ioniaService.redeem(giftCardId: giftCard.id, amount: amount); + redeemState = ExecutedSuccessfullyState(); + } catch (e) { + redeemState = FailureState(e.toString()); + } + } +} diff --git a/lib/view_model/ionia/ionia_gift_card_details_view_model.dart b/lib/view_model/ionia/ionia_gift_card_details_view_model.dart index 745f2d530..cbf5ebc78 100644 --- a/lib/view_model/ionia/ionia_gift_card_details_view_model.dart +++ b/lib/view_model/ionia/ionia_gift_card_details_view_model.dart @@ -6,30 +6,25 @@ import 'package:device_display_brightness/device_display_brightness.dart'; part 'ionia_gift_card_details_view_model.g.dart'; -class IoniaGiftCardDetailsViewModel = IoniaGiftCardDetailsViewModelBase with _$IoniaGiftCardDetailsViewModel; +class IoniaGiftCardDetailsViewModel = IoniaGiftCardDetailsViewModelBase + with _$IoniaGiftCardDetailsViewModel; abstract class IoniaGiftCardDetailsViewModelBase with Store { - - IoniaGiftCardDetailsViewModelBase({ - required this.ioniaService, - required this.giftCard}) - : redeemState = InitialExecutionState(), - remainingAmount = giftCard.remainingAmount, - adjustedAmount = 0, - brightness = 0; + IoniaGiftCardDetailsViewModelBase({required this.ioniaService, required this.giftCard}) + : redeemState = InitialExecutionState(), + remainingAmount = giftCard.remainingAmount, + brightness = 0; final IoniaService ioniaService; - + double brightness; - + @observable IoniaGiftCard giftCard; @observable double remainingAmount; - double adjustedAmount; - @observable ExecutionState redeemState; @@ -38,22 +33,22 @@ abstract class IoniaGiftCardDetailsViewModelBase with Store { giftCard.remainingAmount = remainingAmount; try { redeemState = IsExecutingState(); - await ioniaService.redeem(giftCardId: giftCard.id, amount : adjustedAmount > 0 ? adjustedAmount : giftCard.remainingAmount); + await ioniaService.redeem(giftCardId: giftCard.id, amount: giftCard.remainingAmount); giftCard = await ioniaService.getGiftCard(id: giftCard.id); redeemState = ExecutedSuccessfullyState(); - } catch(e) { + } catch (e) { redeemState = FailureState(e.toString()); } } @action - void updateRemaining({required double balance, required double customAmount}) { - remainingAmount = balance; - adjustedAmount = customAmount; + Future refeshCard() async { + giftCard = await ioniaService.getGiftCard(id: giftCard.id); + remainingAmount = giftCard.remainingAmount; } void increaseBrightness() async { brightness = await DeviceDisplayBrightness.getBrightness(); await DeviceDisplayBrightness.setBrightness(1.0); } -} \ No newline at end of file +} From 9ef1186c453256de7e3e6a2ac48a0ab0a239e336 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Fri, 9 Dec 2022 17:08:52 +0100 Subject: [PATCH 031/100] Fix issues from code review --- lib/core/auth_service.dart | 26 +-- lib/src/screens/root/root.dart | 12 +- .../screens/wallet_list/wallet_list_page.dart | 157 +++++++++--------- lib/view_model/auth_view_model.dart | 4 +- 4 files changed, 99 insertions(+), 100 deletions(-) diff --git a/lib/core/auth_service.dart b/lib/core/auth_service.dart index 6b167fa40..c493cddcb 100644 --- a/lib/core/auth_service.dart +++ b/lib/core/auth_service.dart @@ -42,25 +42,27 @@ class AuthService with Store { return decodedPin == pin; } - void saveLastAuthTime(){ + void saveLastAuthTime() { + int timestamp = DateTime.now().millisecondsSinceEpoch; sharedPreferences.setInt(PreferencesKey.lastAuthTimeMilliseconds, timestamp); } - bool requireAuth(){ - final timestamp = sharedPreferences.getInt(PreferencesKey.lastAuthTimeMilliseconds); - final duration = _durationToRequireAuth(timestamp ?? 0); - final requiredPinInterval = getIt.get().pinTimeOutDuration; + bool requireAuth() { + + final timestamp = sharedPreferences.getInt(PreferencesKey.lastAuthTimeMilliseconds); + final duration = _durationToRequireAuth(timestamp ?? 0); + final requiredPinInterval = getIt.get().pinTimeOutDuration; - return duration >= requiredPinInterval.value; - } + return duration >= requiredPinInterval.value; + } - int _durationToRequireAuth(int timestamp){ + int _durationToRequireAuth(int timestamp) { - DateTime before = DateTime.fromMillisecondsSinceEpoch(timestamp); - DateTime now = DateTime.now(); - Duration timeDifference = now.difference(before); + DateTime before = DateTime.fromMillisecondsSinceEpoch(timestamp); + DateTime now = DateTime.now(); + Duration timeDifference = now.difference(before); - return timeDifference.inMinutes; + return timeDifference.inMinutes; } } diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 8d2b61a65..206f485dd 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -1,6 +1,5 @@ import 'dart:async'; import 'package:cake_wallet/core/auth_service.dart'; -import 'package:cake_wallet/di.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/auth/auth_page.dart'; @@ -14,12 +13,15 @@ class Root extends StatefulWidget { required this.authenticationStore, required this.appStore, required this.child, - required this.navigatorKey}) + required this.navigatorKey, + required this.authService, + }) : super(key: key); final AuthenticationStore authenticationStore; final AppStore appStore; final GlobalKey navigatorKey; + final AuthService authService; final Widget child; @override @@ -30,7 +32,7 @@ class RootState extends State with WidgetsBindingObserver { RootState() : _isInactiveController = StreamController.broadcast(), _isInactive = false, - _requestAuth = getIt.get().requireAuth(), + _requestAuth = true, _postFrameCallback = false; Stream get isInactive => _isInactiveController.stream; @@ -41,7 +43,7 @@ class RootState extends State with WidgetsBindingObserver { @override void initState() { - + _requestAuth = widget.authService.requireAuth(); _isInactiveController = StreamController.broadcast(); _isInactive = false; _postFrameCallback = false; @@ -58,7 +60,7 @@ class RootState extends State with WidgetsBindingObserver { } setState(() { - _requestAuth = getIt.get().requireAuth(); + _requestAuth = widget.authService.requireAuth(); }); if (!_isInactive && diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index 5d9650ef2..d76631b3f 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -220,93 +220,88 @@ class WalletListBodyState extends State { } Future _loadWallet(WalletListItem wallet) async { - if(await widget.walletListViewModel.checkIfAuthRequired()){ - await Navigator.of(context).pushNamed(Routes.auth, arguments: - (bool isAuthenticatedSuccessfully, AuthPageState auth) async { - if (!isAuthenticatedSuccessfully) { - return; - } + if (await widget.walletListViewModel.checkIfAuthRequired()) { + await Navigator.of(context).pushNamed(Routes.auth, + arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { + if (!isAuthenticatedSuccessfully) { + return; + } - try { - auth.changeProcessText( - S.of(context).wallet_list_loading_wallet(wallet.name)); - await widget.walletListViewModel.loadWallet(wallet); - auth.hideProgressText(); - auth.close(); - WidgetsBinding.instance.addPostFrameCallback((_) { - Navigator.of(context).pop(); - }); - } catch (e) { - auth.changeProcessText(S - .of(context) - .wallet_list_failed_to_load(wallet.name, e.toString())); - } - }); - }else{ + try { + auth.changeProcessText(S.of(context).wallet_list_loading_wallet(wallet.name)); + await widget.walletListViewModel.loadWallet(wallet); + auth.hideProgressText(); + auth.close(); + WidgetsBinding.instance.addPostFrameCallback((_) { + Navigator.of(context).pop(); + }); + } catch (e) { + auth.changeProcessText( + S.of(context).wallet_list_failed_to_load(wallet.name, e.toString())); + } + }); + } else { try { changeProcessText(S.of(context).wallet_list_loading_wallet(wallet.name)); await widget.walletListViewModel.loadWallet(wallet); hideProgressText(); - Navigator.of(context).pop(); + Navigator.of(context).pop(); } catch (e) { - changeProcessText(S - .of(context) - .wallet_list_failed_to_load(wallet.name, e.toString())); + changeProcessText(S.of(context).wallet_list_failed_to_load(wallet.name, e.toString())); } } } Future _removeWallet(WalletListItem wallet) async { - if(widget.walletListViewModel.checkIfAuthRequired()){ - await Navigator.of(context).pushNamed(Routes.auth, arguments: - (bool isAuthenticatedSuccessfully, AuthPageState auth) async { - if (!isAuthenticatedSuccessfully) { - return; - } - _onSuccessfulAuth(wallet, auth); - }); - }else{ + if (widget.walletListViewModel.checkIfAuthRequired()) { + await Navigator.of(context).pushNamed(Routes.auth, + arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { + if (!isAuthenticatedSuccessfully) { + return; + } + _onSuccessfulAuth(wallet, auth); + }); + } else { _onSuccessfulAuth(wallet, null); } } - _onSuccessfulAuth(WalletListItem wallet, AuthPageState? auth)async{ + void _onSuccessfulAuth(WalletListItem wallet, AuthPageState? auth) async { bool confirmed = false; - await showPopUp( - context: context, - builder: (BuildContext context) { - return AlertWithTwoActions( - alertTitle: S.of(context).delete_wallet, - alertContent: S.of(context).delete_wallet_confirm_message(wallet.name), - leftButtonText: S.of(context).cancel, - rightButtonText: S.of(context).delete, - actionLeftButton: () => Navigator.of(context).pop(), - actionRightButton: () { - confirmed = true; - Navigator.of(context).pop(); - }, - ); - }); - - if (confirmed) { - try { - auth != null ? - auth.changeProcessText( - S.of(context).wallet_list_removing_wallet(wallet.name)) - : changeProcessText( S.of(context).wallet_list_removing_wallet(wallet.name)); - await widget.walletListViewModel.remove(wallet); - } catch (e) { - auth != null ? - auth.changeProcessText( - S.of(context).wallet_list_failed_to_remove(wallet.name, e.toString()), - ) - : changeProcessText( - S.of(context).wallet_list_failed_to_remove(wallet.name, e.toString()), + await showPopUp( + context: context, + builder: (BuildContext context) { + return AlertWithTwoActions( + alertTitle: S.of(context).delete_wallet, + alertContent: S.of(context).delete_wallet_confirm_message(wallet.name), + leftButtonText: S.of(context).cancel, + rightButtonText: S.of(context).delete, + actionLeftButton: () => Navigator.of(context).pop(), + actionRightButton: () { + confirmed = true; + Navigator.of(context).pop(); + }, ); - } - } + }); - auth?.close(); + if (confirmed) { + try { + auth != null + ? auth.changeProcessText(S.of(context).wallet_list_removing_wallet(wallet.name)) + : changeProcessText(S.of(context).wallet_list_removing_wallet(wallet.name)); + await widget.walletListViewModel.remove(wallet); + } catch (e) { + auth != null + ? auth.changeProcessText( + S.of(context).wallet_list_failed_to_remove(wallet.name, e.toString()), + ) + : changeProcessText( + S.of(context).wallet_list_failed_to_remove(wallet.name, e.toString()), + ); + } + } + + auth?.close(); } void changeProcessText(String text) { @@ -319,16 +314,16 @@ class WalletListBodyState extends State { } ActionPane _actionPane(WalletListItem wallet) => ActionPane( - motion: const ScrollMotion(), - extentRatio: 0.3, - children: [ - SlidableAction( - onPressed: (_) => _removeWallet(wallet), - backgroundColor: Colors.red, - foregroundColor: Colors.white, - icon: CupertinoIcons.delete, - label: S.of(context).delete, - ), - ], - ); + motion: const ScrollMotion(), + extentRatio: 0.3, + children: [ + SlidableAction( + onPressed: (_) => _removeWallet(wallet), + backgroundColor: Colors.red, + foregroundColor: Colors.white, + icon: CupertinoIcons.delete, + label: S.of(context).delete, + ), + ], + ); } diff --git a/lib/view_model/auth_view_model.dart b/lib/view_model/auth_view_model.dart index 42201ddab..d45873230 100644 --- a/lib/view_model/auth_view_model.dart +++ b/lib/view_model/auth_view_model.dart @@ -121,8 +121,8 @@ abstract class AuthViewModelBase with Store { } } - void _saveLastAuthTime(ExecutionState state){ - if(state is ExecutedSuccessfullyState){ + void _saveLastAuthTime(ExecutionState state) { + if(state is ExecutedSuccessfullyState) { _authService.saveLastAuthTime(); } } From 6836ac6d1ac2374b4586b7ac3bd643909ed14fbe Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Fri, 9 Dec 2022 20:18:36 +0100 Subject: [PATCH 032/100] Fix formatting --- lib/core/auth_service.dart | 14 +++++--------- lib/view_model/auth_view_model.dart | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/lib/core/auth_service.dart b/lib/core/auth_service.dart index c493cddcb..569db5700 100644 --- a/lib/core/auth_service.dart +++ b/lib/core/auth_service.dart @@ -21,8 +21,7 @@ class AuthService with Store { Future canAuthenticate() async { final key = generateStoreKeyFor(key: SecretStoreKey.pinCodePassword); - final walletName = - sharedPreferences.getString(PreferencesKey.currentWalletName) ?? ''; + final walletName = sharedPreferences.getString(PreferencesKey.currentWalletName) ?? ''; var password = ''; try { @@ -43,26 +42,23 @@ class AuthService with Store { } void saveLastAuthTime() { - int timestamp = DateTime.now().millisecondsSinceEpoch; sharedPreferences.setInt(PreferencesKey.lastAuthTimeMilliseconds, timestamp); } - bool requireAuth() { - + bool requireAuth() { final timestamp = sharedPreferences.getInt(PreferencesKey.lastAuthTimeMilliseconds); - final duration = _durationToRequireAuth(timestamp ?? 0); + final duration = _durationToRequireAuth(timestamp ?? 0); final requiredPinInterval = getIt.get().pinTimeOutDuration; - + return duration >= requiredPinInterval.value; } int _durationToRequireAuth(int timestamp) { - DateTime before = DateTime.fromMillisecondsSinceEpoch(timestamp); DateTime now = DateTime.now(); Duration timeDifference = now.difference(before); - return timeDifference.inMinutes; + return timeDifference.inMinutes; } } diff --git a/lib/view_model/auth_view_model.dart b/lib/view_model/auth_view_model.dart index d45873230..e50f4db0c 100644 --- a/lib/view_model/auth_view_model.dart +++ b/lib/view_model/auth_view_model.dart @@ -14,12 +14,12 @@ part 'auth_view_model.g.dart'; class AuthViewModel = AuthViewModelBase with _$AuthViewModel; abstract class AuthViewModelBase with Store { - AuthViewModelBase(this._authService, this._sharedPreferences, - this._settingsStore, this._biometricAuth) + AuthViewModelBase( + this._authService, this._sharedPreferences, this._settingsStore, this._biometricAuth) : _failureCounter = 0, - state = InitialExecutionState(){ - reaction((_) => state, _saveLastAuthTime); - } + state = InitialExecutionState() { + reaction((_) => state, _saveLastAuthTime); + } static const maxFailedLogins = 3; static const banTimeout = 180; // 3 minutes @@ -30,8 +30,7 @@ abstract class AuthViewModelBase with Store { int get pinLength => _settingsStore.pinCodeLength; - bool get isBiometricalAuthenticationAllowed => - _settingsStore.allowBiometricalAuthentication; + bool get isBiometricalAuthenticationAllowed => _settingsStore.allowBiometricalAuthentication; @observable int _failureCounter; @@ -59,7 +58,7 @@ abstract class AuthViewModelBase with Store { if (isSuccessfulAuthenticated) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - state = ExecutedSuccessfullyState(); + state = ExecutedSuccessfullyState(); _failureCounter = 0; }); } else { @@ -116,14 +115,14 @@ abstract class AuthViewModelBase with Store { state = ExecutedSuccessfullyState(); } } - } catch(e) { + } catch (e) { state = FailureState(e.toString()); } } void _saveLastAuthTime(ExecutionState state) { - if(state is ExecutedSuccessfullyState) { - _authService.saveLastAuthTime(); + if (state is ExecutedSuccessfullyState) { + _authService.saveLastAuthTime(); } } } From 59484e5b9165ed01454bf63438013c64037df21c Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Fri, 9 Dec 2022 20:19:23 +0100 Subject: [PATCH 033/100] Fix formatting --- lib/src/screens/root/root.dart | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 206f485dd..d217789e8 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -8,15 +8,14 @@ import 'package:cake_wallet/store/authentication_store.dart'; import 'package:cake_wallet/entities/qr_scanner.dart'; class Root extends StatefulWidget { - Root( - {required Key key, - required this.authenticationStore, - required this.appStore, - required this.child, - required this.navigatorKey, - required this.authService, - }) - : super(key: key); + Root({ + required Key key, + required this.authenticationStore, + required this.appStore, + required this.child, + required this.navigatorKey, + required this.authService, + }) : super(key: key); final AuthenticationStore authenticationStore; final AppStore appStore; @@ -30,10 +29,10 @@ class Root extends StatefulWidget { class RootState extends State with WidgetsBindingObserver { RootState() - : _isInactiveController = StreamController.broadcast(), - _isInactive = false, - _requestAuth = true, - _postFrameCallback = false; + : _isInactiveController = StreamController.broadcast(), + _isInactive = false, + _requestAuth = true, + _postFrameCallback = false; Stream get isInactive => _isInactiveController.stream; StreamController _isInactiveController; @@ -63,8 +62,7 @@ class RootState extends State with WidgetsBindingObserver { _requestAuth = widget.authService.requireAuth(); }); - if (!_isInactive && - widget.authenticationStore.state == AuthenticationState.allowed) { + if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) { setState(() => _setInactive(true)); } From ff28dfbb9ca071e57035089b016b48bea07d24ea Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 10 Dec 2022 11:40:04 +0200 Subject: [PATCH 034/100] Rename Change.NOW --- lib/view_model/dashboard/dashboard_view_model.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 284b1fc72..40ea2d78b 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -83,12 +83,12 @@ abstract class DashboardViewModelBase with Store { .toggleDisplayExchange(ExchangeProviderDescription.all)), FilterItem( value: tradeFilterStore.displayChangeNow, - caption: 'Change.NOW', + caption: ExchangeProviderDescription.changeNow.title, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.changeNow)), FilterItem( value: tradeFilterStore.displaySideShift, - caption: 'SideShift', + caption: ExchangeProviderDescription.sideShift.title, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.sideShift)), ] From c57507e530d3bff5792f4272842a6a6cf0e20721 Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 10 Dec 2022 12:56:37 +0200 Subject: [PATCH 035/100] redesigh checkbox --- .../dashboard/widgets/filter_widget.dart | 13 ++- lib/src/widgets/rounded_checkbox.dart | 91 ------------------- lib/src/widgets/standard_checkbox.dart | 44 ++++++--- 3 files changed, 39 insertions(+), 109 deletions(-) delete mode 100644 lib/src/widgets/rounded_checkbox.dart diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 10bda6798..a3172940f 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -1,12 +1,12 @@ import 'dart:ui'; import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/filter_tile.dart'; +import 'package:cake_wallet/src/widgets/standard_checkbox.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_close_button.dart'; -import 'package:cake_wallet/src/widgets/rounded_checkbox.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; //import 'package:date_range_picker/date_range_picker.dart' as date_rage_picker; @@ -97,14 +97,13 @@ class FilterWidget extends StatelessWidget { final content = item.onChanged != null ? Observer( builder: (_) => - RoundedCheckboxWidget( + StandardCheckbox( value: item.value.value, caption: item.caption, - onChanged: item.onChanged, - currentTheme: - dashboardViewModel - .settingsStore - .currentTheme, + gradientBackground: true, + borderColor: Theme.of(context).dividerColor, + iconColor: Colors.white, + onChanged: (bool val){}, )) : GestureDetector( onTap: () async { diff --git a/lib/src/widgets/rounded_checkbox.dart b/lib/src/widgets/rounded_checkbox.dart deleted file mode 100644 index 1bdfb267d..000000000 --- a/lib/src/widgets/rounded_checkbox.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'package:cake_wallet/palette.dart'; -import 'package:flutter/material.dart'; -import 'package:cake_wallet/themes/theme_base.dart'; - -class RoundedCheckboxWidget extends StatelessWidget { - RoundedCheckboxWidget( - {required this.value, - required this.caption, - required this.onChanged, - this.currentTheme}); - - final bool value; - final String caption; - final Function onChanged; - final ThemeBase? currentTheme; - - bool get darkTheme => currentTheme!.type == ThemeType.dark; - - @override - Widget build(BuildContext context) { - - final baseGradient = LinearGradient(colors: [ - Theme.of(context).primaryTextTheme.subtitle1!.color!, - Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, - ], begin: Alignment.centerLeft, end: Alignment.centerRight); - - final darkThemeGradient = LinearGradient(colors: [ - Palette.blueCraiola, - Palette.blueGreyCraiola, - ], begin: Alignment.topLeft, end: Alignment.bottomRight); - - final gradient = darkTheme ? darkThemeGradient : baseGradient; - - final uncheckedColor = darkTheme - ? Theme.of(context).primaryTextTheme.subtitle1!.decorationColor! - : Colors.white; - - final borderColor = darkTheme - ? Theme.of(context).accentTextTheme.subtitle2!.backgroundColor! - : Colors.transparent; - - final checkedOuterBoxDecoration = - BoxDecoration(shape: BoxShape.circle, gradient: gradient); - final outerBoxDecoration = BoxDecoration( - shape: BoxShape.circle, - color: Theme.of(context).accentTextTheme.overline!.color!, - border: Border.all(color: borderColor)); - - final checkedInnerBoxDecoration = - BoxDecoration(shape: BoxShape.circle, color: Colors.white); - final innerBoxDecoration = - BoxDecoration(shape: BoxShape.circle, color: uncheckedColor); - - return GestureDetector( - onTap: () => onChanged(), - child: Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - height: 24.0, - width: 24.0, - child: DecoratedBox( - decoration: - value ? checkedOuterBoxDecoration : outerBoxDecoration, - child: Padding( - padding: EdgeInsets.all(value ? 4.0 : 1.0), - child: DecoratedBox( - decoration: - value ? checkedInnerBoxDecoration : innerBoxDecoration, - ), - ), - ), - ), - Padding( - padding: EdgeInsets.only(left: 16), - child: Text( - caption, - style: TextStyle( - color: Theme.of(context).primaryTextTheme.headline6!.color!, - fontSize: 18, - fontFamily: 'Lato', - fontWeight: FontWeight.w500, - decoration: TextDecoration.none), - ), - ) - ], - ), - ); - } -} \ No newline at end of file diff --git a/lib/src/widgets/standard_checkbox.dart b/lib/src/widgets/standard_checkbox.dart index a59364fe1..9202ea7f5 100644 --- a/lib/src/widgets/standard_checkbox.dart +++ b/lib/src/widgets/standard_checkbox.dart @@ -7,11 +7,17 @@ class StandardCheckbox extends StatefulWidget { Key? key, required this.value, this.caption = '', + this.gradientBackground = false, + this.borderColor, + this.iconColor, required this.onChanged}) : super(key: key); final bool value; final String caption; + final bool gradientBackground; + final Color? borderColor; + final Color? iconColor; final Function(bool) onChanged; @override @@ -32,6 +38,31 @@ class StandardCheckboxState extends State { @override Widget build(BuildContext context) { + + final baseGradient = LinearGradient(colors: [ + Theme.of(context).primaryTextTheme.subtitle1!.color!, + Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, + ], begin: Alignment.centerLeft, end: Alignment.centerRight); + + final boxBorder = Border.all( + color: widget.borderColor ?? Theme.of(context) + .primaryTextTheme + .caption! + .color!, + width: 1.0); + + + final checkedBoxDecoration = BoxDecoration( + gradient: widget.gradientBackground ? baseGradient : null, + border: widget.gradientBackground ? null : boxBorder, + borderRadius: BorderRadius.all( + Radius.circular(8.0))); + + final uncheckedBoxDecoration = BoxDecoration( + border: boxBorder, + borderRadius: BorderRadius.all( + Radius.circular(8.0))); + return GestureDetector( onTap: () { value = !value; @@ -45,20 +76,11 @@ class StandardCheckboxState extends State { Container( height: 24.0, width: 24.0, - decoration: BoxDecoration( - border: Border.all( - color: Theme.of(context) - .primaryTextTheme! - .caption! - .color!, - width: 1.0), - borderRadius: BorderRadius.all( - Radius.circular(8.0)), - color: Theme.of(context).backgroundColor), + decoration: value ? checkedBoxDecoration : uncheckedBoxDecoration, child: value ? Icon( Icons.check, - color: Colors.blue, + color: widget.iconColor ?? Colors.blue, size: 20.0, ) : Offstage(), From b536973077b27058126af54f930d1c3cf93f5013 Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 12 Dec 2022 00:07:05 +0200 Subject: [PATCH 036/100] make checkbox stateless --- .../dashboard/widgets/filter_widget.dart | 2 +- lib/src/screens/exchange/exchange_page.dart | 8 ----- lib/src/widgets/standard_checkbox.dart | 34 ++++--------------- .../dashboard/dashboard_view_model.dart | 6 ++-- 4 files changed, 11 insertions(+), 39 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index a3172940f..411006633 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -103,7 +103,7 @@ class FilterWidget extends StatelessWidget { gradientBackground: true, borderColor: Theme.of(context).dividerColor, iconColor: Colors.white, - onChanged: (bool val){}, + onChanged: (value) => item.onChanged(), )) : GestureDetector( onTap: () async { diff --git a/lib/src/screens/exchange/exchange_page.dart b/lib/src/screens/exchange/exchange_page.dart index 744848156..7b73a134b 100644 --- a/lib/src/screens/exchange/exchange_page.dart +++ b/lib/src/screens/exchange/exchange_page.dart @@ -40,7 +40,6 @@ class ExchangePage extends BasePage { final ExchangeViewModel exchangeViewModel; final depositKey = GlobalKey(); final receiveKey = GlobalKey(); - final checkBoxKey = GlobalKey(); final _formKey = GlobalKey(); final _depositAmountFocus = FocusNode(); final _depositAddressFocus = FocusNode(); @@ -339,7 +338,6 @@ class ExchangePage extends BasePage { mainAxisAlignment: MainAxisAlignment.start, children: [ StandardCheckbox( - key: checkBoxKey, value: exchangeViewModel.isFixedRateMode, caption: S.of(context).fixed_rate, onChanged: (value) => @@ -682,12 +680,6 @@ class ExchangePage extends BasePage { } }); - reaction((_) => exchangeViewModel.isFixedRateMode, (bool value) { - if (checkBoxKey.currentState!.value != exchangeViewModel.isFixedRateMode) { - checkBoxKey.currentState!.value = exchangeViewModel.isFixedRateMode; - } - }); - depositAddressController.addListener( () => exchangeViewModel.depositAddress = depositAddressController.text); diff --git a/lib/src/widgets/standard_checkbox.dart b/lib/src/widgets/standard_checkbox.dart index 9202ea7f5..d7b947a7e 100644 --- a/lib/src/widgets/standard_checkbox.dart +++ b/lib/src/widgets/standard_checkbox.dart @@ -2,16 +2,14 @@ import 'dart:ui'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class StandardCheckbox extends StatefulWidget { +class StandardCheckbox extends StatelessWidget { StandardCheckbox({ - Key? key, required this.value, this.caption = '', this.gradientBackground = false, this.borderColor, this.iconColor, - required this.onChanged}) - : super(key: key); + required this.onChanged}); final bool value; final String caption; @@ -20,21 +18,7 @@ class StandardCheckbox extends StatefulWidget { final Color? iconColor; final Function(bool) onChanged; - @override - StandardCheckboxState createState() => - StandardCheckboxState(value, caption, onChanged); -} -class StandardCheckboxState extends State { - StandardCheckboxState(this.value, this.caption, this.onChanged); - - bool value; - String caption; - Function(bool) onChanged; - - void changeValue(bool newValue) { - setState(() => value = newValue); - } @override Widget build(BuildContext context) { @@ -45,7 +29,7 @@ class StandardCheckboxState extends State { ], begin: Alignment.centerLeft, end: Alignment.centerRight); final boxBorder = Border.all( - color: widget.borderColor ?? Theme.of(context) + color: borderColor ?? Theme.of(context) .primaryTextTheme .caption! .color!, @@ -53,8 +37,8 @@ class StandardCheckboxState extends State { final checkedBoxDecoration = BoxDecoration( - gradient: widget.gradientBackground ? baseGradient : null, - border: widget.gradientBackground ? null : boxBorder, + gradient: gradientBackground ? baseGradient : null, + border: gradientBackground ? null : boxBorder, borderRadius: BorderRadius.all( Radius.circular(8.0))); @@ -64,11 +48,7 @@ class StandardCheckboxState extends State { Radius.circular(8.0))); return GestureDetector( - onTap: () { - value = !value; - onChanged(value); - setState(() {}); - }, + onTap: () => onChanged(!value), child: Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, @@ -80,7 +60,7 @@ class StandardCheckboxState extends State { child: value ? Icon( Icons.check, - color: widget.iconColor ?? Colors.blue, + color: iconColor ?? Colors.blue, size: 20.0, ) : Offstage(), diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 40ea2d78b..ac38a43cc 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -61,15 +61,15 @@ abstract class DashboardViewModelBase with Store { FilterItem( value: transactionFilterStore.displayAll, caption: S.current.all_transactions, - onChanged: () => transactionFilterStore.toggleIAll()), + onChanged: transactionFilterStore.toggleIAll), FilterItem( value: transactionFilterStore.displayIncoming, caption: S.current.incoming, - onChanged: () => transactionFilterStore.toggleIncoming()), + onChanged:transactionFilterStore.toggleIncoming), FilterItem( value: transactionFilterStore.displayOutgoing, caption: S.current.outgoing, - onChanged: () => transactionFilterStore.toggleOutgoing()), + onChanged: transactionFilterStore.toggleOutgoing), // FilterItem( // value: () => false, // caption: S.current.transactions_by_date, From 7d08bb0e76265dd28c15d5877a20724895532093 Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 12 Dec 2022 00:37:03 +0200 Subject: [PATCH 037/100] Add SimpleSwap --- lib/view_model/dashboard/dashboard_view_model.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index ac38a43cc..ba0f9f8ff 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -91,6 +91,11 @@ abstract class DashboardViewModelBase with Store { caption: ExchangeProviderDescription.sideShift.title, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.sideShift)), + FilterItem( + value: tradeFilterStore.displaySimpleSwap, + caption: ExchangeProviderDescription.simpleSwap.title, + onChanged: () => tradeFilterStore + .toggleDisplayExchange(ExchangeProviderDescription.simpleSwap)), ] }, subname = '', From b1120cf2f83a49a75b4d8ac9e8eb0a467ef3b94f Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 12 Dec 2022 14:01:37 +0200 Subject: [PATCH 038/100] fix filter for SideShift --- lib/store/dashboard/trade_filter_store.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/store/dashboard/trade_filter_store.dart b/lib/store/dashboard/trade_filter_store.dart index 4319c3bc7..9c1dc9a9a 100644 --- a/lib/store/dashboard/trade_filter_store.dart +++ b/lib/store/dashboard/trade_filter_store.dart @@ -79,6 +79,8 @@ abstract class TradeFilterStoreBase with Store { .where((item) => (displayXMRTO.value && item.trade.provider == ExchangeProviderDescription.xmrto) || + (displaySideShift.value && + item.trade.provider == ExchangeProviderDescription.sideShift) || (displayChangeNow.value && item.trade.provider == ExchangeProviderDescription.changeNow) || From 2da50776d16629d044211ced3a80456ca9f18c14 Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 12 Dec 2022 14:28:53 +0200 Subject: [PATCH 039/100] code formatting --- .../dashboard/widgets/filter_widget.dart | 198 ++++++++---------- .../exchange_trade/exchange_trade_page.dart | 4 +- .../order_details/order_details_page.dart | 6 +- .../widgets/settings_switcher_cell.dart | 4 +- .../trade_details/trade_details_page.dart | 14 +- .../transaction_details_page.dart | 6 +- .../unspent_coins_details_page.dart | 4 +- .../widgets/unspent_coins_switch_row.dart | 4 +- .../screens/wallet_keys/wallet_keys_page.dart | 4 +- lib/src/widgets/standard_checkbox.dart | 67 +++--- lib/src/widgets/standard_list.dart | 6 +- ...list_card.dart => standard_list_card.dart} | 4 +- ...t_list_row.dart => standard_list_row.dart} | 4 +- ...row.dart => standard_list_status_row.dart} | 4 +- ...ndart_switch.dart => standard_switch.dart} | 8 +- 15 files changed, 151 insertions(+), 186 deletions(-) rename lib/src/widgets/{standart_list_card.dart => standard_list_card.dart} (96%) rename lib/src/widgets/{standart_list_row.dart => standard_list_row.dart} (96%) rename lib/src/widgets/{standart_list_status_row.dart => standard_list_status_row.dart} (95%) rename lib/src/widgets/{standart_switch.dart => standard_switch.dart} (81%) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 411006633..6831819e4 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -15,8 +15,7 @@ class FilterWidget extends StatelessWidget { FilterWidget({required this.dashboardViewModel}); final DashboardViewModel dashboardViewModel; - final closeIcon = - Image.asset('assets/images/close.png', color: Palette.darkBlueCraiola); + final closeIcon = Image.asset('assets/images/close.png', color: Palette.darkBlueCraiola); @override Widget build(BuildContext context) { @@ -33,71 +32,55 @@ class FilterWidget extends StatelessWidget { child: ClipRRect( borderRadius: BorderRadius.all(Radius.circular(24)), child: Container( - color: Theme.of(context) - .textTheme! - .bodyText1! - .decorationColor!, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(24.0), - child: Text( - S.of(context).filters, - style: TextStyle( - color: Theme.of(context).primaryTextTheme - .overline!.color!, - fontSize: 16, - fontFamily: 'Lato', - decoration: TextDecoration.none, - ), - ), + color: Theme.of(context).textTheme!.bodyText1!.decorationColor!, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Padding( + padding: EdgeInsets.all(24.0), + child: Text( + S.of(context).filters, + style: TextStyle( + color: Theme.of(context).primaryTextTheme.overline!.color!, + fontSize: 16, + fontFamily: 'Lato', + decoration: TextDecoration.none, ), - sectionDivider, - ListView.separated( - padding: EdgeInsets.zero, - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemCount: dashboardViewModel.filterItems.length, - separatorBuilder: (context, _) => sectionDivider, - itemBuilder: (_, index1) { - final title = dashboardViewModel.filterItems.keys - .elementAt(index1); - final section = dashboardViewModel - .filterItems.values - .elementAt(index1); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 20, left: 24, right: 24), - child: Text( - title, - style: TextStyle( - color: Theme.of(context) - .primaryTextTheme! - .headline6! - .color!, - fontSize: 16, - fontFamily: 'Lato', - fontWeight: FontWeight.bold, - decoration: TextDecoration.none), - ), - ), - ListView.builder( - padding: - EdgeInsets.symmetric(vertical: 8.0), - shrinkWrap: true, - physics: - const NeverScrollableScrollPhysics(), - itemCount: section.length, - itemBuilder: (_, index2) { - final item = section[index2]; - final content = item.onChanged != null - ? Observer( - builder: (_) => - StandardCheckbox( + ), + ), + sectionDivider, + ListView.separated( + padding: EdgeInsets.zero, + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: dashboardViewModel.filterItems.length, + separatorBuilder: (context, _) => sectionDivider, + itemBuilder: (_, index1) { + final title = dashboardViewModel.filterItems.keys.elementAt(index1); + final section = dashboardViewModel.filterItems.values.elementAt(index1); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 20, left: 24, right: 24), + child: Text( + title, + style: TextStyle( + color: Theme.of(context).primaryTextTheme!.headline6!.color!, + fontSize: 16, + fontFamily: 'Lato', + fontWeight: FontWeight.bold, + decoration: TextDecoration.none), + ), + ), + ListView.builder( + padding: EdgeInsets.symmetric(vertical: 8.0), + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: section.length, + itemBuilder: (_, index2) { + final item = section[index2]; + final content = item.onChanged != null + ? Observer( + builder: (_) => StandardCheckbox( value: item.value.value, caption: item.caption, gradientBackground: true, @@ -105,51 +88,48 @@ class FilterWidget extends StatelessWidget { iconColor: Colors.white, onChanged: (value) => item.onChanged(), )) - : GestureDetector( - onTap: () async { - //final List picked = - //await date_rage_picker.showDatePicker( - // context: context, - // initialFirstDate: DateTime.now() - // .subtract(Duration(days: 1)), - // initialLastDate: (DateTime.now()), - // firstDate: DateTime(2015), - // lastDate: DateTime.now() - // .add(Duration(days: 1))); + : GestureDetector( + onTap: () async { + //final List picked = + //await date_rage_picker.showDatePicker( + // context: context, + // initialFirstDate: DateTime.now() + // .subtract(Duration(days: 1)), + // initialLastDate: (DateTime.now()), + // firstDate: DateTime(2015), + // lastDate: DateTime.now() + // .add(Duration(days: 1))); - //if (picked != null && picked.length == 2) { - // dashboardViewModel.transactionFilterStore - // .changeStartDate(picked.first); - // dashboardViewModel.transactionFilterStore - // .changeEndDate(picked.last); - //} - }, - child: Padding( - padding: - EdgeInsets.only(left: 32), - child: Text( - item.caption, - style: TextStyle( - color: Colors.red, - //Theme.of(context).primaryTextTheme.title.color,// - fontSize: 18, - fontFamily: 'Lato', - fontWeight: - FontWeight.w500, - decoration: - TextDecoration.none), + //if (picked != null && picked.length == 2) { + // dashboardViewModel.transactionFilterStore + // .changeStartDate(picked.first); + // dashboardViewModel.transactionFilterStore + // .changeEndDate(picked.last); + //} + }, + child: Padding( + padding: EdgeInsets.only(left: 32), + child: Text( + item.caption, + style: TextStyle( + color: Colors.red, + //Theme.of(context).primaryTextTheme.title.color,// + fontSize: 18, + fontFamily: 'Lato', + fontWeight: FontWeight.w500, + decoration: TextDecoration.none), + ), ), - ), - ); + ); - return FilterTile(child: content); - }, - ) - ], - ); - }, - ), - ]), + return FilterTile(child: content); + }, + ) + ], + ); + }, + ), + ]), ), ), ), @@ -172,4 +152,4 @@ class SectionDivider extends StatelessWidget { color: Theme.of(context).dividerColor, ); } -} \ No newline at end of file +} diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index 7c9fc1be7..e3eb8db96 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -8,7 +8,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart'; import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.dart'; -import 'package:cake_wallet/src/widgets/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_row.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/exchange/exchange_trade_view_model.dart'; @@ -194,7 +194,7 @@ class ExchangeTradeState extends State { final item = widget.exchangeTradeViewModel.items[index]; final value = item.data ?? fetchingLabel; - final content = StandartListRow( + final content = AnotherStandardListRow( title: item.title, value: value, valueFontSize: 14, diff --git a/lib/src/screens/order_details/order_details_page.dart b/lib/src/screens/order_details/order_details_page.dart index 2e6ece509..a7eff99b8 100644 --- a/lib/src/screens/order_details/order_details_page.dart +++ b/lib/src/screens/order_details/order_details_page.dart @@ -7,7 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/widgets/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_row.dart'; import 'package:cake_wallet/src/screens/trade_details/track_trade_list_item.dart'; class OrderDetailsPage extends BasePage { @@ -57,7 +57,7 @@ class OrderDetailsPageBodyState extends State { if (item is TrackTradeListItem) { return GestureDetector( onTap: item.onTap, - child: StandartListRow( + child: AnotherStandardListRow( title: '${item.title}', value: '${item.value}')); } else { return GestureDetector( @@ -65,7 +65,7 @@ class OrderDetailsPageBodyState extends State { Clipboard.setData(ClipboardData(text: '${item.value}')); showBar(context, S.of(context).copied_to_clipboard); }, - child: StandartListRow( + child: AnotherStandardListRow( title: '${item.title}', value: '${item.value}')); } }); diff --git a/lib/src/screens/settings/widgets/settings_switcher_cell.dart b/lib/src/screens/settings/widgets/settings_switcher_cell.dart index fc99f3297..c1d7fa150 100644 --- a/lib/src/screens/settings/widgets/settings_switcher_cell.dart +++ b/lib/src/screens/settings/widgets/settings_switcher_cell.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart'; -import 'package:cake_wallet/src/widgets/standart_switch.dart'; +import 'package:cake_wallet/src/widgets/standard_switch.dart'; class SettingsSwitcherCell extends StandardListRow { SettingsSwitcherCell( @@ -11,6 +11,6 @@ class SettingsSwitcherCell extends StandardListRow { final void Function(BuildContext context, bool value)? onValueChange; @override - Widget buildTrailing(BuildContext context) => StandartSwitch( + Widget buildTrailing(BuildContext context) => StandardSwitch( value: value, onTaped: () => onValueChange?.call(context, !value)); } diff --git a/lib/src/screens/trade_details/trade_details_page.dart b/lib/src/screens/trade_details/trade_details_page.dart index 500d16beb..1bb5d3ec8 100644 --- a/lib/src/screens/trade_details/trade_details_page.dart +++ b/lib/src/screens/trade_details/trade_details_page.dart @@ -1,6 +1,6 @@ import 'package:cake_wallet/src/widgets/standard_list.dart'; -import 'package:cake_wallet/src/widgets/standart_list_card.dart'; -import 'package:cake_wallet/src/widgets/standart_list_status_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_card.dart'; +import 'package:cake_wallet/src/widgets/standard_list_status_row.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/view_model/trade_details_view_model.dart'; import 'package:flutter/material.dart'; @@ -9,7 +9,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/widgets/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_row.dart'; import 'package:cake_wallet/src/screens/trade_details/track_trade_list_item.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_list_card.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_status_item.dart'; @@ -62,18 +62,18 @@ class TradeDetailsPageBodyState extends State { if (item is TrackTradeListItem) { return GestureDetector( onTap: item.onTap, - child: StandartListRow( + child: AnotherStandardListRow( title: '${item.title}', value: '${item.value}')); } if (item is DetailsListStatusItem) { - return StandartListStatusRow( + return StandardListStatusRow( title: item.title, value: item.value); } if (item is TradeDetailsListCardItem) { - return TradeDatailsStandartListCard( + return TradeDetailsStandardListCard( id: item.id, create: item.createdAt, pair: item.pair, @@ -86,7 +86,7 @@ class TradeDetailsPageBodyState extends State { Clipboard.setData(ClipboardData(text: '${item.value}')); showBar(context, S.of(context).copied_to_clipboard); }, - child: StandartListRow( + child: AnotherStandardListRow( title: '${item.title}', value: '${item.value}')); }); }); diff --git a/lib/src/screens/transaction_details/transaction_details_page.dart b/lib/src/screens/transaction_details/transaction_details_page.dart index 098d65c23..8d3ae8c9e 100644 --- a/lib/src/screens/transaction_details/transaction_details_page.dart +++ b/lib/src/screens/transaction_details/transaction_details_page.dart @@ -6,7 +6,7 @@ import 'package:cake_wallet/view_model/transaction_details_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/src/widgets/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_row.dart'; import 'package:cake_wallet/src/screens/transaction_details/blockexplorer_list_item.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; @@ -42,7 +42,7 @@ class TransactionDetailsPage extends BasePage { S.of(context).transaction_details_copied(item.title)); }, child: - StandartListRow(title: '${item.title}:', value: item.value), + AnotherStandardListRow(title: '${item.title}:', value: item.value), ); } @@ -50,7 +50,7 @@ class TransactionDetailsPage extends BasePage { return GestureDetector( onTap: item.onTap, child: - StandartListRow(title: '${item.title}:', value: item.value), + AnotherStandardListRow(title: '${item.title}:', value: item.value), ); } diff --git a/lib/src/screens/unspent_coins/unspent_coins_details_page.dart b/lib/src/screens/unspent_coins/unspent_coins_details_page.dart index b1c4ff01b..74fbcfdd9 100644 --- a/lib/src/screens/unspent_coins/unspent_coins_details_page.dart +++ b/lib/src/screens/unspent_coins/unspent_coins_details_page.dart @@ -5,7 +5,7 @@ import 'package:cake_wallet/src/widgets/standard_list.dart'; import 'package:cake_wallet/view_model/unspent_coins/unspent_coins_details_view_model.dart'; import 'package:cake_wallet/view_model/unspent_coins/unspent_coins_switch_item.dart'; import 'package:flutter/material.dart'; -import 'package:cake_wallet/src/widgets/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_row.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -30,7 +30,7 @@ class UnspentCoinsDetailsPage extends BasePage { final item = unspentCoinsDetailsViewModel.items[index]; if (item is StandartListItem) { - return StandartListRow( + return AnotherStandardListRow( title: '${item.title}:', value: item.value); } diff --git a/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart b/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart index 6272469df..734aeb7ee 100644 --- a/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart +++ b/lib/src/screens/unspent_coins/widgets/unspent_coins_switch_row.dart @@ -1,4 +1,4 @@ -import 'package:cake_wallet/src/widgets/standart_switch.dart'; +import 'package:cake_wallet/src/widgets/standard_switch.dart'; import 'package:flutter/material.dart'; class UnspentCoinsSwitchRow extends StatelessWidget { @@ -33,7 +33,7 @@ class UnspentCoinsSwitchRow extends StatelessWidget { textAlign: TextAlign.left), Padding( padding: EdgeInsets.only(top: 12), - child: StandartSwitch( + child: StandardSwitch( value: switchValue, onTaped: () => onSwitchValueChange(!switchValue)) ) diff --git a/lib/src/screens/wallet_keys/wallet_keys_page.dart b/lib/src/screens/wallet_keys/wallet_keys_page.dart index 942809ac8..f97200e1e 100644 --- a/lib/src/screens/wallet_keys/wallet_keys_page.dart +++ b/lib/src/screens/wallet_keys/wallet_keys_page.dart @@ -6,7 +6,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/widgets/standart_list_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_row.dart'; import 'package:cake_wallet/view_model/wallet_keys_view_model.dart'; class WalletKeysPage extends BasePage { @@ -71,7 +71,7 @@ class WalletKeysPage extends BasePage { Clipboard.setData(ClipboardData(text: item.value)); showBar(context, S.of(context).copied_key_to_clipboard(item.title)); }, - child: StandartListRow( + child: AnotherStandardListRow( title: item.title + ':', value: item.value, ), diff --git a/lib/src/widgets/standard_checkbox.dart b/lib/src/widgets/standard_checkbox.dart index d7b947a7e..d2cd6463d 100644 --- a/lib/src/widgets/standard_checkbox.dart +++ b/lib/src/widgets/standard_checkbox.dart @@ -3,13 +3,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class StandardCheckbox extends StatelessWidget { - StandardCheckbox({ - required this.value, - this.caption = '', - this.gradientBackground = false, - this.borderColor, - this.iconColor, - required this.onChanged}); + StandardCheckbox( + {required this.value, + this.caption = '', + this.gradientBackground = false, + this.borderColor, + this.iconColor, + required this.onChanged}); final bool value; final String caption; @@ -18,34 +18,23 @@ class StandardCheckbox extends StatelessWidget { final Color? iconColor; final Function(bool) onChanged; - - @override Widget build(BuildContext context) { - final baseGradient = LinearGradient(colors: [ Theme.of(context).primaryTextTheme.subtitle1!.color!, Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!, ], begin: Alignment.centerLeft, end: Alignment.centerRight); final boxBorder = Border.all( - color: borderColor ?? Theme.of(context) - .primaryTextTheme - .caption! - .color!, - width: 1.0); - + color: borderColor ?? Theme.of(context).primaryTextTheme.caption!.color!, width: 1.0); final checkedBoxDecoration = BoxDecoration( gradient: gradientBackground ? baseGradient : null, border: gradientBackground ? null : boxBorder, - borderRadius: BorderRadius.all( - Radius.circular(8.0))); + borderRadius: BorderRadius.all(Radius.circular(8.0))); - final uncheckedBoxDecoration = BoxDecoration( - border: boxBorder, - borderRadius: BorderRadius.all( - Radius.circular(8.0))); + final uncheckedBoxDecoration = + BoxDecoration(border: boxBorder, borderRadius: BorderRadius.all(Radius.circular(8.0))); return GestureDetector( onTap: () => onChanged(!value), @@ -58,27 +47,23 @@ class StandardCheckbox extends StatelessWidget { width: 24.0, decoration: value ? checkedBoxDecoration : uncheckedBoxDecoration, child: value - ? Icon( - Icons.check, - color: iconColor ?? Colors.blue, - size: 20.0, - ) - : Offstage(), + ? Icon( + Icons.check, + color: iconColor ?? Colors.blue, + size: 20.0, + ) + : Offstage(), ), - if (caption.isNotEmpty) Padding( - padding: EdgeInsets.only(left: 10), - child: Text( - caption, - style: TextStyle( - fontSize: 16.0, - color: Theme.of(context) - .primaryTextTheme! - .headline6! - .color!), - ) - ) + if (caption.isNotEmpty) + Padding( + padding: EdgeInsets.only(left: 10), + child: Text( + caption, + style: TextStyle( + fontSize: 16.0, color: Theme.of(context).primaryTextTheme!.headline6!.color!), + )) ], ), ); } -} \ No newline at end of file +} diff --git a/lib/src/widgets/standard_list.dart b/lib/src/widgets/standard_list.dart index f5abdd900..680cf6edd 100644 --- a/lib/src/widgets/standard_list.dart +++ b/lib/src/widgets/standard_list.dart @@ -1,6 +1,6 @@ import 'package:cake_wallet/palette.dart'; -import 'package:cake_wallet/src/widgets/standart_list_card.dart'; -import 'package:cake_wallet/src/widgets/standart_list_status_row.dart'; +import 'package:cake_wallet/src/widgets/standard_list_card.dart'; +import 'package:cake_wallet/src/widgets/standard_list_status_row.dart'; import 'package:flutter/material.dart'; class StandardListRow extends StatelessWidget { @@ -217,7 +217,7 @@ class SectionStandardList extends StatelessWidget { return Container(); } - if (row is StandartListStatusRow || row is TradeDatailsStandartListCard) { + if (row is StandardListStatusRow || row is TradeDetailsStandardListCard) { return Container(); } diff --git a/lib/src/widgets/standart_list_card.dart b/lib/src/widgets/standard_list_card.dart similarity index 96% rename from lib/src/widgets/standart_list_card.dart rename to lib/src/widgets/standard_list_card.dart index 569a4e51f..7b2ecc2ce 100644 --- a/lib/src/widgets/standart_list_card.dart +++ b/lib/src/widgets/standard_list_card.dart @@ -2,8 +2,8 @@ import 'package:cake_wallet/palette.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/themes/theme_base.dart'; -class TradeDatailsStandartListCard extends StatelessWidget { - TradeDatailsStandartListCard( +class TradeDetailsStandardListCard extends StatelessWidget { + TradeDetailsStandardListCard( {required this.id, required this.create, required this.pair, diff --git a/lib/src/widgets/standart_list_row.dart b/lib/src/widgets/standard_list_row.dart similarity index 96% rename from lib/src/widgets/standart_list_row.dart rename to lib/src/widgets/standard_list_row.dart index 94a4c4c76..e174acc50 100644 --- a/lib/src/widgets/standart_list_row.dart +++ b/lib/src/widgets/standard_list_row.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class StandartListRow extends StatelessWidget { - StandartListRow( +class AnotherStandardListRow extends StatelessWidget { + AnotherStandardListRow( {required this.title, required this.value, this.titleFontSize = 14, diff --git a/lib/src/widgets/standart_list_status_row.dart b/lib/src/widgets/standard_list_status_row.dart similarity index 95% rename from lib/src/widgets/standart_list_status_row.dart rename to lib/src/widgets/standard_list_status_row.dart index d97c4f688..f958e83ae 100644 --- a/lib/src/widgets/standart_list_status_row.dart +++ b/lib/src/widgets/standard_list_status_row.dart @@ -3,8 +3,8 @@ import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator_icon.da import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class StandartListStatusRow extends StatelessWidget { - StandartListStatusRow({required this.title, required this.value}); +class StandardListStatusRow extends StatelessWidget { + StandardListStatusRow({required this.title, required this.value}); final String title; final String value; diff --git a/lib/src/widgets/standart_switch.dart b/lib/src/widgets/standard_switch.dart similarity index 81% rename from lib/src/widgets/standart_switch.dart rename to lib/src/widgets/standard_switch.dart index 3018fb5b4..929286058 100644 --- a/lib/src/widgets/standart_switch.dart +++ b/lib/src/widgets/standard_switch.dart @@ -1,17 +1,17 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class StandartSwitch extends StatefulWidget { - const StandartSwitch({required this.value, required this.onTaped}); +class StandardSwitch extends StatefulWidget { + const StandardSwitch({required this.value, required this.onTaped}); final bool value; final VoidCallback onTaped; @override - StandartSwitchState createState() => StandartSwitchState(); + StandardSwitchState createState() => StandardSwitchState(); } -class StandartSwitchState extends State { +class StandardSwitchState extends State { @override Widget build(BuildContext context) { return GestureDetector( From 826ae46b072cde306e6f1f88287cc98c8a5e09a2 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 12 Dec 2022 18:01:42 +0200 Subject: [PATCH 040/100] - Fix not filling fiat amount - Fix conflicts with master --- lib/src/screens/send/send_page.dart | 3 +-- lib/src/screens/send/widgets/send_card.dart | 14 ++++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index c3f5f24c4..2cd849f34 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -29,12 +29,11 @@ class SendPage extends BasePage { SendPage({ required this.sendViewModel, this.initialPaymentRequest, - }) : _formKey = GlobalKey(),fiatFromSettings = settingsViewModel.fiatCurrency; + }) : _formKey = GlobalKey(); final SendViewModel sendViewModel; final GlobalKey _formKey; final controller = PageController(initialPage: 0); - final FiatCurrency fiatFromSettings; final PaymentRequest? initialPaymentRequest; bool _effectsInstalled = false; diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 41045b451..3be56d409 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -43,8 +43,8 @@ class SendCardState extends State required this.output, required this.sendViewModel, this.initialPaymentRequest}) - : addressController = TextEditingController(text: initialPaymentRequest?.address.toLowerCase()), - cryptoAmountController = TextEditingController(text: initialPaymentRequest?.amount), + : addressController = TextEditingController(), + cryptoAmountController = TextEditingController(), fiatAmountController = TextEditingController(), noteController = TextEditingController(), extractedAddressController = TextEditingController(), @@ -545,8 +545,7 @@ class SendCardState extends State if (output.address.isNotEmpty) { addressController.text = output.address; } - if (output.cryptoAmount.isNotEmpty || - sendViewModel.walletCurrencyName != initialPaymentRequest?.scheme.toLowerCase()) { + if (output.cryptoAmount.isNotEmpty) { cryptoAmountController.text = output.cryptoAmount; } fiatAmountController.text = output.fiatAmount; @@ -640,6 +639,13 @@ class SendCardState extends State extractedAddressController.text = extractedAddress; }); + if (initialPaymentRequest != null && + sendViewModel.walletCurrencyName != initialPaymentRequest!.scheme.toLowerCase()) { + addressController.text = initialPaymentRequest!.address; + cryptoAmountController.text = initialPaymentRequest!.amount; + noteController.text = initialPaymentRequest!.note; + } + _effectsInstalled = true; } From b5ba26adcdc953e1b078799feaa7e7c9ba0df5b3 Mon Sep 17 00:00:00 2001 From: Justin Ehrenhofer Date: Mon, 12 Dec 2022 10:07:37 -0600 Subject: [PATCH 041/100] [CW-276] Privacy settings icon, name, and position --- assets/images/2.0x/privacy_menu.png | Bin 0 -> 1324 bytes assets/images/3.0x/privacy_menu.png | Bin 0 -> 1954 bytes assets/images/privacy_menu.png | Bin 0 -> 548 bytes lib/src/screens/dashboard/wallet_menu.dart | 14 +++++++------- 4 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 assets/images/2.0x/privacy_menu.png create mode 100644 assets/images/3.0x/privacy_menu.png create mode 100644 assets/images/privacy_menu.png diff --git a/assets/images/2.0x/privacy_menu.png b/assets/images/2.0x/privacy_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..488fad1cca5a7d5e970e681895733e9bc69af5b9 GIT binary patch literal 1324 zcmV+{1=IS8P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vG`z5oC+z5%H4ViEuV1i?u}K~z{r&6s(N zO=lQ~ueB=FQmyt6(WXL*wDE_Q(nX|-G(xnPTB3?3ni8RvXoDsyLew7oVc({jNKk2~ zr6rW2b|toqtr2SNLKn2pbMCq0+?jjFjB(}uk|*!E-#Op+z32Vj?>*m4xmXIlKW24b z%hv7g%d@{@%dEl?>Ik*q0PM3tG1;$}(a;?}gr7mDdw~&Kh|{g1BG+Y7L4+8rHpX4` z3Jk^x-#n#w))#R(b+8Q>*;}v|CczK%KY=Z^q7J=;@omkQZVb5J_Toez9nm2jdlOtr zH-Zr~_f{~@MQn)`b!ax`U6=~P80e<$ihC|k>-ewOX6~6kN#dC%n75$|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Zkqd=W6MyYcN!fU$lVcJo@&c__;pNP;!%}obW*S#+j zlr^kd&U2Wv>Au#RI)0#%DBCc~>w+#`|34G+sM{`nE(^5PjJoz;D=dpJ!mg!G$t)=# z81^xRO`9V0&(FlC*;#VznGvc;Z7R;>!SL#?A5tCnu{PB8OxLIo4ATIkls7-p_wcN{ z#Re8Z-!>X~$=c`;)`$ii1dUXl%k*n!B^a58DO2~xYLp0u)fGQM7kUefGFxc02(D7Q~YkVc)r@a|grhPB38>{_2aui>F#FiKaN5_H9K-Eo&dlQyhLqRAW9Px#1ZP1_K>z@;j|==^1poj532;bRa{vG`z5oC+z5%H4ViEuV0l7&;K~y+Tt&~eB zL}37hXRxu-EF=mWks>RF#7at18Vf727&fFlBWgCXAmx#ek%?wup-hB?vQsE!C6r8A z$YV#0$9JylX1v9zuk*j|`5*WG*KRXa=k^z3&Cm<~=fRawX4DXUyHG(f1p=@}_$m~E zu`2~t!-^`VhM>yy5D^xD7K#b52@B8#wg}jQdXn?;9`G}G68}mLD1~w8RD;ea3cmxb zqQNZd)lU(4jfaTw>DVF!LEoAtpHPrqt?{-f>)>@ZKDdAp7^eReSAQO+?@e!c6g0V3 z<<%Kk;(>c?1|C3%o(cy9c%hc^JVZhgRT_r;b(rhQ7tD&-o0WbIN=ORd}`Lnbg m>ksf3{cF&#eqbNVW_to~MWELdBsJs!0000 Navigator.of(context).pushNamed(Routes.addressBook), ), + WalletMenuItem( + title: S.current.privacy_settings, + image: + Image.asset('assets/images/privacy_menu.png', height: 16, width: 16), + handler: () { + Navigator.of(context).pushNamed(Routes.privacyPage); + }), WalletMenuItem( title: S.current.display_settings, image: Image.asset('assets/images/eye_menu.png', From 6c9f9a4d19025c432643610e6da3d9ce424ebc87 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Mon, 12 Dec 2022 19:30:48 +0100 Subject: [PATCH 042/100] [skip ci] fix issue with nullable field in Node adapter --- cw_core/lib/node.dart | 2 +- cw_haven/lib/haven_wallet.dart | 2 +- cw_monero/lib/monero_wallet.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index ff1d6b051..325650224 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -54,7 +54,7 @@ class Node extends HiveObject with Keyable { bool? useSSL; @HiveField(5) - bool trusted; + bool? trusted; bool get isSSL => useSSL ?? false; diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index a4b949d8f..237722cbc 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -122,7 +122,7 @@ abstract class HavenWalletBase extends WalletBase Date: Mon, 12 Dec 2022 12:51:28 -0600 Subject: [PATCH 043/100] Move address book above security settings in menu --- lib/src/screens/dashboard/wallet_menu.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/screens/dashboard/wallet_menu.dart b/lib/src/screens/dashboard/wallet_menu.dart index 76f87c485..1638c0bc4 100644 --- a/lib/src/screens/dashboard/wallet_menu.dart +++ b/lib/src/screens/dashboard/wallet_menu.dart @@ -21,6 +21,12 @@ class WalletMenu { height: 16, width: 16), handler: () => Navigator.of(context).pushNamed(Routes.walletList), ), + WalletMenuItem( + title: S.current.address_book_menu, + image: Image.asset('assets/images/open_book_menu.png', + height: 16, width: 16), + handler: () => Navigator.of(context).pushNamed(Routes.addressBook), + ), WalletMenuItem( title: S.current.security_and_backup, image: @@ -28,12 +34,6 @@ class WalletMenu { handler: () { Navigator.of(context).pushNamed(Routes.securityBackupPage); }), - WalletMenuItem( - title: S.current.address_book_menu, - image: Image.asset('assets/images/open_book_menu.png', - height: 16, width: 16), - handler: () => Navigator.of(context).pushNamed(Routes.addressBook), - ), WalletMenuItem( title: S.current.privacy_settings, image: From 9ce6c6e01a279e3d1afb4a6f8eea6bdea1220c79 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Mon, 12 Dec 2022 20:34:45 +0100 Subject: [PATCH 044/100] set default value to nullable field --- cw_core/lib/node.dart | 4 ++-- cw_haven/lib/haven_wallet.dart | 2 +- cw_monero/lib/monero_wallet.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index 325650224..1322c5b78 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -53,8 +53,8 @@ class Node extends HiveObject with Keyable { @HiveField(4) bool? useSSL; - @HiveField(5) - bool? trusted; + @HiveField(5, defaultValue: false) + bool trusted; bool get isSSL => useSSL ?? false; diff --git a/cw_haven/lib/haven_wallet.dart b/cw_haven/lib/haven_wallet.dart index 237722cbc..a4b949d8f 100644 --- a/cw_haven/lib/haven_wallet.dart +++ b/cw_haven/lib/haven_wallet.dart @@ -122,7 +122,7 @@ abstract class HavenWalletBase extends WalletBase Date: Mon, 12 Dec 2022 22:16:46 +0200 Subject: [PATCH 045/100] Fix fill data condition --- lib/src/screens/send/widgets/send_card.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 3be56d409..082067d95 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -640,7 +640,7 @@ class SendCardState extends State }); if (initialPaymentRequest != null && - sendViewModel.walletCurrencyName != initialPaymentRequest!.scheme.toLowerCase()) { + sendViewModel.walletCurrencyName == initialPaymentRequest!.scheme.toLowerCase()) { addressController.text = initialPaymentRequest!.address; cryptoAmountController.text = initialPaymentRequest!.amount; noteController.text = initialPaymentRequest!.note; From f15bc2821960d6d780d11dec793aa115abda90ed Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Tue, 13 Dec 2022 16:19:31 +0100 Subject: [PATCH 046/100] [skip ci] fix issues from code review --- lib/core/auth_service.dart | 9 ++- lib/di.dart | 10 ++- lib/main.dart | 3 + .../settings/security_backup_page.dart | 62 +++++++++---------- lib/store/settings_store.dart | 9 +-- .../wallet_list/wallet_list_view_model.dart | 32 ++++++---- 6 files changed, 73 insertions(+), 52 deletions(-) diff --git a/lib/core/auth_service.dart b/lib/core/auth_service.dart index 569db5700..54f89437a 100644 --- a/lib/core/auth_service.dart +++ b/lib/core/auth_service.dart @@ -8,10 +8,15 @@ import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/store/settings_store.dart'; class AuthService with Store { - AuthService({required this.secureStorage, required this.sharedPreferences}); + AuthService({ + required this.secureStorage, + required this.sharedPreferences, + required this.settingsStore, + }); final FlutterSecureStorage secureStorage; final SharedPreferences sharedPreferences; + final SettingsStore settingsStore; Future setPassword(String password) async { final key = generateStoreKeyFor(key: SecretStoreKey.pinCodePassword); @@ -49,7 +54,7 @@ class AuthService with Store { bool requireAuth() { final timestamp = sharedPreferences.getInt(PreferencesKey.lastAuthTimeMilliseconds); final duration = _durationToRequireAuth(timestamp ?? 0); - final requiredPinInterval = getIt.get().pinTimeOutDuration; + final requiredPinInterval = settingsStore.pinTimeOutDuration; return duration >= requiredPinInterval.value; } diff --git a/lib/di.dart b/lib/di.dart index b506700f3..aa6514f0e 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -308,7 +308,10 @@ Future setup( getIt.registerFactory(() => AuthService( secureStorage: getIt.get(), - sharedPreferences: getIt.get())); + sharedPreferences: getIt.get(), + settingsStore: getIt.get(), + ), + ); getIt.registerFactory(() => AuthViewModel( getIt.get(), @@ -393,7 +396,10 @@ Future setup( getIt.registerFactory(() => WalletListViewModel( _walletInfoSource, getIt.get(), - getIt.get())); + getIt.get(), + getIt.get(), + ), + ); getIt.registerFactory(() => WalletListPage(walletListViewModel: getIt.get())); diff --git a/lib/main.dart b/lib/main.dart index 11eee146b..ccabf84fe 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/entities/language_service.dart'; import 'package:cake_wallet/buy/order.dart'; import 'package:cake_wallet/ionia/ionia_category.dart'; @@ -257,6 +258,7 @@ class AppState extends State with SingleTickerProviderStateMixin { Widget build(BuildContext context) { return Observer(builder: (BuildContext context) { final appStore = getIt.get(); + final authService = getIt.get(); final settingsStore = appStore.settingsStore; final statusBarColor = Colors.transparent; final authenticationStore = getIt.get(); @@ -281,6 +283,7 @@ class AppState extends State with SingleTickerProviderStateMixin { appStore: appStore, authenticationStore: authenticationStore, navigatorKey: navigatorKey, + authService: authService, child: MaterialApp( navigatorKey: navigatorKey, debugShowCheckedModeBanner: false, diff --git a/lib/src/screens/settings/security_backup_page.dart b/lib/src/screens/settings/security_backup_page.dart index 7040816d9..102a94b36 100644 --- a/lib/src/screens/settings/security_backup_page.dart +++ b/lib/src/screens/settings/security_backup_page.dart @@ -62,40 +62,38 @@ class SecurityBackupPage extends BasePage { })), StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)), Observer(builder: (_) { - return Column( - children: [ - SettingsSwitcherCell( - title: S.current.settings_allow_biometrical_authentication, - value: _securitySettingsViewModel.allowBiometricalAuthentication, - onValueChange: (BuildContext context, bool value) { - if (value) { - Navigator.of(context).pushNamed(Routes.auth, - arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { - if (isAuthenticatedSuccessfully) { - if (await _securitySettingsViewModel.biometricAuthenticated()) { - _securitySettingsViewModel - .setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); - } - } else { - _securitySettingsViewModel - .setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); - } - - auth.close(); - }); + return SettingsSwitcherCell( + title: S.current.settings_allow_biometrical_authentication, + value: _securitySettingsViewModel.allowBiometricalAuthentication, + onValueChange: (BuildContext context, bool value) { + if (value) { + Navigator.of(context).pushNamed(Routes.auth, + arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async { + if (isAuthenticatedSuccessfully) { + if (await _securitySettingsViewModel.biometricAuthenticated()) { + _securitySettingsViewModel + .setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); + } } else { - _securitySettingsViewModel.setAllowBiometricalAuthentication(value); + _securitySettingsViewModel + .setAllowBiometricalAuthentication(isAuthenticatedSuccessfully); } - }), - SettingsPickerCell( - title: S.current.require_pin_after, - items: PinCodeRequiredDuration.values, - selectedItem: _securitySettingsViewModel.pinCodeRequiredDuration, - onItemSelected: (PinCodeRequiredDuration code) { - _securitySettingsViewModel.setPinCodeRequiredDuration(code); - }, - ), - ], + + auth.close(); + }); + } else { + _securitySettingsViewModel.setAllowBiometricalAuthentication(value); + } + }); + }), + Observer(builder: (_) { + return SettingsPickerCell( + title: S.current.require_pin_after, + items: PinCodeRequiredDuration.values, + selectedItem: _securitySettingsViewModel.pinCodeRequiredDuration, + onItemSelected: (PinCodeRequiredDuration code) { + _securitySettingsViewModel.setPinCodeRequiredDuration(code); + }, ); }), ]), diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 18379c466..b10e0d08d 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -18,7 +18,6 @@ import 'package:cw_core/node.dart'; import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/entities/action_list_display_mode.dart'; import 'package:cake_wallet/entities/fiat_api_mode.dart'; -import 'package:cake_wallet/.secrets.g.dart' as secrets; part 'settings_store.g.dart'; @@ -169,7 +168,7 @@ abstract class SettingsStoreBase with Store { static const defaultPinLength = 4; static const defaultActionsMode = 11; - static const defaultPinCodeTimeOutDuration = 10; + static const defaultPinCodeTimeOutDuration = PinCodeRequiredDuration.tenminutes; @observable FiatCurrency fiatCurrency; @@ -299,8 +298,10 @@ abstract class SettingsStoreBase with Store { sharedPreferences.getInt(PreferencesKey.displayActionListModeKey) ?? defaultActionsMode)); var pinLength = sharedPreferences.getInt(PreferencesKey.currentPinLength); - final pinCodeTimeOutDuration = PinCodeRequiredDuration.deserialize(raw: sharedPreferences.getInt(PreferencesKey.pinTimeOutDuration) - ?? defaultPinCodeTimeOutDuration); + final timeOutDuration = sharedPreferences.getInt(PreferencesKey.pinTimeOutDuration); + final pinCodeTimeOutDuration = timeOutDuration != null + ? PinCodeRequiredDuration.deserialize(raw: timeOutDuration) + : defaultPinCodeTimeOutDuration; // If no value if (pinLength == null || pinLength == 0) { diff --git a/lib/view_model/wallet_list/wallet_list_view_model.dart b/lib/view_model/wallet_list/wallet_list_view_model.dart index 50908f24e..6d63675ba 100644 --- a/lib/view_model/wallet_list/wallet_list_view_model.dart +++ b/lib/view_model/wallet_list/wallet_list_view_model.dart @@ -15,9 +15,12 @@ part 'wallet_list_view_model.g.dart'; class WalletListViewModel = WalletListViewModelBase with _$WalletListViewModel; abstract class WalletListViewModelBase with Store { - WalletListViewModelBase(this._walletInfoSource, this._appStore, - this._walletLoadingService) - : wallets = ObservableList() { + WalletListViewModelBase( + this._walletInfoSource, + this._appStore, + this._walletLoadingService, + this._authService, + ) : wallets = ObservableList() { _updateList(); } @@ -27,6 +30,7 @@ abstract class WalletListViewModelBase with Store { final AppStore _appStore; final Box _walletInfoSource; final WalletLoadingService _walletLoadingService; + final AuthService _authService; WalletType get currentWalletType => _appStore.wallet!.type; @@ -47,16 +51,20 @@ abstract class WalletListViewModelBase with Store { void _updateList() { wallets.clear(); - wallets.addAll(_walletInfoSource.values.map((info) => WalletListItem( - name: info.name, - type: info.type, - key: info.key, - isCurrent: info.name == _appStore.wallet!.name && - info.type == _appStore.wallet!.type, - isEnabled: availableWalletTypes.contains(info.type)))); + wallets.addAll( + _walletInfoSource.values.map( + (info) => WalletListItem( + name: info.name, + type: info.type, + key: info.key, + isCurrent: info.name == _appStore.wallet!.name && info.type == _appStore.wallet!.type, + isEnabled: availableWalletTypes.contains(info.type), + ), + ), + ); } - bool checkIfAuthRequired(){ - return getIt.get().requireAuth(); + bool checkIfAuthRequired() { + return _authService.requireAuth(); } } From dbf214ee1bd7fc32f744eee24f142d5eb1598ea6 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Tue, 13 Dec 2022 18:26:25 +0100 Subject: [PATCH 047/100] [skip ci] fix issues from code review --- lib/ionia/ionia_gift_card.dart | 2 +- .../ionia/cards/ionia_more_options_page.dart | 13 ++++++------- .../ionia/ionia_custom_redeem_view_model.dart | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/ionia/ionia_gift_card.dart b/lib/ionia/ionia_gift_card.dart index 04b45b907..2ba0fd136 100644 --- a/lib/ionia/ionia_gift_card.dart +++ b/lib/ionia/ionia_gift_card.dart @@ -37,7 +37,7 @@ class IoniaGiftCard { purchaseAmount: element['PurchaseAmount'] as double, actualAmount: element['ActualAmount'] as double, totalTransactionAmount: element['TotalTransactionAmount'] as double, - totalDashTransactionAmount: element['TotalDashTransactionAmount'] != null ? element['TotalDashTransactionAmount'] as double : 0.0, + totalDashTransactionAmount: (element['TotalDashTransactionAmount'] as double?) ?? 0.0, remainingAmount: element['RemainingAmount'] as double, isActive: element['IsActive'] as bool, isEmpty: element['IsEmpty'] as bool, diff --git a/lib/src/screens/ionia/cards/ionia_more_options_page.dart b/lib/src/screens/ionia/cards/ionia_more_options_page.dart index facdfaf32..7d38c5e1e 100644 --- a/lib/src/screens/ionia/cards/ionia_more_options_page.dart +++ b/lib/src/screens/ionia/cards/ionia_more_options_page.dart @@ -31,15 +31,14 @@ class IoniaMoreOptionsPage extends BasePage { height: 10, ), Center( - child: Text( - S.of(context).choose_from_available_options, - style: textMedium( - color: Theme.of(context).primaryTextTheme.headline6!.color!, + child: Text( + S.of(context).choose_from_available_options, + style: textMedium( + color: Theme.of(context).primaryTextTheme.headline6!.color!, + ), ), - )), - SizedBox( - height: 40, ), + SizedBox(height: 40), InkWell( onTap: () async { final amount = await Navigator.of(context) diff --git a/lib/view_model/ionia/ionia_custom_redeem_view_model.dart b/lib/view_model/ionia/ionia_custom_redeem_view_model.dart index 6471c7378..5776443ee 100644 --- a/lib/view_model/ionia/ionia_custom_redeem_view_model.dart +++ b/lib/view_model/ionia/ionia_custom_redeem_view_model.dart @@ -35,7 +35,7 @@ abstract class IoniaCustomRedeemViewModelBase with Store { @action void updateAmount(String text) { - amount = text.isEmpty ? 0 : (double.parse(text.replaceAll(',', '.'))); + amount = double.tryParse(text.replaceAll(',', '.')) ?? 0; } @action From 8a126831374c4fa65de4c7e874968d6eb1095051 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 14 Dec 2022 17:19:45 +0200 Subject: [PATCH 048/100] - Update version to 4.5.3 for cakewallet; 1.2.2 for monero.com - Fix android script to injecting app details --- scripts/android/app_env.sh | 8 ++++---- scripts/android/inject_app_details.sh | 4 ++-- scripts/ios/app_env.sh | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index d361c8dfa..5b704eea1 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,14 +14,14 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.1" -MONERO_COM_BUILD_NUMBER=32 +MONERO_COM_VERSION="1.2.2" +MONERO_COM_BUILD_NUMBER=33 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.1" -CAKEWALLET_BUILD_NUMBER=136 +CAKEWALLET_VERSION="4.5.3" +CAKEWALLET_BUILD_NUMBER=138 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" diff --git a/scripts/android/inject_app_details.sh b/scripts/android/inject_app_details.sh index 6bcdf7239..c700a8c40 100755 --- a/scripts/android/inject_app_details.sh +++ b/scripts/android/inject_app_details.sh @@ -6,6 +6,6 @@ if [ -z "$APP_ANDROID_TYPE" ]; then fi cd ../.. -sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml -sed -i "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml +sed -i '' "1,/version:.*/s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/" ./pubspec.yaml +sed -i '' "1,/__APP_PACKAGE__/s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/" ./android/app/src/main/AndroidManifest.xml cd scripts/android \ No newline at end of file diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index 8bb945680..fbf8233e5 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.1" -MONERO_COM_BUILD_NUMBER=29 +MONERO_COM_VERSION="1.2.2" +MONERO_COM_BUILD_NUMBER=30 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.1" -CAKEWALLET_BUILD_NUMBER=133 +CAKEWALLET_VERSION="4.5.3" +CAKEWALLET_BUILD_NUMBER=135 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From de37b25f9265d52187b43d60f0a8704c22e7be25 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 14 Dec 2022 19:19:57 +0200 Subject: [PATCH 049/100] Revert script changes in injecting app details [skip ci] --- scripts/android/inject_app_details.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/android/inject_app_details.sh b/scripts/android/inject_app_details.sh index c700a8c40..15c39bca7 100755 --- a/scripts/android/inject_app_details.sh +++ b/scripts/android/inject_app_details.sh @@ -6,6 +6,6 @@ if [ -z "$APP_ANDROID_TYPE" ]; then fi cd ../.. -sed -i '' "1,/version:.*/s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/" ./pubspec.yaml -sed -i '' "1,/__APP_PACKAGE__/s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/" ./android/app/src/main/AndroidManifest.xml +sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml +sed -i "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml cd scripts/android \ No newline at end of file From b4aff6746739f71464f9d2985f4a9b1e54e5e5f4 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Wed, 14 Dec 2022 19:21:51 +0200 Subject: [PATCH 050/100] Revert script changes in injecting app details [skip ci] --- scripts/android/inject_app_details.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/android/inject_app_details.sh b/scripts/android/inject_app_details.sh index 15c39bca7..8551dc7d0 100755 --- a/scripts/android/inject_app_details.sh +++ b/scripts/android/inject_app_details.sh @@ -6,6 +6,6 @@ if [ -z "$APP_ANDROID_TYPE" ]; then fi cd ../.. -sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml +sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml sed -i "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml -cd scripts/android \ No newline at end of file +cd scripts/android From 853e9264acd84be98aa66508c9f0d65f4017b6d0 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Wed, 14 Dec 2022 19:22:58 +0200 Subject: [PATCH 051/100] Revert changes in injecting app details [skip ci] From 8e01b2d67a56eac8e4378ece3a9c6d72e3e178fd Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 14 Dec 2022 19:27:44 +0200 Subject: [PATCH 052/100] Revert script changes in injecting app details [skip ci] --- scripts/android/inject_app_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/android/inject_app_details.sh b/scripts/android/inject_app_details.sh index 8551dc7d0..6bcdf7239 100755 --- a/scripts/android/inject_app_details.sh +++ b/scripts/android/inject_app_details.sh @@ -8,4 +8,4 @@ fi cd ../.. sed -i "0,/version:/{s/version:.*/version: ${APP_ANDROID_VERSION}+${APP_ANDROID_BUILD_NUMBER}/}" ./pubspec.yaml sed -i "0,/version:/{s/__APP_PACKAGE__/${APP_ANDROID_PACKAGE}/}" ./android/app/src/main/AndroidManifest.xml -cd scripts/android +cd scripts/android \ No newline at end of file From 987df055a084e183ab5b7af78e69fbd331272807 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 00:42:04 +0200 Subject: [PATCH 053/100] Return default values for transaction priority instead of throwing an exception --- cw_bitcoin/lib/bitcoin_transaction_priority.dart | 4 ++-- cw_core/lib/monero_transaction_priority.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cw_bitcoin/lib/bitcoin_transaction_priority.dart b/cw_bitcoin/lib/bitcoin_transaction_priority.dart index d82ea429e..6f7164ec3 100644 --- a/cw_bitcoin/lib/bitcoin_transaction_priority.dart +++ b/cw_bitcoin/lib/bitcoin_transaction_priority.dart @@ -22,7 +22,7 @@ class BitcoinTransactionPriority extends TransactionPriority { case 2: return fast; default: - throw Exception('Unexpected token: $raw for BitcoinTransactionPriority deserialize'); + return medium; } } @@ -73,7 +73,7 @@ class LitecoinTransactionPriority extends BitcoinTransactionPriority { case 2: return fast; default: - throw Exception('Unexpected token: $raw for LitecoinTransactionPriority deserialize'); + return medium; } } diff --git a/cw_core/lib/monero_transaction_priority.dart b/cw_core/lib/monero_transaction_priority.dart index cca887398..5219014c5 100644 --- a/cw_core/lib/monero_transaction_priority.dart +++ b/cw_core/lib/monero_transaction_priority.dart @@ -50,7 +50,7 @@ class MoneroTransactionPriority extends TransactionPriority { case 4: return fastest; default: - throw Exception('Unexpected token: $raw for MoneroTransactionPriority deserialize'); + return automatic; } } From 710de57847d617b6c4b3d508f61d32809100b81e Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 02:00:59 +0200 Subject: [PATCH 054/100] Validate bitcoin's saved transaction priority --- .../lib/bitcoin_transaction_priority.dart | 6 ++++-- cw_core/lib/monero_transaction_priority.dart | 18 +----------------- lib/entities/default_settings_migration.dart | 14 ++++++++++++++ lib/main.dart | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cw_bitcoin/lib/bitcoin_transaction_priority.dart b/cw_bitcoin/lib/bitcoin_transaction_priority.dart index 6f7164ec3..0573624ea 100644 --- a/cw_bitcoin/lib/bitcoin_transaction_priority.dart +++ b/cw_bitcoin/lib/bitcoin_transaction_priority.dart @@ -13,6 +13,8 @@ class BitcoinTransactionPriority extends TransactionPriority { static const BitcoinTransactionPriority fast = BitcoinTransactionPriority(title: 'Fast', raw: 2); + static const BitcoinTransactionPriority defaultPriority = medium; + static BitcoinTransactionPriority deserialize({required int raw}) { switch (raw) { case 0: @@ -22,7 +24,7 @@ class BitcoinTransactionPriority extends TransactionPriority { case 2: return fast; default: - return medium; + throw Exception('Unexpected token: $raw for BitcoinTransactionPriority deserialize'); } } @@ -73,7 +75,7 @@ class LitecoinTransactionPriority extends BitcoinTransactionPriority { case 2: return fast; default: - return medium; + throw Exception('Unexpected token: $raw for LitecoinTransactionPriority deserialize'); } } diff --git a/cw_core/lib/monero_transaction_priority.dart b/cw_core/lib/monero_transaction_priority.dart index 5219014c5..f5c00ecc7 100644 --- a/cw_core/lib/monero_transaction_priority.dart +++ b/cw_core/lib/monero_transaction_priority.dart @@ -21,22 +21,6 @@ class MoneroTransactionPriority extends TransactionPriority { static const fastest = MoneroTransactionPriority(title: 'Fastest', raw: 4); static const standard = slow; - - static List forWalletType(WalletType type) { - switch (type) { - case WalletType.monero: - return MoneroTransactionPriority.all; - case WalletType.bitcoin: - return [ - MoneroTransactionPriority.slow, - MoneroTransactionPriority.automatic, - MoneroTransactionPriority.fast - ]; - default: - return []; - } - } - static MoneroTransactionPriority deserialize({required int raw}) { switch (raw) { case 0: @@ -50,7 +34,7 @@ class MoneroTransactionPriority extends TransactionPriority { case 4: return fastest; default: - return automatic; + throw Exception('Unexpected token: $raw for MoneroTransactionPriority deserialize'); } } diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 9aff05500..42b49c2ec 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -1,10 +1,12 @@ import 'dart:io' show File, Platform; import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:hive/hive.dart'; +import 'package:share_plus/share_plus.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cw_core/wallet_type.dart'; @@ -139,6 +141,10 @@ Future defaultSettingsMigration( await addOnionNode(nodes); break; + case 19: + await validateBitcoinSavedTransactionPriority(sharedPreferences); + break; + default: break; } @@ -154,6 +160,14 @@ Future defaultSettingsMigration( PreferencesKey.currentDefaultSettingsMigrationVersion, version); } +Future validateBitcoinSavedTransactionPriority(SharedPreferences sharedPreferences) async { + int? savedBitcoinPriority = sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority); + if (!BitcoinTransactionPriority.all.any((element) => element.raw == savedBitcoinPriority)) { + await sharedPreferences.setInt( + PreferencesKey.bitcoinTransactionPriority, BitcoinTransactionPriority.defaultPriority.raw); + } +} + Future addOnionNode(Box nodes) async { final onionNodeUri = "cakexmrl7bonq7ovjka5kuwuyd3f7qnkz6z6s6dmsy3uckwra7bvggyd.onion:18081"; diff --git a/lib/main.dart b/lib/main.dart index eaabb8339..19f89feb3 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -129,7 +129,7 @@ Future main() async { exchangeTemplates: exchangeTemplates, transactionDescriptions: transactionDescriptions, secureStorage: secureStorage, - initialMigrationVersion: 18); + initialMigrationVersion: 19); runApp(App()); } catch (e, stacktrace) { runApp(MaterialApp( From eb0ebbac414778aa3a67e80cf296d39469873db6 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 02:05:00 +0200 Subject: [PATCH 055/100] Validate bitcoin's saved transaction priority [skip ci] --- lib/entities/default_settings_migration.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 42b49c2ec..83012b39a 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -161,7 +161,8 @@ Future defaultSettingsMigration( } Future validateBitcoinSavedTransactionPriority(SharedPreferences sharedPreferences) async { - int? savedBitcoinPriority = sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority); + final int? savedBitcoinPriority = + sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority); if (!BitcoinTransactionPriority.all.any((element) => element.raw == savedBitcoinPriority)) { await sharedPreferences.setInt( PreferencesKey.bitcoinTransactionPriority, BitcoinTransactionPriority.defaultPriority.raw); From 586ad210b3208bdfadf0abad26039bf3c71bee73 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 02:29:30 +0200 Subject: [PATCH 056/100] use defined bitcoin instead of direct import to transaction priority --- lib/entities/default_settings_migration.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index 83012b39a..3c8d9fbbe 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -1,12 +1,10 @@ import 'dart:io' show File, Platform; import 'package:cake_wallet/bitcoin/bitcoin.dart'; -import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; import 'package:cw_core/pathForWallet.dart'; import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:hive/hive.dart'; -import 'package:share_plus/share_plus.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cw_core/wallet_type.dart'; @@ -161,11 +159,14 @@ Future defaultSettingsMigration( } Future validateBitcoinSavedTransactionPriority(SharedPreferences sharedPreferences) async { + if (bitcoin == null) { + return; + } final int? savedBitcoinPriority = sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority); - if (!BitcoinTransactionPriority.all.any((element) => element.raw == savedBitcoinPriority)) { + if (!bitcoin!.getTransactionPriorities().any((element) => element.raw == savedBitcoinPriority)) { await sharedPreferences.setInt( - PreferencesKey.bitcoinTransactionPriority, BitcoinTransactionPriority.defaultPriority.raw); + PreferencesKey.bitcoinTransactionPriority, bitcoin!.getMediumTransactionPriority().serialize()); } } From 99c1205d0d34af399e907ee893139fd7ff2feaa9 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 02:36:44 +0200 Subject: [PATCH 057/100] Remove unused variable [skip ci] --- cw_bitcoin/lib/bitcoin_transaction_priority.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/cw_bitcoin/lib/bitcoin_transaction_priority.dart b/cw_bitcoin/lib/bitcoin_transaction_priority.dart index 0573624ea..d82ea429e 100644 --- a/cw_bitcoin/lib/bitcoin_transaction_priority.dart +++ b/cw_bitcoin/lib/bitcoin_transaction_priority.dart @@ -13,8 +13,6 @@ class BitcoinTransactionPriority extends TransactionPriority { static const BitcoinTransactionPriority fast = BitcoinTransactionPriority(title: 'Fast', raw: 2); - static const BitcoinTransactionPriority defaultPriority = medium; - static BitcoinTransactionPriority deserialize({required int raw}) { switch (raw) { case 0: From f9566cf33e6fc2496644b2d6a9b247f79b4afd2d Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 14:14:54 +0200 Subject: [PATCH 058/100] Check whether it needs to request auth or not AFTER the user gets back to the app --- lib/src/screens/root/root.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 0ab1c23c1..f69a63d04 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -91,14 +91,15 @@ class RootState extends State with WidgetsBindingObserver { return; } - setState(() { - _requestAuth = widget.authService.requireAuth(); - }); - if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) { setState(() => _setInactive(true)); } + break; + case AppLifecycleState.resumed: + setState(() { + _requestAuth = widget.authService.requireAuth(); + }); break; default: break; From 4abda7bb58ae492cd30edf52cb4113f93cb014f3 Mon Sep 17 00:00:00 2001 From: Justin Ehrenhofer Date: Thu, 15 Dec 2022 09:03:04 -0600 Subject: [PATCH 059/100] Lower target confirmation to 2 --- cw_bitcoin/lib/electrum.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index afbc199a5..7449e0790 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -303,7 +303,7 @@ class ElectrumClient { Future> feeRates() async { try { final topDoubleString = await estimatefee(p: 1); - final middleDoubleString = await estimatefee(p: 20); + final middleDoubleString = await estimatefee(p: 2); final bottomDoubleString = await estimatefee(p: 100); final top = (stringDoubleToBitcoinAmount(topDoubleString.toString()) / 1000) From 4c9fd5db6549c6f586b207ae5b844225f2092835 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 18:00:56 +0200 Subject: [PATCH 060/100] Navigate to send screen even if the user does not need to authenticate --- lib/src/screens/root/root.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/screens/root/root.dart b/lib/src/screens/root/root.dart index 0ab1c23c1..052d4c71b 100644 --- a/lib/src/screens/root/root.dart +++ b/lib/src/screens/root/root.dart @@ -124,6 +124,12 @@ class RootState extends State with WidgetsBindingObserver { launchUri = null; }); }); + } else if (launchUri != null) { + widget.navigatorKey.currentState?.pushNamed( + Routes.send, + arguments: PaymentRequest.fromUri(launchUri), + ); + launchUri = null; } return WillPopScope(onWillPop: () async => false, child: widget.child); From 4be874113047fa981f1f81ae0242c062e9245555 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 18:54:12 +0200 Subject: [PATCH 061/100] Open app in a single instance only and not on top if launched from other apps --- android/app/src/main/AndroidManifestBase.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml index cf67a8c26..9f6b65785 100644 --- a/android/app/src/main/AndroidManifestBase.xml +++ b/android/app/src/main/AndroidManifestBase.xml @@ -16,7 +16,7 @@ android:requestLegacyExternalStorage="true"> Date: Thu, 15 Dec 2022 11:48:49 -0600 Subject: [PATCH 062/100] change to 5 this appears to be a more sensible value for medium --- cw_bitcoin/lib/electrum.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index 7449e0790..d856cb2bf 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -303,7 +303,7 @@ class ElectrumClient { Future> feeRates() async { try { final topDoubleString = await estimatefee(p: 1); - final middleDoubleString = await estimatefee(p: 2); + final middleDoubleString = await estimatefee(p: 5); final bottomDoubleString = await estimatefee(p: 100); final top = (stringDoubleToBitcoinAmount(topDoubleString.toString()) / 1000) From 947d1e2f7c03f02f58e8e80cdd7d5ea9d3264122 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 15 Dec 2022 22:15:03 +0200 Subject: [PATCH 063/100] Pump app versions and build numbers [skip ci] --- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 5b704eea1..556a78a87 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,14 +14,14 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.2" -MONERO_COM_BUILD_NUMBER=33 +MONERO_COM_VERSION="1.2.3" +MONERO_COM_BUILD_NUMBER=34 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.3" -CAKEWALLET_BUILD_NUMBER=138 +CAKEWALLET_VERSION="4.5.4" +CAKEWALLET_BUILD_NUMBER=139 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index fbf8233e5..f530f718a 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.2" -MONERO_COM_BUILD_NUMBER=30 +MONERO_COM_VERSION="1.2.3" +MONERO_COM_BUILD_NUMBER=31 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.3" -CAKEWALLET_BUILD_NUMBER=135 +CAKEWALLET_VERSION="4.5.4" +CAKEWALLET_BUILD_NUMBER=136 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From afd9fe75543eda80e6131bce76d5c56b90cef788 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 16 Dec 2022 14:06:08 +0200 Subject: [PATCH 064/100] add missing default priority for btc and ltc --- lib/ionia/ionia_anypay.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ionia/ionia_anypay.dart b/lib/ionia/ionia_anypay.dart index f4053094b..2aaaf4994 100644 --- a/lib/ionia/ionia_anypay.dart +++ b/lib/ionia/ionia_anypay.dart @@ -55,7 +55,9 @@ class IoniaAnyPay { address: out.address, formattedCryptoAmount: out.amount, sendAll: false)).toList(), - feeRate: instruction.requiredFeeRate); + feeRate: instruction.requiredFeeRate, + priority: bitcoin!.getBitcoinTransactionPriorityMedium(), + ); case AnyPayChain.ltc: return bitcoin!.createBitcoinTransactionCredentialsRaw( instruction.outputs.map((out) => @@ -64,7 +66,9 @@ class IoniaAnyPay { address: out.address, formattedCryptoAmount: out.amount, sendAll: false)).toList(), - feeRate: instruction.requiredFeeRate); + feeRate: instruction.requiredFeeRate, + priority: bitcoin!.getLitecoinTransactionPriorityMedium(), + ); default: throw Exception('Incorrect transaction chain: ${payment.chain.toUpperCase()}'); } From 6148b91c8a827a65fc35b9370dc6ba9888d7739b Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 16 Dec 2022 14:33:33 +0200 Subject: [PATCH 065/100] Fix Generic Type being enforced to extend Object --- .../screens/settings/widgets/settings_picker_cell.dart | 2 +- lib/src/widgets/picker.dart | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/src/screens/settings/widgets/settings_picker_cell.dart b/lib/src/screens/settings/widgets/settings_picker_cell.dart index 1da2d6fc1..8dd5c8c2c 100644 --- a/lib/src/screens/settings/widgets/settings_picker_cell.dart +++ b/lib/src/screens/settings/widgets/settings_picker_cell.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/picker.dart'; import 'package:cake_wallet/src/widgets/standard_list.dart'; -class SettingsPickerCell extends StandardListRow { +class SettingsPickerCell extends StandardListRow { SettingsPickerCell( {required String title, required this.selectedItem, diff --git a/lib/src/widgets/picker.dart b/lib/src/widgets/picker.dart index 36aafe5aa..f26ff3ee2 100644 --- a/lib/src/widgets/picker.dart +++ b/lib/src/widgets/picker.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_close_button.dart'; -class Picker extends StatefulWidget { +class Picker extends StatefulWidget { Picker({ required this.selectedAtIndex, required this.items, @@ -39,7 +39,7 @@ class Picker extends StatefulWidget { _PickerState createState() => _PickerState(items, images, onItemSelected); } -class _PickerState extends State { +class _PickerState extends State> { _PickerState(this.items, this.images, this.onItemSelected); final Function(Item) onItemSelected; @@ -59,7 +59,7 @@ class _PickerState extends State { images = []; for (int i=0;i extends State { child: Padding( padding: EdgeInsets.only(left: image != null ? 12 : 0), child: Text( - // What a hack (item as) ? - widget.displayItem?.call(item as Object) ?? item.toString(), + widget.displayItem?.call(item) ?? item.toString(), style: TextStyle( fontSize: 14, fontFamily: 'Lato', From 7ffb654065add7d4fe668cfd36a5ed0902152952 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 16 Dec 2022 19:21:40 +0200 Subject: [PATCH 066/100] Calculate fee amount from fee rate if available --- cw_bitcoin/lib/electrum_wallet.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index fad546d90..f31db7bb8 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -191,8 +191,10 @@ abstract class ElectrumWalletBase extends WalletBase Date: Sat, 17 Dec 2022 02:24:15 +0200 Subject: [PATCH 067/100] Remove fallback default priority to calculate fee, in order to know if something is wrong from anypay --- lib/ionia/ionia_anypay.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/ionia/ionia_anypay.dart b/lib/ionia/ionia_anypay.dart index 2aaaf4994..f4053094b 100644 --- a/lib/ionia/ionia_anypay.dart +++ b/lib/ionia/ionia_anypay.dart @@ -55,9 +55,7 @@ class IoniaAnyPay { address: out.address, formattedCryptoAmount: out.amount, sendAll: false)).toList(), - feeRate: instruction.requiredFeeRate, - priority: bitcoin!.getBitcoinTransactionPriorityMedium(), - ); + feeRate: instruction.requiredFeeRate); case AnyPayChain.ltc: return bitcoin!.createBitcoinTransactionCredentialsRaw( instruction.outputs.map((out) => @@ -66,9 +64,7 @@ class IoniaAnyPay { address: out.address, formattedCryptoAmount: out.amount, sendAll: false)).toList(), - feeRate: instruction.requiredFeeRate, - priority: bitcoin!.getLitecoinTransactionPriorityMedium(), - ); + feeRate: instruction.requiredFeeRate); default: throw Exception('Incorrect transaction chain: ${payment.chain.toUpperCase()}'); } From ecc556e4e339ca5d22569d458d6ba37c71f204b9 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 19 Dec 2022 19:37:58 +0200 Subject: [PATCH 068/100] Cache Generated Externals to Improve the runtime of the workflow --- .github/workflows/pr_test_build.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 190b891e1..d2320d8fb 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -34,6 +34,24 @@ jobs: ./install_ndk.sh source ./app_env.sh cakewallet ./app_config.sh + + - name: Cache Externals + id: cache-externals + uses: actions/cache@v3 + with: + path: | + /opt/android/cake_wallet/cw_haven/android/.cxx + /opt/android/cake_wallet/cw_haven/ios/External + /opt/android/cake_wallet/cw_monero/android/.cxx + /opt/android/cake_wallet/cw_haven/ios/External + /opt/android/cake_wallet/cw_shared_external/ios/External + key: externals-cache-key + + - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} + name: Generate Externals + run: | + cd cake_wallet/scripts/android/ + source ./app_env.sh cakewallet ./build_all.sh ./copy_monero_deps.sh From bb197980f49b20d456bd49f259ba6f55ba2e0476 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 19 Dec 2022 19:41:00 +0200 Subject: [PATCH 069/100] Upload to transfer.sh lastly since its taking more time recently --- .github/workflows/pr_test_build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index d2320d8fb..06dfa5b65 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -50,7 +50,7 @@ jobs: - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals run: | - cd cake_wallet/scripts/android/ + cd /opt/android/cake_wallet/scripts/android/ source ./app_env.sh cakewallet ./build_all.sh ./copy_monero_deps.sh @@ -129,19 +129,19 @@ jobs: # --token ${{ secrets.APP_CENTER_TOKEN }} \ # --quiet - - name: Send Test APK - run: | - cd /opt/android/cake_wallet - var=$(curl --upload-file build/app/outputs/apk/release/app-release.apk https://transfer.sh/$GITHUB_HEAD_REF.apk -H "Max-Days: 10") - curl ${{ secrets.SLACK_WEB_HOOK }} -H "Content-Type: application/json" -d '{"apk_link": "'"$var"'","ticket": "'"$GITHUB_HEAD_REF"'"}' - - name: Rename apk file run: | cd /opt/android/cake_wallet/build/app/outputs/apk/release mkdir test-apk - mv app-release.apk test-apk/$GITHUB_HEAD_REF.apk + cp app-release.apk test-apk/$GITHUB_HEAD_REF.apk - name: Upload Artifact uses: kittaakos/upload-artifact-as-is@v0 with: path: /opt/android/cake_wallet/build/app/outputs/apk/release/test-apk/ + + - name: Send Test APK + run: | + cd /opt/android/cake_wallet + var=$(curl --upload-file build/app/outputs/apk/release/app-release.apk https://transfer.sh/$GITHUB_HEAD_REF.apk -H "Max-Days: 10") + curl ${{ secrets.SLACK_WEB_HOOK }} -H "Content-Type: application/json" -d '{"apk_link": "'"$var"'","ticket": "'"$GITHUB_HEAD_REF"'"}' From d204669f0869f227357400f378c1cc3627ba1d33 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 19 Dec 2022 21:50:44 +0200 Subject: [PATCH 070/100] Test Caching --- .github/workflows/pr_test_build.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 06dfa5b65..67cd60aa8 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -43,10 +43,34 @@ jobs: /opt/android/cake_wallet/cw_haven/android/.cxx /opt/android/cake_wallet/cw_haven/ios/External /opt/android/cake_wallet/cw_monero/android/.cxx - /opt/android/cake_wallet/cw_haven/ios/External + /opt/android/cake_wallet/cw_monero/ios/External /opt/android/cake_wallet/cw_shared_external/ios/External key: externals-cache-key + - name: Test Cache + run: | + echo steps.cache-externals.outputs.cache-hit + cd /opt/android/cake_wallet/cw_shared_external/ios + ls + echo "==================================" + echo "==================================" + cd ../../cw_haven/ios + ls + echo "==================================" + echo "==================================" + cd ../android + ls + echo "==================================" + echo "==================================" + cd ../../cw_monero/ios + ls + echo "==================================" + echo "==================================" + cd ../android + ls + echo "==================================" + echo "==================================" + - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals run: | From 61ae5bf800508aed1e74b78fdcb7f6d9ec8f38d2 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 19 Dec 2022 23:32:20 +0200 Subject: [PATCH 071/100] Test Caching --- .github/workflows/pr_test_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 67cd60aa8..b1988b470 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -49,7 +49,7 @@ jobs: - name: Test Cache run: | - echo steps.cache-externals.outputs.cache-hit + echo ${{ steps.cache-externals.outputs.cache-hit }} cd /opt/android/cake_wallet/cw_shared_external/ios ls echo "==================================" From dfa8ad2fe97fa420e87f2fa709442adc7258c1dd Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Tue, 20 Dec 2022 14:37:13 +0200 Subject: [PATCH 072/100] Remove testing steps --- .github/workflows/pr_test_build.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index b1988b470..96ac95e49 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -47,30 +47,6 @@ jobs: /opt/android/cake_wallet/cw_shared_external/ios/External key: externals-cache-key - - name: Test Cache - run: | - echo ${{ steps.cache-externals.outputs.cache-hit }} - cd /opt/android/cake_wallet/cw_shared_external/ios - ls - echo "==================================" - echo "==================================" - cd ../../cw_haven/ios - ls - echo "==================================" - echo "==================================" - cd ../android - ls - echo "==================================" - echo "==================================" - cd ../../cw_monero/ios - ls - echo "==================================" - echo "==================================" - cd ../android - ls - echo "==================================" - echo "==================================" - - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals run: | From e005e2aed703e56e94e485f5ea771ee70734077d Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 21 Dec 2022 19:15:02 +0200 Subject: [PATCH 073/100] Add Cake Pay Web Card to marketplace --- .../screens/dashboard/widgets/market_place_page.dart | 12 +++++++++++- res/values/strings_de.arb | 4 +++- res/values/strings_en.arb | 4 +++- res/values/strings_es.arb | 4 +++- res/values/strings_fr.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 +++- 16 files changed, 56 insertions(+), 16 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/market_place_page.dart b/lib/src/screens/dashboard/widgets/market_place_page.dart index a64a132ad..9ac225634 100644 --- a/lib/src/screens/dashboard/widgets/market_place_page.dart +++ b/lib/src/screens/dashboard/widgets/market_place_page.dart @@ -6,6 +6,7 @@ import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/generated/i18n.dart'; +import 'package:url_launcher/url_launcher.dart'; class MarketPlacePage extends StatelessWidget { @@ -48,6 +49,15 @@ class MarketPlacePage extends StatelessWidget { title: S.of(context).cake_pay_title, subTitle: S.of(context).cake_pay_subtitle, ), + SizedBox(height: 20), + MarketPlaceItem( + onTap: () => launchUrl( + Uri.https("buy.cakepay.com"), + mode: LaunchMode.externalApplication, + ), + title: S.of(context).cake_pay_web_cards_title, + subTitle: S.of(context).cake_pay_web_cards_subtitle, + ), ], ), ), @@ -72,7 +82,7 @@ class MarketPlacePage extends StatelessWidget { buttonAction: () => Navigator.of(context).pop()); }); break; - default: + default: Navigator.of(context).pushNamed(Routes.ioniaWelcomePage); } } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 2b66a1b28..56b7917df 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Wallet mit diesem Namen existiert bereits", "market_place": "Marktplatz", "cake_pay_title": "Cake Pay-Geschenkkarten", - "cake_pay_subtitle": "Geschenkkarten kaufen und sofort einlösen", + "cake_pay_subtitle": "Kaufen Sie ermäßigte Geschenkkarten (nur USA)", + "cake_pay_web_cards_title": "Cake Pay-Webkarten", + "cake_pay_web_cards_subtitle": "Kaufen Sie weltweit Prepaid-Karten und Geschenkkarten", "about_cake_pay": "Mit Cake Pay können Sie ganz einfach Geschenkkarten mit virtuellen Vermögenswerten kaufen, die Sie sofort bei über 150.000 Händlern in den Vereinigten Staaten ausgeben können.", "cake_pay_account_note": "Melden Sie sich nur mit einer E-Mail-Adresse an, um Karten anzuzeigen und zu kaufen. Einige sind sogar mit Rabatt erhältlich!", "already_have_account": "Sie haben bereits ein Konto?", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 92d763cc2..5f312a132 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "A wallet with that name already exists. Please choose a different name or rename the other wallet first.", "market_place": "Marketplace", "cake_pay_title": "Cake Pay Gift Cards", - "cake_pay_subtitle": "Buy gift cards and redeem instantly", + "cake_pay_subtitle": "Buy discounted gift cards (USA only)", + "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_pay_web_cards_subtitle": "Buy worldwide prepaid cards and gift cards", "about_cake_pay": "Cake Pay allows you to easily buy gift cards with virtual assets, spendable instantly at over 150,000 merchants in the United States.", "cake_pay_account_note": "Sign up with just an email address to see and purchase cards. Some are even available at a discount!", "already_have_account": "Already have an account?", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index df23d994e..2c611a540 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Wallet con ese nombre ya ha existido", "market_place": "Mercado", "cake_pay_title": "Tarjetas de regalo Cake Pay", - "cake_pay_subtitle": "Compra tarjetas de regalo y canjéalas al instante", + "cake_pay_subtitle": "Compre tarjetas de regalo con descuento (solo EE. UU.)", + "cake_pay_web_cards_title": "Tarjetas Web Cake Pay", + "cake_pay_web_cards_subtitle": "Compre tarjetas de prepago y tarjetas de regalo en todo el mundo", "about_cake_pay": "Cake Pay le permite comprar fácilmente tarjetas de regalo con activos virtuales, gastables instantáneamente en más de 150 000 comerciantes en los Estados Unidos.", "cake_pay_account_note": "Regístrese con solo una dirección de correo electrónico para ver y comprar tarjetas. ¡Algunas incluso están disponibles con descuento!", "already_have_account": "¿Ya tienes una cuenta?", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 349bb9dfc..1c4ebf1a8 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -537,7 +537,9 @@ "wallet_name_exists": "Un portefeuille portant ce nom existe déjà", "market_place": "Place de marché", "cake_pay_title": "Cartes cadeaux Cake Pay", - "cake_pay_subtitle": "Achetez des cartes-cadeaux et échangez-les instantanément", + "cake_pay_subtitle": "Achetez des cartes-cadeaux à prix réduit (États-Unis uniquement)", + "cake_pay_web_cards_title": "Cartes Web Cake Pay", + "cake_pay_web_cards_subtitle": "Achetez des cartes prépayées et des cartes-cadeaux dans le monde entier", "about_cake_pay": "Cake Pay vous permet d'acheter facilement des cartes-cadeaux avec des actifs virtuels, utilisables instantanément chez plus de 150 000 marchands aux États-Unis.", "cake_pay_account_note": "Inscrivez-vous avec juste une adresse e-mail pour voir et acheter des cartes. Certaines sont même disponibles à prix réduit !", "already_have_account": "Vous avez déjà un compte ?", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 66d40ddc2..c5c041061 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "उस नाम वाला वॉलेट पहले से मौजूद है", "market_place": "मार्केटप्लेस", "cake_pay_title": "केक पे गिफ्ट कार्ड्स", - "cake_pay_subtitle": "उपहार कार्ड खरीदें और तुरंत रिडीम करें", + "cake_pay_subtitle": "रियायती उपहार कार्ड खरीदें (केवल यूएसए)", + "cake_pay_web_cards_title": "केक भुगतान वेब कार्ड", + "cake_pay_web_cards_subtitle": "दुनिया भर में प्रीपेड कार्ड और गिफ्ट कार्ड खरीदें", "about_cake_pay": "केक पे आपको वर्चुअल संपत्ति के साथ आसानी से उपहार कार्ड खरीदने की अनुमति देता है, जिसे संयुक्त राज्य में 150,000 से अधिक व्यापारियों पर तुरंत खर्च किया जा सकता है।", "cake_pay_account_note": "कार्ड देखने और खरीदने के लिए केवल एक ईमेल पते के साथ साइन अप करें। कुछ छूट पर भी उपलब्ध हैं!", "ready_have_account": "क्या आपके पास पहले से ही एक खाता है?", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 5eb394b01..dc9275150 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Novčanik s tim nazivom već postoji", "market_place": "Tržnica", "cake_pay_title": "Cake Pay poklon kartice", - "cake_pay_subtitle": "Kupite darovne kartice i odmah ih iskoristite", + "cake_pay_subtitle": "Kupite darovne kartice s popustom (samo SAD)", + "cake_pay_web_cards_title": "Cake Pay Web kartice", + "cake_pay_web_cards_subtitle": "Kupujte prepaid kartice i poklon kartice diljem svijeta", "about_cake_pay": "Cake Pay vam omogućuje jednostavnu kupnju darovnih kartica s virtualnim sredstvima, koja se trenutno mogu potrošiti kod više od 150 000 trgovaca u Sjedinjenim Državama.", "cake_pay_account_note": "Prijavite se samo s adresom e-pošte da biste vidjeli i kupili kartice. Neke su čak dostupne uz popust!", "already_have_account": "Već imate račun?", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 7ff01753f..e3770f760 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Il portafoglio con quel nome è già esistito", "market_place": "Mercato", "cake_pay_title": "Carte regalo Cake Pay", - "cake_pay_subtitle": "Acquista carte regalo e riscattale all'istante", + "cake_pay_subtitle": "Acquista buoni regalo scontati (solo USA)", + "cake_pay_web_cards_title": "Carte Web Cake Pay", + "cake_pay_web_cards_subtitle": "Acquista carte prepagate e carte regalo in tutto il mondo", "about_cake_pay": "Cake Pay ti consente di acquistare facilmente buoni regalo con asset virtuali, spendibili istantaneamente presso oltre 150.000 commercianti negli Stati Uniti.", "cake_pay_account_note": "Iscriviti con solo un indirizzo email per vedere e acquistare le carte. Alcune sono anche disponibili con uno sconto!", "already_have_account": "Hai già un account?", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 97ccb7160..d699b070e 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "その名前のウォレットはすでに存在しています", "market_place": "Marketplace", "cake_pay_title": "ケーキペイギフトカード", - "cake_pay_subtitle": "ギフトカードを購入してすぐに利用できます", + "cake_pay_subtitle": "割引ギフトカードを購入する (米国のみ)", + "cake_pay_web_cards_title": "Cake Pay ウェブカード", + "cake_pay_web_cards_subtitle": "世界中のプリペイド カードとギフト カードを購入する", "about_cake_pay": "Cake Payを使用すると、仮想資産を含むギフトカードを簡単に購入でき、米国内の150,000を超える加盟店ですぐに利用できます。", "cake_pay_account_note": "メールアドレスだけでサインアップして、カードを表示して購入できます。割引価格で利用できるカードもあります!", "already_have_account": "すでにアカウントをお持ちですか?", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 470a1e405..3761f4f93 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "해당 이름의 지갑이 이미 존재합니다.", "market_place": "마켓플레이스", "cake_pay_title": "케이크 페이 기프트 카드", - "cake_pay_subtitle": "기프트 카드를 구매하고 즉시 사용", + "cake_pay_subtitle": "할인된 기프트 카드 구매(미국만 해당)", + "cake_pay_web_cards_title": "케이크페이 웹카드", + "cake_pay_web_cards_subtitle": "전 세계 선불 카드 및 기프트 카드 구매", "about_cake_pay": "Cake Pay를 사용하면 미국 내 150,000개 이상의 가맹점에서 즉시 사용할 수 있는 가상 자산이 포함된 기프트 카드를 쉽게 구입할 수 있습니다.", "cake_pay_account_note": "이메일 주소로 가입하면 카드를 보고 구매할 수 있습니다. 일부는 할인된 가격으로 사용 가능합니다!", "already_have_account": "이미 계정이 있습니까?", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index a198f8672..426f9530a 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Portemonnee met die naam bestaat al", "market_place": "Marktplaats", "cake_pay_title": "Cake Pay-cadeaubonnen", - "cake_pay_subtitle": "Koop cadeaubonnen en wissel ze direct in", + "cake_pay_subtitle": "Koop cadeaubonnen met korting (alleen VS)", + "cake_pay_web_cards_title": "Cake Pay-webkaarten", + "cake_pay_web_cards_subtitle": "Koop wereldwijd prepaidkaarten en cadeaubonnen", "about_cake_pay": "Met Cake Pay kunt u eenvoudig cadeaubonnen kopen met virtuele activa, die direct kunnen worden uitgegeven bij meer dan 150.000 handelaren in de Verenigde Staten.", "cake_pay_account_note": "Meld u aan met alleen een e-mailadres om kaarten te bekijken en te kopen. Sommige zijn zelfs met korting verkrijgbaar!", "already_have_account": "Heb je al een account?", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index dc1ffbd84..2baf3cf48 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Portfel o tej nazwie już istnieje", "market_place": "Rynek", "cake_pay_title": "Karty podarunkowe Cake Pay", - "cake_pay_subtitle": "Kup karty podarunkowe i wykorzystaj je natychmiast", + "cake_pay_subtitle": "Kup karty upominkowe ze zniżką (tylko USA)", + "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_pay_web_cards_subtitle": "Kupuj na całym świecie karty przedpłacone i karty podarunkowe", "about_cake_pay": "Cake Pay umożliwia łatwe kupowanie kart podarunkowych z wirtualnymi aktywami, które można natychmiast wydać u ponad 150 000 sprzedawców w Stanach Zjednoczonych.", "cake_pay_account_note": "Zarejestruj się, używając tylko adresu e-mail, aby przeglądać i kupować karty. Niektóre są nawet dostępne ze zniżką!", "already_have_account": "Masz już konto?", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 6a128d109..9cb077f1b 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "A carteira com esse nome já existe", "market_place": "Mercado", "cake_pay_title": "Cartões de presente de pagamento de bolo", - "cake_pay_subtitle": "Compre vales-presente e resgate instantaneamente", + "cake_pay_subtitle": "Compre vales-presente com desconto (somente nos EUA)", + "cake_pay_web_cards_title": "Cartões Cake Pay Web", + "cake_pay_web_cards_subtitle": "Compre cartões pré-pagos e cartões-presente em todo o mundo", "about_cake_pay": "O Cake Pay permite que você compre facilmente cartões-presente com ativos virtuais, que podem ser gastos instantaneamente em mais de 150.000 comerciantes nos Estados Unidos.", "cake_pay_account_note": "Inscreva-se com apenas um endereço de e-mail para ver e comprar cartões. Alguns estão até com desconto!", "already_have_account": "Já tem uma conta?", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 04a7f0665..3772a0d2c 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -539,7 +539,9 @@ "wallet_name_exists": "Кошелек с таким именем уже существует", "market_place": "Торговая площадка", "cake_pay_title": "Подарочные карты Cake Pay", - "cake_pay_subtitle": "Купите подарочные карты и моментально погасите их", + "cake_pay_subtitle": "Покупайте подарочные карты со скидкой (только для США)", + "cake_pay_web_cards_title": "Веб-карты Cake Pay", + "cake_pay_web_cards_subtitle": "Покупайте карты предоплаты и подарочные карты по всему миру", "about_cake_pay": "Cake Pay позволяет вам легко покупать подарочные карты с виртуальными активами, которые можно мгновенно потратить в более чем 150 000 продавцов в Соединенных Штатах.", "cake_pay_account_note": "Зарегистрируйтесь, указав только адрес электронной почты, чтобы просматривать и покупать карты. Некоторые даже доступны со скидкой!", "already_have_account": "У вас уже есть аккаунт?", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 58d19e636..680633d22 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -538,7 +538,9 @@ "wallet_name_exists": "Гаманець з такою назвою вже існує", "market_place": "Ринок", "cake_pay_title": "Подарункові картки Cake Pay", - "cake_pay_subtitle": "Купуйте подарункові картки та використовуйте їх миттєво", + "cake_pay_subtitle": "Купуйте подарункові картки зі знижкою (тільки для США)", + "cake_pay_web_cards_title": "Веб-картки Cake Pay", + "cake_pay_web_cards_subtitle": "Купуйте передоплачені та подарункові картки по всьому світу", "about_cake_pay": "Cake Pay дозволяє вам легко купувати подарункові картки з віртуальними активами, які можна миттєво витратити в понад 150 000 продавців у Сполучених Штатах.", "cake_pay_account_note": "Зареєструйтеся, використовуючи лише адресу електронної пошти, щоб переглядати та купувати картки. Деякі навіть доступні зі знижкою!", "already_have_account": "Вже є обліковий запис?", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index eb4571943..7d251a68e 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -537,7 +537,9 @@ "wallet_name_exists": "同名的钱包已经存在", "market_place": "市场", "cake_pay_title": "Cake Pay 礼品卡", - "cake_pay_subtitle": "购买礼品卡并立即兑换", + "cake_pay_subtitle": "购买打折礼品卡(仅限美国)", + "cake_pay_web_cards_title": "蛋糕支付网络卡", + "cake_pay_web_cards_subtitle": "购买全球预付卡和礼品卡", "about_cake_pay": "Cake Pay 让您可以轻松购买带有虚拟资产的礼品卡,可立即在美国超过 150,000 家商家消费。", "cake_pay_account_note": "只需使用電子郵件地址註冊即可查看和購買卡片。有些甚至可以打折!", "already_have_account": "已经有账号了?", From 85a70e3b1d65bcfd8c8c8e071cac27fa21c31b3f Mon Sep 17 00:00:00 2001 From: Justin Ehrenhofer Date: Wed, 21 Dec 2022 12:06:47 -0600 Subject: [PATCH 074/100] Contributing instructions for languages and fiat currencies --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index bd74ccfbc..c5f6dc1b2 100644 --- a/README.md +++ b/README.md @@ -76,3 +76,31 @@ We have 24/7 free support. Please contact support@cakewallet.com More instructions to follow For instructions on how to build for Android: please view file `howto-build-android.md` + +# Contributing + +## Improving translations + +Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull request with the changes. + +## Add a new language + +1. Create a new `strings_XX.arb` file in `res/values/`, replacing XX with the language's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1). + +2. Edit the strings in this file, replacing XXX below with the translation for each string. + +`"welcome" : "Welcome to",` -> `"welcome" : "XXX",` + +3. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language. + +4. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. + +## Add a new fiat currency + +1. Check with [Cake Wallet support](https://guides.cakewallet.com) to see if the desired new fiat currency is available through our fiat API. Not all fiat currencies are. + +2. If the currency is associated strongly with a specific issuing country, map the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code with the applicable [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) in `lib/entities/fiat_currency.dart`. If the currency is used in a whole region or organization, then map with a reasonable interpretation of this (eg: eur countryCode for EUR symbol). + +3. Add the raw mapping underneath in `lib/entities/fiat_currency.dart` following the same format as the others. + +4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. From a3afcc19fe119b17b4a63f87cac422ced7d3e333 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 22 Dec 2022 20:00:16 +0200 Subject: [PATCH 075/100] New App Version Cake Wallet v4.5.5 - Monero v1.2.4 --- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 556a78a87..979a60e9d 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,14 +14,14 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.3" -MONERO_COM_BUILD_NUMBER=34 +MONERO_COM_VERSION="1.2.4" +MONERO_COM_BUILD_NUMBER=35 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.4" -CAKEWALLET_BUILD_NUMBER=139 +CAKEWALLET_VERSION="4.5.5" +CAKEWALLET_BUILD_NUMBER=140 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index f530f718a..1965d1e41 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.3" -MONERO_COM_BUILD_NUMBER=31 +MONERO_COM_VERSION="1.2.4" +MONERO_COM_BUILD_NUMBER=32 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.4" -CAKEWALLET_BUILD_NUMBER=136 +CAKEWALLET_VERSION="4.5.5" +CAKEWALLET_BUILD_NUMBER=137 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From 40270e84c9c6c09ff5710a69a80e17c9f536fbec Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 22 Dec 2022 20:59:40 +0200 Subject: [PATCH 076/100] - Add Cache Dependencies workflow on main branch to be available for all sub branches - Replace static cache key with hash of dependencies pubspec.yaml --- .github/workflows/cache_dependencies.yml | 56 ++++++++++++++++++++++++ .github/workflows/pr_test_build.yml | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cache_dependencies.yml diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml new file mode 100644 index 000000000..4b7084884 --- /dev/null +++ b/.github/workflows/cache_dependencies.yml @@ -0,0 +1,56 @@ +name: Cache Dependencies + +on: + push: + branches: [ main ] + +jobs: + test: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: '8.x' + + - name: Flutter action + uses: subosito/flutter-action@v1 + with: + flutter-version: '3.3.x' + channel: stable + + - name: Install package dependencies + run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake clang + + - name: Execute Build and Setup Commands + run: | + sudo mkdir -p /opt/android + sudo chown $USER /opt/android + cd /opt/android + git clone https://github.com/cake-tech/cake_wallet.git --branch main + cd cake_wallet/scripts/android/ + ./install_ndk.sh + source ./app_env.sh cakewallet + ./app_config.sh + + - name: Cache Externals + id: cache-externals + uses: actions/cache@v3 + with: + path: | + /opt/android/cake_wallet/cw_haven/android/.cxx + /opt/android/cake_wallet/cw_haven/ios/External + /opt/android/cake_wallet/cw_monero/android/.cxx + /opt/android/cake_wallet/cw_monero/ios/External + /opt/android/cake_wallet/cw_shared_external/ios/External + key: ${{ hashFiles('/opt/android/cake_wallet/cw_haven/pubspec.yaml', '/opt/android/cake_wallet/cw_monero/pubspec.yaml', '/opt/android/cake_wallet/cw_shared_external/pubspec.yaml') }} + + - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} + name: Generate Externals + run: | + cd /opt/android/cake_wallet/scripts/android/ + source ./app_env.sh cakewallet + ./build_all.sh + ./copy_monero_deps.sh diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 96ac95e49..54f716cc2 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -45,7 +45,7 @@ jobs: /opt/android/cake_wallet/cw_monero/android/.cxx /opt/android/cake_wallet/cw_monero/ios/External /opt/android/cake_wallet/cw_shared_external/ios/External - key: externals-cache-key + key: ${{ hashFiles('/opt/android/cake_wallet/cw_haven/pubspec.yaml', '/opt/android/cake_wallet/cw_monero/pubspec.yaml', '/opt/android/cake_wallet/cw_shared_external/pubspec.yaml') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals From 0baa0329ac857d7e878f0b9bfe403b79bd802d9f Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 22 Dec 2022 22:54:33 +0200 Subject: [PATCH 077/100] Change key to be of the build scripts hash --- .github/workflows/cache_dependencies.yml | 2 +- .github/workflows/pr_test_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index 4b7084884..0887ed07d 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -45,7 +45,7 @@ jobs: /opt/android/cake_wallet/cw_monero/android/.cxx /opt/android/cake_wallet/cw_monero/ios/External /opt/android/cake_wallet/cw_shared_external/ios/External - key: ${{ hashFiles('/opt/android/cake_wallet/cw_haven/pubspec.yaml', '/opt/android/cake_wallet/cw_monero/pubspec.yaml', '/opt/android/cake_wallet/cw_shared_external/pubspec.yaml') }} + key: ${{ hashFiles('/opt/android/cake_wallet/scripts/android/build_monero.sh', '/opt/android/cake_wallet/scripts/android/build_haven.sh') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 54f716cc2..83e430a32 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -45,7 +45,7 @@ jobs: /opt/android/cake_wallet/cw_monero/android/.cxx /opt/android/cake_wallet/cw_monero/ios/External /opt/android/cake_wallet/cw_shared_external/ios/External - key: ${{ hashFiles('/opt/android/cake_wallet/cw_haven/pubspec.yaml', '/opt/android/cake_wallet/cw_monero/pubspec.yaml', '/opt/android/cake_wallet/cw_shared_external/pubspec.yaml') }} + key: ${{ hashFiles('/opt/android/cake_wallet/scripts/android/build_monero.sh', '/opt/android/cake_wallet/scripts/android/build_haven.sh') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals From 3bcaf06802af3ef6e646631d211cfa390b243f00 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 22 Dec 2022 23:35:56 +0200 Subject: [PATCH 078/100] Change key to be of the build scripts hash --- .github/workflows/cache_dependencies.yml | 2 +- .github/workflows/pr_test_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml index 0887ed07d..9d49ed3d8 100644 --- a/.github/workflows/cache_dependencies.yml +++ b/.github/workflows/cache_dependencies.yml @@ -45,7 +45,7 @@ jobs: /opt/android/cake_wallet/cw_monero/android/.cxx /opt/android/cake_wallet/cw_monero/ios/External /opt/android/cake_wallet/cw_shared_external/ios/External - key: ${{ hashFiles('/opt/android/cake_wallet/scripts/android/build_monero.sh', '/opt/android/cake_wallet/scripts/android/build_haven.sh') }} + key: ${{ hashFiles('**/build_monero.sh', '**/build_haven.sh') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 83e430a32..00fd16199 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -45,7 +45,7 @@ jobs: /opt/android/cake_wallet/cw_monero/android/.cxx /opt/android/cake_wallet/cw_monero/ios/External /opt/android/cake_wallet/cw_shared_external/ios/External - key: ${{ hashFiles('/opt/android/cake_wallet/scripts/android/build_monero.sh', '/opt/android/cake_wallet/scripts/android/build_haven.sh') }} + key: ${{ hashFiles('**/build_monero.sh', '**/build_haven.sh') }} - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }} name: Generate Externals From 89028500e7c83b66551c65914faf733f142c04e0 Mon Sep 17 00:00:00 2001 From: Serhii Date: Fri, 23 Dec 2022 23:58:39 +0200 Subject: [PATCH 079/100] extract SectionDivider widget --- .../screens/dashboard/widgets/filter_widget.dart | 13 +------------ .../monero_account_list_page.dart | 7 ++----- lib/src/screens/receive/receive_page.dart | 4 ++-- .../send/widgets/choose_yat_address_alert.dart | 6 ++---- .../screens/wallet_keys/wallet_keys_page.dart | 6 ++---- lib/src/widgets/base_alert_dialog.dart | 16 ++++------------ lib/src/widgets/section_divider.dart | 13 +++++++++++++ 7 files changed, 26 insertions(+), 39 deletions(-) create mode 100644 lib/src/widgets/section_divider.dart diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 6831819e4..dd693777b 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -1,6 +1,7 @@ import 'dart:ui'; import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/filter_tile.dart'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:cake_wallet/src/widgets/standard_checkbox.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:flutter/cupertino.dart'; @@ -141,15 +142,3 @@ class FilterWidget extends StatelessWidget { ); } } - -class SectionDivider extends StatelessWidget { - const SectionDivider(); - - @override - Widget build(BuildContext context) { - return Container( - height: 1, - color: Theme.of(context).dividerColor, - ); - } -} diff --git a/lib/src/screens/monero_accounts/monero_account_list_page.dart b/lib/src/screens/monero_accounts/monero_account_list_page.dart index 99134369e..c565332a0 100644 --- a/lib/src/screens/monero_accounts/monero_account_list_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_list_page.dart @@ -1,4 +1,5 @@ import 'dart:ui'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -83,11 +84,7 @@ class MoneroAccountListPage extends StatelessWidget { ListView.separated( padding: EdgeInsets.zero, controller: controller, - separatorBuilder: (context, index) => - Container( - height: 1, - color: Theme.of(context).dividerColor, - ), + separatorBuilder: (context, index) => SectionDivider(), itemCount: accounts.length ?? 0, itemBuilder: (context, index) { final account = accounts[index]; diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index 6f6b4e31c..4344139ac 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/src/widgets/keyboard_done_button.dart'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; @@ -135,8 +136,7 @@ class ReceivePage extends BasePage { Observer( builder: (_) => ListView.separated( padding: EdgeInsets.all(0), - separatorBuilder: (context, _) => Container( - height: 1, color: Theme.of(context).dividerColor), + separatorBuilder: (context, _) => SectionDivider(), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemCount: addressListViewModel.items.length, diff --git a/lib/src/screens/send/widgets/choose_yat_address_alert.dart b/lib/src/screens/send/widgets/choose_yat_address_alert.dart index 93785743d..dae6c5ad7 100644 --- a/lib/src/screens/send/widgets/choose_yat_address_alert.dart +++ b/lib/src/screens/send/widgets/choose_yat_address_alert.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/src/widgets/cake_scrollbar.dart'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/base_alert_dialog.dart'; @@ -70,10 +71,7 @@ class ChooseYatAddressButtonsState extends State { controller: controller, padding: EdgeInsets.all(0), itemCount: itemCount, - separatorBuilder: (_, __) => Container( - height: 1, - color: Theme.of(context).dividerColor, - ), + separatorBuilder: (_, __) => SectionDivider(), itemBuilder: (context, index) { final address = addresses[index]; diff --git a/lib/src/screens/wallet_keys/wallet_keys_page.dart b/lib/src/screens/wallet_keys/wallet_keys_page.dart index f97200e1e..b690cadda 100644 --- a/lib/src/screens/wallet_keys/wallet_keys_page.dart +++ b/lib/src/screens/wallet_keys/wallet_keys_page.dart @@ -1,4 +1,5 @@ import 'package:auto_size_text/auto_size_text.dart'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; @@ -57,10 +58,7 @@ class WalletKeysPage extends BasePage { height: 1, padding: EdgeInsets.only(left: 24), color: Theme.of(context).accentTextTheme!.headline6!.backgroundColor!, - child: Container( - height: 1, - color: Theme.of(context).dividerColor, - ), + child: SectionDivider(), ), itemCount: walletKeysViewModel.items.length, itemBuilder: (BuildContext context, int index) { diff --git a/lib/src/widgets/base_alert_dialog.dart b/lib/src/widgets/base_alert_dialog.dart index 70370e227..861d1ba9d 100644 --- a/lib/src/widgets/base_alert_dialog.dart +++ b/lib/src/widgets/base_alert_dialog.dart @@ -1,4 +1,5 @@ import 'dart:ui'; +import 'package:cake_wallet/src/widgets/section_divider.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/palette.dart'; @@ -76,10 +77,7 @@ class BaseAlertDialog extends StatelessWidget { ), )), ), - Container( - width: 1, - color: Theme.of(context).dividerColor, - ), + SectionDivider(), Expanded( child: TextButton( onPressed: actionRight, @@ -140,10 +138,7 @@ class BaseAlertDialog extends StatelessWidget { isDividerExists ? Padding( padding: EdgeInsets.only(top: 16, bottom: 8), - child: Container( - height: 1, - color: Theme.of(context).dividerColor, - ), + child: SectionDivider(), ) : Offstage(), Padding( @@ -152,10 +147,7 @@ class BaseAlertDialog extends StatelessWidget { ) ], ), - Container( - height: 1, - color: Theme.of(context).dividerColor, - ), + SectionDivider(), actionButtons(context) ], ), diff --git a/lib/src/widgets/section_divider.dart b/lib/src/widgets/section_divider.dart new file mode 100644 index 000000000..bef85f975 --- /dev/null +++ b/lib/src/widgets/section_divider.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +class SectionDivider extends StatelessWidget { + const SectionDivider(); + + @override + Widget build(BuildContext context) { + return Container( + height: 1, + color: Theme.of(context).dividerColor, + ); + } +} \ No newline at end of file From d893562dad502b69c8dd2f3f196d34f1845f6fcc Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 24 Dec 2022 01:09:54 +0200 Subject: [PATCH 080/100] update localization --- .../dashboard/widgets/filter_widget.dart | 25 +++++++++---------- res/values/strings_de.arb | 2 +- res/values/strings_en.arb | 2 +- res/values/strings_es.arb | 2 +- res/values/strings_fr.arb | 2 +- res/values/strings_hi.arb | 2 +- res/values/strings_hr.arb | 2 +- res/values/strings_it.arb | 2 +- res/values/strings_ja.arb | 2 +- res/values/strings_ko.arb | 2 +- res/values/strings_nl.arb | 2 +- res/values/strings_pl.arb | 2 +- res/values/strings_pt.arb | 2 +- res/values/strings_ru.arb | 2 +- res/values/strings_uk.arb | 2 +- res/values/strings_zh.arb | 2 +- 16 files changed, 27 insertions(+), 28 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index dd693777b..86682dcbc 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -108,19 +108,18 @@ class FilterWidget extends StatelessWidget { // .changeEndDate(picked.last); //} }, - child: Padding( - padding: EdgeInsets.only(left: 32), - child: Text( - item.caption, - style: TextStyle( - color: Colors.red, - //Theme.of(context).primaryTextTheme.title.color,// - fontSize: 18, - fontFamily: 'Lato', - fontWeight: FontWeight.w500, - decoration: TextDecoration.none), - ), - ), + // child: Padding( + // padding: EdgeInsets.only(left: 32), + // child: Text( + // item.caption, + // style: TextStyle( + // color: Theme.of(context).primaryTextTheme.title.color, + // fontSize: 18, + // fontFamily: 'Lato', + // fontWeight: FontWeight.w500, + // decoration: TextDecoration.none), + // ), + // ), ); return FilterTile(child: content); diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index bb01cdaba..152d3226e 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -48,7 +48,7 @@ "outgoing" : "Ausgehend", "transactions_by_date" : "Transaktionen nach Datum", "trades" : "Börsen", - "filters" : "Filtern nach", + "filter_by": "Filtern nach", "today" : "Heute", "yesterday" : "Gestern", "received" : "Empfangen", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 8cd6a3942..62306776f 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -48,7 +48,7 @@ "outgoing" : "Outgoing", "transactions_by_date" : "Transactions by date", "trades" : "Trades", - "filters" : "Filter by", + "filter_by": "Filter by", "today" : "Today", "yesterday" : "Yesterday", "received" : "Received", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 63fca7fbf..ef3eb6e06 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -48,7 +48,7 @@ "outgoing" : "Saliente", "transactions_by_date" : "Transacciones por fecha", "trades" : "Cambios", - "filters" : "Filtrado por", + "filter_by": "Filtrado por", "today" : "Hoy", "yesterday" : "Ayer", "received" : "Recibido", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index dc975ac24..2cd961cc1 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -46,7 +46,7 @@ "outgoing" : "Sortantes", "transactions_by_date" : "Transactions par date", "trades" : "Échanges", - "filters" : "Filtrer par", + "filter_by": "Filtrer par", "today" : "Aujourd'hui", "yesterday" : "Hier", "received" : "Reçus", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 7cb5ff132..947e1574f 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -48,7 +48,7 @@ "outgoing" : "निवर्तमान", "transactions_by_date" : "तारीख से लेन-देन", "trades" : "ट्रेडों", - "filters" : "के द्वारा छनित", + "filter_by": "के द्वारा छनित", "today" : "आज", "yesterday" : "बिता कल", "received" : "प्राप्त किया", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index b2696a3df..432cf8fd0 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -48,7 +48,7 @@ "outgoing" : "Odlazno", "transactions_by_date" : "Transakcije prema datumu", "trades" : "Razmjene", - "filters" : "Filtrirati po", + "filter_by": "Filtrirati po", "today" : "Danas", "yesterday" : "Jučer", "received" : "Primljeno", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index cb68d9ea6..218c6e33b 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -48,7 +48,7 @@ "outgoing" : "In uscita", "transactions_by_date" : "Transazioni per data", "trades" : "Scambi", - "filters" : "Filtrirati po", + "filter_by": "Filtrirati po", "today" : "Oggi", "yesterday" : "Ieri", "received" : "Ricevuto", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index f0d595c6e..6770d7f0c 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -48,7 +48,7 @@ "outgoing" : "発信", "transactions_by_date" : "日付ごとの取引", "trades" : "取引", - "filters" : "でフィルタリング", + "filter_by": "でフィルタリング", "today" : "今日", "yesterday" : "昨日", "received" : "受け取った", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index f4d289287..bef8c3477 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -48,7 +48,7 @@ "outgoing" : "나가는", "transactions_by_date" : "날짜 별 거래", "trades" : "거래", - "filters" : "필터링 기준", + "filter_by": "필터링 기준", "today" : "오늘", "yesterday" : "어제", "received" : "받았습니다", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 06c075092..706986be6 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -48,7 +48,7 @@ "outgoing" : "Uitgaande", "transactions_by_date" : "Transacties op datum", "trades" : "Trades", - "filters" : "Filteren op", + "filter_by": "Filteren op", "today" : "Vandaag", "yesterday" : "Gisteren", "received" : "Ontvangen", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 64e5f508b..1f708df9e 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -48,7 +48,7 @@ "outgoing" : "Towarzyski", "transactions_by_date" : "Transakcje według daty", "trades" : "Transakcje", - "filters" : "Filtruj według", + "filter_by": "Filtruj według", "today" : "Dzisiaj", "yesterday" : "Wczoraj", "received" : "Odebrane", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index b23aa20e8..909ce87e6 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -48,7 +48,7 @@ "outgoing" : "Enviadas", "transactions_by_date" : "Transações por data", "trades" : "Trocas", - "filters" : "Filtrar por", + "filter_by": "Filtrar por", "today" : "Hoje", "yesterday" : "Ontem", "received" : "Recebida", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 40f6ccdf0..f9376e6f1 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -48,7 +48,7 @@ "outgoing" : "Исходящие", "transactions_by_date" : "Сортировать по дате", "trades" : "Сделки", - "filters" : "Фильтровать по", + "filter_by": "Фильтровать по", "today" : "Сегодня", "yesterday" : "Вчера", "received" : "Полученные", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 9108c700d..030573c32 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -48,7 +48,7 @@ "outgoing" : "Вихідні", "transactions_by_date" : "Сортувати по даті", "trades" : "Торгові операції", - "filters" : "Фільтрувати по", + "filter_by": "Фільтрувати по", "today" : "Сьогодні", "yesterday" : "Вчора", "received" : "Отримані", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 4683bb068..b49880b21 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -48,7 +48,7 @@ "outgoing" : "发送", "transactions_by_date" : "按日期交易", "trades" : "交易", - "filters" : "过滤", + "filter_by": "过滤", "today" : "今天", "yesterday" : "昨天", "received" : "已收到", From ca79052914ca72253fd8e0e4b7b859f28ef96b71 Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 26 Dec 2022 20:41:21 +0200 Subject: [PATCH 081/100] PR fixes --- .../dashboard/widgets/filter_widget.dart | 2 +- lib/store/dashboard/trade_filter_store.dart | 91 +++++++++---------- .../dashboard/transaction_filter_store.dart | 56 +++++------- .../dashboard/dashboard_view_model.dart | 16 ++-- lib/view_model/dashboard/filter_item.dart | 2 +- 5 files changed, 79 insertions(+), 88 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 86682dcbc..cf6650301 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -82,7 +82,7 @@ class FilterWidget extends StatelessWidget { final content = item.onChanged != null ? Observer( builder: (_) => StandardCheckbox( - value: item.value.value, + value: item.value(), caption: item.caption, gradientBackground: true, borderColor: Theme.of(context).dividerColor, diff --git a/lib/store/dashboard/trade_filter_store.dart b/lib/store/dashboard/trade_filter_store.dart index 9c1dc9a9a..87fa749a9 100644 --- a/lib/store/dashboard/trade_filter_store.dart +++ b/lib/store/dashboard/trade_filter_store.dart @@ -8,60 +8,61 @@ part'trade_filter_store.g.dart'; class TradeFilterStore = TradeFilterStoreBase with _$TradeFilterStore; abstract class TradeFilterStoreBase with Store { - TradeFilterStoreBase(); + TradeFilterStoreBase() : displayXMRTO = true, + displayChangeNow = true, + displaySideShift = true, + displayMorphToken = true, + displaySimpleSwap = true; - Observable displayXMRTO = Observable(true); - Observable displayAllTrades = Observable(true); - Observable displayChangeNow = Observable(true); - Observable displaySideShift = Observable(true); - Observable displayMorphToken = Observable(true); - Observable displaySimpleSwap = Observable(true); + @observable + bool displayXMRTO; + + @observable + bool displayChangeNow; + + @observable + bool displaySideShift; + + @observable + bool displayMorphToken; + + @observable + bool displaySimpleSwap; + + @computed + bool get displayAllTrades => displayChangeNow && displaySideShift && displaySimpleSwap; @action void toggleDisplayExchange(ExchangeProviderDescription provider) { switch (provider) { case ExchangeProviderDescription.changeNow: - displayAllTrades.value = false; - displayChangeNow.value = !displayChangeNow.value; - if (displayChangeNow.value && displaySideShift.value && displaySimpleSwap.value) { - displayAllTrades.value = true; - } + displayChangeNow = !displayChangeNow; break; case ExchangeProviderDescription.sideShift: - displayAllTrades.value = false; - displaySideShift.value = !displaySideShift.value; - if (displayChangeNow.value && displaySideShift.value && displaySimpleSwap.value) { - displayAllTrades.value = true; - } + displaySideShift = !displaySideShift; break; case ExchangeProviderDescription.simpleSwap: - displayAllTrades.value = false; - displaySimpleSwap.value = !displaySimpleSwap.value; - if (displayChangeNow.value && displaySideShift.value && displaySimpleSwap.value) { - displayAllTrades.value = true; - } + displaySimpleSwap = !displaySimpleSwap; break; case ExchangeProviderDescription.xmrto: - displayXMRTO.value = !displayXMRTO.value; + displayXMRTO = !displayXMRTO; break; case ExchangeProviderDescription.morphToken: - displayMorphToken.value = !displayMorphToken.value; + displayMorphToken = !displayMorphToken; break; case ExchangeProviderDescription.all: - displayAllTrades.value = !displayAllTrades.value; - if (displayAllTrades.value) { - displayChangeNow.value = true; - displaySideShift.value = true; - displayXMRTO.value = true; - displayMorphToken.value = true; - displaySimpleSwap.value = true; - } - if (!displayAllTrades.value) { - displayChangeNow.value = false; - displaySideShift.value = false; - displayXMRTO.value = false; - displayMorphToken.value = false; - displaySimpleSwap.value = false; + if (displayAllTrades) { + displayChangeNow = false; + displaySideShift = false; + displayXMRTO = false; + displayMorphToken = false; + displaySimpleSwap = false; + } else { + displayChangeNow = true; + displaySideShift = true; + displayXMRTO = true; + displayMorphToken = true; + displaySimpleSwap = true; } break; } @@ -70,24 +71,22 @@ abstract class TradeFilterStoreBase with Store { List filtered({required List trades, required WalletBase wallet}) { final _trades = trades.where((item) => item.trade.walletId == wallet.id).toList(); - final needToFilter = !displayChangeNow.value || !displaySideShift.value - || !displayXMRTO.value || !displayMorphToken.value - || !displaySimpleSwap.value; + final needToFilter = !displayAllTrades; return needToFilter ? _trades .where((item) => - (displayXMRTO.value && + (displayXMRTO && item.trade.provider == ExchangeProviderDescription.xmrto) || - (displaySideShift.value && + (displaySideShift && item.trade.provider == ExchangeProviderDescription.sideShift) || - (displayChangeNow.value && + (displayChangeNow && item.trade.provider == ExchangeProviderDescription.changeNow) || - (displayMorphToken.value && + (displayMorphToken && item.trade.provider == ExchangeProviderDescription.morphToken) - ||(displaySimpleSwap.value && + ||(displaySimpleSwap && item.trade.provider == ExchangeProviderDescription.simpleSwap)) .toList() diff --git a/lib/store/dashboard/transaction_filter_store.dart b/lib/store/dashboard/transaction_filter_store.dart index 4198f7d8c..95264a23d 100644 --- a/lib/store/dashboard/transaction_filter_store.dart +++ b/lib/store/dashboard/transaction_filter_store.dart @@ -10,11 +10,14 @@ class TransactionFilterStore = TransactionFilterStoreBase with _$TransactionFilterStore; abstract class TransactionFilterStoreBase with Store { - TransactionFilterStoreBase(); + TransactionFilterStoreBase() : displayIncoming = true, + displayOutgoing = true; - Observable displayAll = Observable(true); - Observable displayIncoming = Observable(true); - Observable displayOutgoing = Observable(true); + @observable + bool displayIncoming; + + @observable + bool displayOutgoing; @observable DateTime? startDate; @@ -22,40 +25,30 @@ abstract class TransactionFilterStoreBase with Store { @observable DateTime? endDate; + @computed + bool get displayAll => displayIncoming && displayOutgoing; + @action - void toggleIAll() { - displayAll.value = (!displayAll.value); - if (displayAll.value) { - displayOutgoing.value = true; - displayIncoming.value = true; - } - if (!displayAll.value) { - displayOutgoing.value = false; - displayIncoming.value = false; + void toggleAll() { + if (displayAll) { + displayOutgoing = false; + displayIncoming = false; + } else { + displayOutgoing = true; + displayIncoming = true; } } + @action void toggleIncoming() { - displayIncoming.value = (!displayIncoming.value); - if (displayIncoming.value && displayOutgoing.value) { - displayAll.value = true; - } - if (!displayIncoming.value || !displayOutgoing.value) { - displayAll.value = false; - } + displayIncoming = !displayIncoming; } @action void toggleOutgoing() { - displayOutgoing.value = (!displayOutgoing.value); - if (displayIncoming.value && displayOutgoing.value) { - displayAll.value = true; - } - if (!displayIncoming.value || !displayOutgoing.value) { - displayAll.value = false; - } + displayOutgoing = !displayOutgoing; } @action @@ -66,8 +59,7 @@ abstract class TransactionFilterStoreBase with Store { List filtered({required List transactions}) { var _transactions = []; - final needToFilter = !displayOutgoing.value || - !displayIncoming.value || + final needToFilter = !displayAll || (startDate != null && endDate != null); if (needToFilter) { @@ -79,11 +71,11 @@ abstract class TransactionFilterStoreBase with Store { && (endDate?.isAfter(item.transaction.date) ?? false); } - if (allowed && (!displayOutgoing.value || !displayIncoming.value)) { - allowed = (displayOutgoing.value && + if (allowed && (!displayAll)) { + allowed = (displayOutgoing && item.transaction.direction == TransactionDirection.outgoing) || - (displayIncoming.value && + (displayIncoming && item.transaction.direction == TransactionDirection.incoming); } diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index ba0f9f8ff..57720d92f 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -59,15 +59,15 @@ abstract class DashboardViewModelBase with Store { filterItems = { S.current.transactions: [ FilterItem( - value: transactionFilterStore.displayAll, + value: () => transactionFilterStore.displayAll, caption: S.current.all_transactions, - onChanged: transactionFilterStore.toggleIAll), + onChanged: transactionFilterStore.toggleAll), FilterItem( - value: transactionFilterStore.displayIncoming, + value: () => transactionFilterStore.displayIncoming, caption: S.current.incoming, onChanged:transactionFilterStore.toggleIncoming), FilterItem( - value: transactionFilterStore.displayOutgoing, + value: () => transactionFilterStore.displayOutgoing, caption: S.current.outgoing, onChanged: transactionFilterStore.toggleOutgoing), // FilterItem( @@ -77,22 +77,22 @@ abstract class DashboardViewModelBase with Store { ], S.current.trades: [ FilterItem( - value: tradeFilterStore.displayAllTrades, + value: () => tradeFilterStore.displayAllTrades, caption: S.current.all_trades, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.all)), FilterItem( - value: tradeFilterStore.displayChangeNow, + value: () => tradeFilterStore.displayChangeNow, caption: ExchangeProviderDescription.changeNow.title, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.changeNow)), FilterItem( - value: tradeFilterStore.displaySideShift, + value: () => tradeFilterStore.displaySideShift, caption: ExchangeProviderDescription.sideShift.title, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.sideShift)), FilterItem( - value: tradeFilterStore.displaySimpleSwap, + value: () => tradeFilterStore.displaySimpleSwap, caption: ExchangeProviderDescription.simpleSwap.title, onChanged: () => tradeFilterStore .toggleDisplayExchange(ExchangeProviderDescription.simpleSwap)), diff --git a/lib/view_model/dashboard/filter_item.dart b/lib/view_model/dashboard/filter_item.dart index 8bc0f0bf1..0944e899c 100644 --- a/lib/view_model/dashboard/filter_item.dart +++ b/lib/view_model/dashboard/filter_item.dart @@ -6,7 +6,7 @@ class FilterItem { required this.caption, required this.onChanged}); - Observable value; + bool Function() value; String caption; Function onChanged; } \ No newline at end of file From dec818a27a3f054c6b386e56bf661b85d9ae9d9f Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 26 Dec 2022 21:18:52 +0200 Subject: [PATCH 082/100] fix localisation key name --- lib/src/screens/dashboard/widgets/filter_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index cf6650301..8dcc1b5c3 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -38,7 +38,7 @@ class FilterWidget extends StatelessWidget { Padding( padding: EdgeInsets.all(24.0), child: Text( - S.of(context).filters, + S.of(context).filter_by, style: TextStyle( color: Theme.of(context).primaryTextTheme.overline!.color!, fontSize: 16, From daa9fc4acc77e38f9919e9877cb78f7483a6b742 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 28 Dec 2022 14:00:59 +0200 Subject: [PATCH 083/100] minor fixes --- .../dashboard/widgets/filter_widget.dart | 40 ++----------------- .../exchange_trade/exchange_trade_page.dart | 4 +- .../monero_account_list_page.dart | 3 +- .../order_details/order_details_page.dart | 6 +-- lib/src/screens/receive/receive_page.dart | 2 +- .../widgets/choose_yat_address_alert.dart | 2 +- .../trade_details/trade_details_page.dart | 6 +-- .../transaction_details_page.dart | 6 +-- .../unspent_coins_details_page.dart | 4 +- .../screens/wallet_keys/wallet_keys_page.dart | 6 +-- lib/src/widgets/base_alert_dialog.dart | 6 +-- .../{standard_list_row.dart => list_row.dart} | 4 +- 12 files changed, 28 insertions(+), 61 deletions(-) rename lib/src/widgets/{standard_list_row.dart => list_row.dart} (96%) diff --git a/lib/src/screens/dashboard/widgets/filter_widget.dart b/lib/src/screens/dashboard/widgets/filter_widget.dart index 8dcc1b5c3..17df0bc5e 100644 --- a/lib/src/screens/dashboard/widgets/filter_widget.dart +++ b/lib/src/screens/dashboard/widgets/filter_widget.dart @@ -20,7 +20,7 @@ class FilterWidget extends StatelessWidget { @override Widget build(BuildContext context) { - const sectionDivider = SectionDivider(); + const sectionDivider = const SectionDivider(); return AlertBackground( child: Stack( alignment: Alignment.center, @@ -79,8 +79,7 @@ class FilterWidget extends StatelessWidget { itemCount: section.length, itemBuilder: (_, index2) { final item = section[index2]; - final content = item.onChanged != null - ? Observer( + final content = Observer( builder: (_) => StandardCheckbox( value: item.value(), caption: item.caption, @@ -88,40 +87,7 @@ class FilterWidget extends StatelessWidget { borderColor: Theme.of(context).dividerColor, iconColor: Colors.white, onChanged: (value) => item.onChanged(), - )) - : GestureDetector( - onTap: () async { - //final List picked = - //await date_rage_picker.showDatePicker( - // context: context, - // initialFirstDate: DateTime.now() - // .subtract(Duration(days: 1)), - // initialLastDate: (DateTime.now()), - // firstDate: DateTime(2015), - // lastDate: DateTime.now() - // .add(Duration(days: 1))); - - //if (picked != null && picked.length == 2) { - // dashboardViewModel.transactionFilterStore - // .changeStartDate(picked.first); - // dashboardViewModel.transactionFilterStore - // .changeEndDate(picked.last); - //} - }, - // child: Padding( - // padding: EdgeInsets.only(left: 32), - // child: Text( - // item.caption, - // style: TextStyle( - // color: Theme.of(context).primaryTextTheme.title.color, - // fontSize: 18, - // fontFamily: 'Lato', - // fontWeight: FontWeight.w500, - // decoration: TextDecoration.none), - // ), - // ), - ); - + )); return FilterTile(child: content); }, ) diff --git a/lib/src/screens/exchange_trade/exchange_trade_page.dart b/lib/src/screens/exchange_trade/exchange_trade_page.dart index e3eb8db96..5aacf3f1f 100644 --- a/lib/src/screens/exchange_trade/exchange_trade_page.dart +++ b/lib/src/screens/exchange_trade/exchange_trade_page.dart @@ -8,7 +8,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/core/execution_state.dart'; import 'package:cake_wallet/src/screens/exchange_trade/information_page.dart'; import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.dart'; -import 'package:cake_wallet/src/widgets/standard_list_row.dart'; +import 'package:cake_wallet/src/widgets/list_row.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/exchange/exchange_trade_view_model.dart'; @@ -194,7 +194,7 @@ class ExchangeTradeState extends State { final item = widget.exchangeTradeViewModel.items[index]; final value = item.data ?? fetchingLabel; - final content = AnotherStandardListRow( + final content = ListRow( title: item.title, value: value, valueFontSize: 14, diff --git a/lib/src/screens/monero_accounts/monero_account_list_page.dart b/lib/src/screens/monero_accounts/monero_account_list_page.dart index c565332a0..7fe15948f 100644 --- a/lib/src/screens/monero_accounts/monero_account_list_page.dart +++ b/lib/src/screens/monero_accounts/monero_account_list_page.dart @@ -84,7 +84,8 @@ class MoneroAccountListPage extends StatelessWidget { ListView.separated( padding: EdgeInsets.zero, controller: controller, - separatorBuilder: (context, index) => SectionDivider(), + separatorBuilder: (context, index) => + const SectionDivider(), itemCount: accounts.length ?? 0, itemBuilder: (context, index) { final account = accounts[index]; diff --git a/lib/src/screens/order_details/order_details_page.dart b/lib/src/screens/order_details/order_details_page.dart index a7eff99b8..0784c7008 100644 --- a/lib/src/screens/order_details/order_details_page.dart +++ b/lib/src/screens/order_details/order_details_page.dart @@ -7,7 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/widgets/standard_list_row.dart'; +import 'package:cake_wallet/src/widgets/list_row.dart'; import 'package:cake_wallet/src/screens/trade_details/track_trade_list_item.dart'; class OrderDetailsPage extends BasePage { @@ -57,7 +57,7 @@ class OrderDetailsPageBodyState extends State { if (item is TrackTradeListItem) { return GestureDetector( onTap: item.onTap, - child: AnotherStandardListRow( + child: ListRow( title: '${item.title}', value: '${item.value}')); } else { return GestureDetector( @@ -65,7 +65,7 @@ class OrderDetailsPageBodyState extends State { Clipboard.setData(ClipboardData(text: '${item.value}')); showBar(context, S.of(context).copied_to_clipboard); }, - child: AnotherStandardListRow( + child: ListRow( title: '${item.title}', value: '${item.value}')); } }); diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index 4344139ac..71ee578a0 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -136,7 +136,7 @@ class ReceivePage extends BasePage { Observer( builder: (_) => ListView.separated( padding: EdgeInsets.all(0), - separatorBuilder: (context, _) => SectionDivider(), + separatorBuilder: (context, _) => const SectionDivider(), shrinkWrap: true, physics: NeverScrollableScrollPhysics(), itemCount: addressListViewModel.items.length, diff --git a/lib/src/screens/send/widgets/choose_yat_address_alert.dart b/lib/src/screens/send/widgets/choose_yat_address_alert.dart index dae6c5ad7..5d937a571 100644 --- a/lib/src/screens/send/widgets/choose_yat_address_alert.dart +++ b/lib/src/screens/send/widgets/choose_yat_address_alert.dart @@ -71,7 +71,7 @@ class ChooseYatAddressButtonsState extends State { controller: controller, padding: EdgeInsets.all(0), itemCount: itemCount, - separatorBuilder: (_, __) => SectionDivider(), + separatorBuilder: (_, __) => const SectionDivider(), itemBuilder: (context, index) { final address = addresses[index]; diff --git a/lib/src/screens/trade_details/trade_details_page.dart b/lib/src/screens/trade_details/trade_details_page.dart index 1bb5d3ec8..1958a7d58 100644 --- a/lib/src/screens/trade_details/trade_details_page.dart +++ b/lib/src/screens/trade_details/trade_details_page.dart @@ -9,7 +9,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/widgets/standard_list_row.dart'; +import 'package:cake_wallet/src/widgets/list_row.dart'; import 'package:cake_wallet/src/screens/trade_details/track_trade_list_item.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_list_card.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_status_item.dart'; @@ -62,7 +62,7 @@ class TradeDetailsPageBodyState extends State { if (item is TrackTradeListItem) { return GestureDetector( onTap: item.onTap, - child: AnotherStandardListRow( + child: ListRow( title: '${item.title}', value: '${item.value}')); } @@ -86,7 +86,7 @@ class TradeDetailsPageBodyState extends State { Clipboard.setData(ClipboardData(text: '${item.value}')); showBar(context, S.of(context).copied_to_clipboard); }, - child: AnotherStandardListRow( + child: ListRow( title: '${item.title}', value: '${item.value}')); }); }); diff --git a/lib/src/screens/transaction_details/transaction_details_page.dart b/lib/src/screens/transaction_details/transaction_details_page.dart index 8d3ae8c9e..1b79ceeb0 100644 --- a/lib/src/screens/transaction_details/transaction_details_page.dart +++ b/lib/src/screens/transaction_details/transaction_details_page.dart @@ -6,7 +6,7 @@ import 'package:cake_wallet/view_model/transaction_details_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/src/widgets/standard_list_row.dart'; +import 'package:cake_wallet/src/widgets/list_row.dart'; import 'package:cake_wallet/src/screens/transaction_details/blockexplorer_list_item.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; @@ -42,7 +42,7 @@ class TransactionDetailsPage extends BasePage { S.of(context).transaction_details_copied(item.title)); }, child: - AnotherStandardListRow(title: '${item.title}:', value: item.value), + ListRow(title: '${item.title}:', value: item.value), ); } @@ -50,7 +50,7 @@ class TransactionDetailsPage extends BasePage { return GestureDetector( onTap: item.onTap, child: - AnotherStandardListRow(title: '${item.title}:', value: item.value), + ListRow(title: '${item.title}:', value: item.value), ); } diff --git a/lib/src/screens/unspent_coins/unspent_coins_details_page.dart b/lib/src/screens/unspent_coins/unspent_coins_details_page.dart index 74fbcfdd9..d8ce24d88 100644 --- a/lib/src/screens/unspent_coins/unspent_coins_details_page.dart +++ b/lib/src/screens/unspent_coins/unspent_coins_details_page.dart @@ -5,7 +5,7 @@ import 'package:cake_wallet/src/widgets/standard_list.dart'; import 'package:cake_wallet/view_model/unspent_coins/unspent_coins_details_view_model.dart'; import 'package:cake_wallet/view_model/unspent_coins/unspent_coins_switch_item.dart'; import 'package:flutter/material.dart'; -import 'package:cake_wallet/src/widgets/standard_list_row.dart'; +import 'package:cake_wallet/src/widgets/list_row.dart'; import 'package:cake_wallet/src/screens/transaction_details/standart_list_item.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -30,7 +30,7 @@ class UnspentCoinsDetailsPage extends BasePage { final item = unspentCoinsDetailsViewModel.items[index]; if (item is StandartListItem) { - return AnotherStandardListRow( + return ListRow( title: '${item.title}:', value: item.value); } diff --git a/lib/src/screens/wallet_keys/wallet_keys_page.dart b/lib/src/screens/wallet_keys/wallet_keys_page.dart index b690cadda..e81ec7d2a 100644 --- a/lib/src/screens/wallet_keys/wallet_keys_page.dart +++ b/lib/src/screens/wallet_keys/wallet_keys_page.dart @@ -7,7 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:cake_wallet/src/widgets/standard_list_row.dart'; +import 'package:cake_wallet/src/widgets/list_row.dart'; import 'package:cake_wallet/view_model/wallet_keys_view_model.dart'; class WalletKeysPage extends BasePage { @@ -58,7 +58,7 @@ class WalletKeysPage extends BasePage { height: 1, padding: EdgeInsets.only(left: 24), color: Theme.of(context).accentTextTheme!.headline6!.backgroundColor!, - child: SectionDivider(), + child: const SectionDivider(), ), itemCount: walletKeysViewModel.items.length, itemBuilder: (BuildContext context, int index) { @@ -69,7 +69,7 @@ class WalletKeysPage extends BasePage { Clipboard.setData(ClipboardData(text: item.value)); showBar(context, S.of(context).copied_key_to_clipboard(item.title)); }, - child: AnotherStandardListRow( + child: ListRow( title: item.title + ':', value: item.value, ), diff --git a/lib/src/widgets/base_alert_dialog.dart b/lib/src/widgets/base_alert_dialog.dart index 861d1ba9d..effbbc562 100644 --- a/lib/src/widgets/base_alert_dialog.dart +++ b/lib/src/widgets/base_alert_dialog.dart @@ -77,7 +77,7 @@ class BaseAlertDialog extends StatelessWidget { ), )), ), - SectionDivider(), + const SectionDivider(), Expanded( child: TextButton( onPressed: actionRight, @@ -138,7 +138,7 @@ class BaseAlertDialog extends StatelessWidget { isDividerExists ? Padding( padding: EdgeInsets.only(top: 16, bottom: 8), - child: SectionDivider(), + child: const SectionDivider(), ) : Offstage(), Padding( @@ -147,7 +147,7 @@ class BaseAlertDialog extends StatelessWidget { ) ], ), - SectionDivider(), + const SectionDivider(), actionButtons(context) ], ), diff --git a/lib/src/widgets/standard_list_row.dart b/lib/src/widgets/list_row.dart similarity index 96% rename from lib/src/widgets/standard_list_row.dart rename to lib/src/widgets/list_row.dart index e174acc50..40824fe59 100644 --- a/lib/src/widgets/standard_list_row.dart +++ b/lib/src/widgets/list_row.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class AnotherStandardListRow extends StatelessWidget { - AnotherStandardListRow( +class ListRow extends StatelessWidget { + ListRow( {required this.title, required this.value, this.titleFontSize = 14, From d9ec7978b689d392fe9cd2a613be930025dfa05b Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 28 Dec 2022 22:20:37 +0200 Subject: [PATCH 084/100] Add test variables to workflow for external PR support --- .github/workflows/pr_test_build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 00fd16199..3a439c556 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -8,6 +8,9 @@ jobs: test: runs-on: ubuntu-18.04 + env: + STORE_PASS: test@cake_wallet + KEY_PASS: test@cake_wallet steps: - uses: actions/checkout@v2 @@ -63,12 +66,12 @@ jobs: - name: Generate KeyStore run: | cd /opt/android/cake_wallet/android/app - keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass ${{ secrets.STORE_PASS }} -keypass ${{ secrets.KEY_PASS }} + keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass $STORE_PASS -keypass $KEY_PASS - name: Generate key properties run: | cd /opt/android/cake_wallet - flutter packages pub run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=${{ secrets.STORE_PASS }} keyPassword=${{ secrets.KEY_PASS }} + flutter packages pub run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=$STORE_PASS keyPassword=$KEY_PASS - name: Generate localization run: | @@ -141,6 +144,7 @@ jobs: path: /opt/android/cake_wallet/build/app/outputs/apk/release/test-apk/ - name: Send Test APK + continue-on-error: true run: | cd /opt/android/cake_wallet var=$(curl --upload-file build/app/outputs/apk/release/app-release.apk https://transfer.sh/$GITHUB_HEAD_REF.apk -H "Max-Days: 10") From 033560cf3ac777f4be7afef6e63581d77398782a Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 29 Dec 2022 03:52:40 +0200 Subject: [PATCH 085/100] Test upgrading haven repo --- scripts/android/build_haven.sh | 2 +- scripts/ios/build_haven.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/android/build_haven.sh b/scripts/android/build_haven.sh index 6d22f7778..5f3c9e50a 100755 --- a/scripts/android/build_haven.sh +++ b/scripts/android/build_haven.sh @@ -1,7 +1,7 @@ #!/bin/sh . ./config.sh -HAVEN_VERSION=tags/v2.2.2 +HAVEN_VERSION=tags/v3.0.0 HAVEN_SRC_DIR=${WORKDIR}/haven git clone https://github.com/haven-protocol-org/haven-main.git ${HAVEN_SRC_DIR} diff --git a/scripts/ios/build_haven.sh b/scripts/ios/build_haven.sh index cc79d7a26..3199e3286 100755 --- a/scripts/ios/build_haven.sh +++ b/scripts/ios/build_haven.sh @@ -4,7 +4,7 @@ HAVEN_URL="https://github.com/haven-protocol-org/haven-main.git" HAVEN_DIR_PATH="${EXTERNAL_IOS_SOURCE_DIR}/haven" -HAVEN_VERSION=tags/v2.2.2 +HAVEN_VERSION=tags/v3.0.0 BUILD_TYPE=release PREFIX=${EXTERNAL_IOS_DIR} DEST_LIB_DIR=${EXTERNAL_IOS_LIB_DIR}/haven From 17751f236336a6736548298cd5d86328c164200e Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 29 Dec 2022 16:02:09 +0200 Subject: [PATCH 086/100] Fix haven currencies not getting serialized --- cw_core/lib/crypto_currency.dart | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index 42e72d2eb..3ee2b5e15 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -67,6 +67,22 @@ class CryptoCurrency extends EnumerableItem with Serializable { CryptoCurrency.stx, ]; + static const havenCurrencies = [ + xag, + xau, + xaud, + xbtc, + xcad, + xchf, + xcny, + xeur, + xgbp, + xjpy, + xnok, + xnzd, + xusd, + ]; + static const xmr = CryptoCurrency(title: 'XMR', iconPath: 'assets/images/monero_icon.png', fullName: 'Monero', raw: 0, name: 'xmr'); static const ada = CryptoCurrency(title: 'ADA', iconPath: 'assets/images/ada_icon.png', fullName: 'Cardano', raw: 1, name: 'ada'); static const bch = CryptoCurrency(title: 'BCH', iconPath: 'assets/images/bch_icon.png',fullName: 'Bitcoin Cash', raw: 2, name: 'bch'); @@ -134,16 +150,16 @@ class CryptoCurrency extends EnumerableItem with Serializable { static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 61, name: 'stx'); static final Map _rawCurrencyMap = - all.fold>({}, (acc, item) { - acc.addAll({item.raw: item}); - return acc; - }); + [...all, ...havenCurrencies].fold>({}, (acc, item) { + acc.addAll({item.raw: item}); + return acc; + }); static final Map _nameCurrencyMap = - all.fold>({}, (acc, item) { - acc.addAll({item.name: item}); - return acc; - }); + [...all, ...havenCurrencies].fold>({}, (acc, item) { + acc.addAll({item.name: item}); + return acc; + }); static CryptoCurrency deserialize({required int raw}) { From 286269a9e8e2c7d4f10a672211ad6972df395770 Mon Sep 17 00:00:00 2001 From: john_r365 <67366109+johnr365@users.noreply.github.com> Date: Sat, 31 Dec 2022 20:03:24 +0000 Subject: [PATCH 087/100] Changes to language file section of README.md --- README.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c5f6dc1b2..f485ca244 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,24 @@ For instructions on how to build for Android: please view file `howto-build-andr Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull request with the changes. +## Current list of language files: + +- English +- Spanish +- French +- German +- Italian +- Portugese +- Dutch +- Polish +- Croatian +- Russian +- Ukranian +- Hindi +- Japanese +- Chinese +- Korean + ## Add a new language 1. Create a new `strings_XX.arb` file in `res/values/`, replacing XX with the language's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1). @@ -91,9 +109,15 @@ Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull reque `"welcome" : "Welcome to",` -> `"welcome" : "XXX",` -3. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language. +3. For strings where there is a variable, denoted by a $ symbol and braces, such as ${status}, the string in braces should not be translated. For example, when editing line 106: -4. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. +"time" : "${minutes}m ${seconds}s" + +The only parts to be translated, if needed, are the values m and s after the variables. + +4. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language. + +5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. ## Add a new fiat currency @@ -103,4 +127,4 @@ Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull reque 3. Add the raw mapping underneath in `lib/entities/fiat_currency.dart` following the same format as the others. -4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. +4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. \ No newline at end of file From 993e8b7ebf763450aabb8574bc7c65f4e94813c9 Mon Sep 17 00:00:00 2001 From: Serhii Date: Tue, 3 Jan 2023 23:59:08 +0200 Subject: [PATCH 088/100] fix disappearance of pending transaction --- cw_bitcoin/lib/electrum_transaction_history.dart | 6 ++---- cw_bitcoin/lib/electrum_transaction_info.dart | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart index f8662eb95..9174fb3f8 100644 --- a/cw_bitcoin/lib/electrum_transaction_history.dart +++ b/cw_bitcoin/lib/electrum_transaction_history.dart @@ -72,7 +72,7 @@ abstract class ElectrumTransactionHistoryBase txs.entries.forEach((entry) { final val = entry.value; - if (val is Map) { + if (val is Map) { final tx = ElectrumTransactionInfo.fromJson(val, walletInfo.type); _updateOrInsert(tx); } @@ -85,9 +85,6 @@ abstract class ElectrumTransactionHistoryBase } void _updateOrInsert(ElectrumTransactionInfo transaction) { - if (transaction.id == null) { - return; - } if (transactions[transaction.id] == null) { transactions[transaction.id] = transaction; @@ -98,6 +95,7 @@ abstract class ElectrumTransactionHistoryBase originalTx?.height = transaction.height; originalTx?.date ??= transaction.date; originalTx?.isPending = transaction.isPending; + originalTx?.direction = transaction.direction; } } } diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart index 6e85a2f88..8d6ef0fea 100644 --- a/cw_bitcoin/lib/electrum_transaction_info.dart +++ b/cw_bitcoin/lib/electrum_transaction_info.dart @@ -228,9 +228,7 @@ class ElectrumTransactionInfo extends TransactionInfo { m['id'] = id; m['height'] = height; m['amount'] = amount; - // FIX-ME: Hardcoded value - // m['direction'] = direction.index; - m['direction'] = 0; + m['direction'] = direction.index; m['date'] = date.millisecondsSinceEpoch; m['isPending'] = isPending; m['confirmations'] = confirmations; From 38b21e325410c429b7f2e754df84a225c75ea6b0 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 4 Jan 2023 20:39:36 +0200 Subject: [PATCH 089/100] new version - cake wallet: v4.5.6 - monero: v1.2.5 --- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 979a60e9d..c74d97c0f 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,14 +14,14 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.4" -MONERO_COM_BUILD_NUMBER=35 +MONERO_COM_VERSION="1.2.5" +MONERO_COM_BUILD_NUMBER=36 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.5" -CAKEWALLET_BUILD_NUMBER=140 +CAKEWALLET_VERSION="4.5.6" +CAKEWALLET_BUILD_NUMBER=141 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" diff --git a/scripts/ios/app_env.sh b/scripts/ios/app_env.sh index 1965d1e41..8588bfcb2 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.4" -MONERO_COM_BUILD_NUMBER=32 +MONERO_COM_VERSION="1.2.5" +MONERO_COM_BUILD_NUMBER=33 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.5" -CAKEWALLET_BUILD_NUMBER=137 +CAKEWALLET_VERSION="4.5.6" +CAKEWALLET_BUILD_NUMBER=138 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From 7551181b09be0fe8a9d511f5d5324ed3ac898a95 Mon Sep 17 00:00:00 2001 From: rosedaler <121954045+maddymodd@users.noreply.github.com> Date: Thu, 5 Jan 2023 11:39:08 -0500 Subject: [PATCH 090/100] Add thai language localization file --- lib/entities/language_service.dart | 6 +- res/values/strings_th.arb | 678 +++++++++++++++++++++++++++++ 2 files changed, 682 insertions(+), 2 deletions(-) create mode 100644 res/values/strings_th.arb diff --git a/lib/entities/language_service.dart b/lib/entities/language_service.dart index 7dccc59c0..3b5f68eb5 100644 --- a/lib/entities/language_service.dart +++ b/lib/entities/language_service.dart @@ -18,7 +18,8 @@ class LanguageService { 'uk': 'Українська (Ukrainian)', 'zh': '中文 (Chinese)', 'hr': 'Hrvatski (Croatian)', - 'it': 'Italiano (Italian)' + 'it': 'Italiano (Italian)', + 'th': 'ภาษาไทย (Thai)' }; static const Map localeCountryCode = { @@ -36,7 +37,8 @@ class LanguageService { 'uk': 'ukr', 'zh': 'chn', 'hr': 'hrv', - 'it': 'ita' + 'it': 'ita', + 'th': 'tha' }; static final list = {}; diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb new file mode 100644 index 000000000..f39025e3d --- /dev/null +++ b/res/values/strings_th.arb @@ -0,0 +1,678 @@ +{ + "welcome" : "ยินดีต้อนรับสู่", + "cake_wallet" : "Cake Wallet", + "first_wallet_text" : "กระเป๋าสตางค์ที่สวยงามสำหรับ Monero, Bitcoin, Litecoin และ Haven", + "please_make_selection" : "โปรดเลือกตามด้านล่างเพื่อสร้างหรือกู้กระเป๋าของคุณ", + "create_new" : "สร้างกระเป๋าใหม่", + "restore_wallet" : "กู้กระเป๋า", + + "monero_com": "Monero.com ของ Cake Wallet", + "monero_com_wallet_text": "กระเป๋าสตางค์ที่สวยงามสำหรับ Monero", + + "haven_app": "Haven ของ Cake Wallet", + "haven_app_wallet_text": "กระเป๋าสตางค์ที่สวยงามสำหรับ Haven", + + "accounts" : "บัญชี", + "edit" : "แก้ไข", + "account" : "บัญชี", + "add" : "เพิ่ม", + + + "address_book" : "สมุดที่อยู่", + "contact" : "ผู้ติดต่อ", + "please_select" : "โปรดเลือก:", + "cancel" : "ยกเลิก", + "ok" : "ตกลง", + "contact_name" : "ชื่อผู้ติดต่อ", + "reset" : "รีเซ็ต", + "save" : "บันทึก", + "address_remove_contact" : "ลบผู้ติดต่อ", + "address_remove_content" : "คุณแน่ใจหรือว่าต้องการลบผู้ติดต่อที่เลือก?", + + + "authenticated" : "ได้รับการยืนยันสิทธิ์", + "authentication" : "การยืนยันสิทธิ์", + "failed_authentication" : "การยืนยันสิทธิ์ล้มเหลว ${state_error}", + + + "wallet_menu" : "เมนู", + "Blocks_remaining" : "${status} บล็อกที่เหลืออยู่", + "please_try_to_connect_to_another_node" : "โปรดลองเชื่อมต่อกับโหนดอื่น", + "xmr_hidden" : "ซ่อน", + "xmr_available_balance" : "ยอดคงเหลือที่สามารถใช้งานได้", + "xmr_full_balance" : "ยอดคงเหลือแบบเต็ม", + "send" : "ส่ง", + "receive" : "รับ", + "transactions" : "ธุรกรรม", + "incoming" : "ขาเข้า", + "outgoing" : "ขาออก", + "transactions_by_date" : "ธุรกรรมตามวันที่", + "trades" : "การซื้อขาย", + "filter_by": "กรองตาม", + "today" : "วันนี้", + "yesterday" : "เมื่อวาน", + "received" : "รับ", + "sent" : "ส่ง", + "pending" : " (อยู่ระหว่างดำเนินการ)", + "rescan" : "สแกนใหม่", + "reconnect" : "เชื่อมต่อใหม่", + "wallets" : "กระเป๋า", + "show_seed" : "แสดงซีด", + "show_keys" : "แสดงซีด/คีย์", + "address_book_menu" : "สมุดที่อยู่", + "reconnection" : "เชื่อมต่อใหม่", + "reconnect_alert_text" : "คุณแน่ใจหรือไม่ว่าต้องการเชื่อมต่อใหม่?", + + + "exchange" : "แลกเปลี่ยน", + "clear" : "ล้าง", + "refund_address" : "ที่อยู่สำหรับส่งคืน", + "change_exchange_provider" : "เปลี่ยนผู้ให้บริการแลกเปลี่ยน", + "you_will_send" : "แปลงจาก", + "you_will_get" : "แปลงเป็น", + "amount_is_guaranteed" : "จำนวนที่จะได้รับมีการรับประกัน", + "amount_is_estimate" : "จำนวนที่จะได้รับเป็นการประมาณการ", + "powered_by" : "พัฒนาขึ้นโดย ${title}", + "error" : "ข้อผิดพลาด", + "estimated" : "ประมาณการ", + "min_value" : "ขั้นต่ำ: ${value} ${currency}", + "max_value" : "ขั้นสูง: ${value} ${currency}", + "change_currency" : "เปลี่ยนสกุลเงิน", + "overwrite_amount" : "เขียนทับจำนวน", + "qr_payment_amount" : "QR code นี้มีจำนวนการชำระเงิน คุณต้องการเขียนทับค่าปัจจุบันหรือไม่?", + + "copy_id" : "คัดลอก ID", + "exchange_result_write_down_trade_id" : "โปรดคัดลอกหรือบันทึก ID ของการซื้อขายเพื่อดำเนินการต่อไป", + "trade_id" : "ID การซื้อขาย:", + "copied_to_clipboard" : "คัดลอกไปยังหน่วยความจำของคอมพิวเตอร์", + "saved_the_trade_id" : "ฉันได้บันทึก ID ของการซื้อขายแล้ว", + "fetching" : "กำลังโหลด", + "id" : "ID: ", + "amount" : "จำนวน: ", + "payment_id" : "ID การชำระเงิน: ", + "status" : "สถานะ: ", + "offer_expires_in" : "ข้อเสนอจะหมดอายุใน: ", + "trade_is_powered_by" : "การซื้อขายนี้จัดสร้างโดย ${provider}", + "copy_address" : "คัดลอกที่อยู่", + "exchange_result_confirm" : "โดยกดปุ่มยืนยัน, คุณจะส่ง ${fetchingLabel} ${from} จากกระเป๋าของคุณที่เรียกว่า ${walletName} ไปยังที่อยู่ที่แสดงข้างล่าง หรือคุณสามารถส่งจากกระเป๋าภายนอกไปยังที่อยู่/รหัส QR ด้านล่าง\n\nโปรดกดปุ่มยืนยันเพื่อดำเนินการต่อหรือกลับไปเปลี่ยนจำนวน", + "exchange_result_description" : "คุณต้องส่งอย่างน้อย ${fetchingLabel} ${from} ไปยังที่อยู่ที่แสดงบนหน้าถัดไป หากคุณส่งจำนวนน้อยกว่า ${fetchingLabel} ${from} อาจจะไม่ถูกแปลงและอาจไม่ถูกเรียกคืน", + "exchange_result_write_down_ID" : "*โปรดคัดลอกหรือเขียนรหัสของคุณด้านบน", + "confirm" : "ยืนยัน", + "confirm_sending" : "ยืนยันการส่ง", + "commit_transaction_amount_fee" : "ยืนยันธุรกรรม\nจำนวน: ${amount}\nค่าธรรมเนียม: ${fee}", + "sending" : "กำลังส่ง", + "transaction_sent" : "ธุรกรรมถูกส่ง!", + "expired" : "หมดอายุ", + "time" : "${minutes}m ${seconds}s", + "send_xmr" : "ส่ง XMR", + "exchange_new_template" : "เทมเพลทใหม่", + + "faq" : "คำถามที่พบบ่อย", + + + "enter_your_pin" : "ใส่ PIN ของคุณ", + "loading_your_wallet" : "กำลังโหลดกระเป๋าของคุณ", + + + "new_wallet" : "กระเป๋าใหม่", + "wallet_name" : "ชื่อกระเป๋า", + "continue_text" : "ดำเนินการต่อ", + "choose_wallet_currency" : "โปรดเลือกสกุลเงินของกระเป๋า:", + + + "node_new" : "โหนดใหม่", + "node_address" : "ที่อยู่โหนด", + "node_port" : "พอร์ตโหนด", + "login" : "เข้าสู่ระบบ", + "password" : "รหัสผ่าน", + "nodes" : "โหนด", + "node_reset_settings_title" : "รีเซ็ตการตั้งค่า", + "nodes_list_reset_to_default_message" : "คุณแน่ใจหรือว่าต้องการรีเซ็ตการตั้งค่าเป็นค่าเริ่มต้น?", + "change_current_node" : "คุณแน่ใจหรือว่าต้องการเปลี่ยนโหนดปัจจุบันเป็น ${node}?", + "change" : "เปลี่ยน", + "remove_node" : "ลบโหนด", + "remove_node_message" : "คุณแน่ใจหรือว่าต้องการลบโหนดที่เลือก?", + "remove" : "ลบ", + "delete" : "ลบ", + "add_new_node" : "เพิ่มโหนดใหม่", + "change_current_node_title" : "เปลี่ยนโหนดปัจจุบัน", + "node_test" : "ทดสอบ", + "node_connection_successful" : "เชื่อมต่อสำเร็จ", + "node_connection_failed" : "เชื่อมต่อล้มเหลว", + "new_node_testing" : "การทดสอบโหนดใหม่", + + + "use" : "สลับไปที่ ", + "digit_pin" : "-หลัก PIN", + + + "share_address" : "แชร์ที่อยู่", + "receive_amount" : "จำนวน", + "subaddresses" : "ที่อยู่ย่อย", + "addresses" : "ที่อยู่", + "scan_qr_code" : "สแกน QR code เพื่อรับที่อยู่", + "qr_fullscreen" : "แตะเพื่อเปิดหน้าจอ QR code แบบเต็มจอ", + "rename" : "เปลี่ยนชื่อ", + "choose_account" : "เลือกบัญชี", + "create_new_account" : "สร้างบัญชีใหม่", + "accounts_subaddresses" : "บัญชีและที่อยู่ย่อย", + + + "restore_restore_wallet" : "กู้กระเป๋า", + "restore_title_from_seed_keys" : "กู้จาก seed/keys", + "restore_description_from_seed_keys" : "เรียกกระเป๋าของคุณกลับมาจาก seed/keys ที่คุณได้บันทึกไว้ในที่ปลอดภัย", + "restore_next" : "ถัดไป", + "restore_title_from_backup" : "กู้จากการสำรองข้อมูล", + "restore_description_from_backup" : "คุณสามารถกู้แอพ Cake Wallet ทั้งหมดจากไฟล์สำรองข้อมูลของคุณ", + "restore_seed_keys_restore" : "กู้จาก Seed/Keys", + "restore_title_from_seed" : "กู้จาก seed", + "restore_description_from_seed" : "กู้กระเป๋าของคุณจากรหัสผสมของ 25 คำหรือ 13 คำ", + "restore_title_from_keys" : "กู้จาก keys", + "restore_description_from_keys" : "กู้กระเป๋าของคุณจากการกดปุ่มที่สร้างขึ้นจาก private keys ของคุณที่บันทึกไว้", + "restore_wallet_name" : "ชื่อกระเป๋า", + "restore_address" : "ที่อยู่", + "restore_view_key_private" : "คีย์สำหรับดู (ส่วนตัว)", + "restore_spend_key_private" : "คีย์สำหรับใช้ (ส่วนตัว)", + "restore_recover" : "กู้", + "restore_wallet_restore_description" : "คำอธิบายการกู้กระเป๋า", + "restore_new_seed" : "ซีดใหม่", + "restore_active_seed" : "ซีดที่ใช้งานอยู่", + "restore_bitcoin_description_from_seed" : "กู้กระเป๋าของคุณจากรหัสผสมของ 24 คำ", + "restore_bitcoin_description_from_keys" : "กู้กระเป๋าของคุณจากสตริง WIF ที่สร้างขึ้นจากคีย์ส่วนตัวของคุณ", + "restore_bitcoin_title_from_keys" : "กู้จาก WIF", + "restore_from_date_or_blockheight" : "โปรดป้อนวันที่หลายวันก่อนที่คุณสร้างกระเป๋านี้ หรือหากคุณรู้ความสูงของบล็อก (blockheight) โปรดป้อนมันแทน", + + + "seed_reminder" : "โปรดเขียนข้อมูลนี้ลงสมุดเพื่อความปลอดภัยหากคุณสูญเสียหรือล้างโทรศัพท์ของคุณ", + "seed_title" : "Seed", + "seed_share" : "แบ่งปัน seed", + "copy" : "คัดลอก", + + + "seed_language_choose" : "โปรดเลือกภาษาของ seed:", + "seed_choose" : "เลือกภาษาของ seed", + "seed_language_next" : "ถัดไป", + "seed_language_english" : "อังกฤษ", + "seed_language_chinese" : "จีน", + "seed_language_dutch" : "ดัตช์", + "seed_language_german" : "เยอรมัน", + "seed_language_japanese" : "ญี่ปุ่น", + "seed_language_portuguese" : "โปรตุเกส", + "seed_language_russian" : "รัสเซีย", + "seed_language_spanish" : "สเปน", + "seed_language_french" : "ฝรั่งเศส", + "seed_language_italian" : "อิตาลี", + + + "send_title" : "ส่ง", + "send_your_wallet" : "กระเป๋าของคุณ", + "send_address" : "ที่อยู่ ${cryptoCurrency}", + "send_payment_id" : "ID การชำระเงิน (ไม่จำเป็น)", + "all" : "ทั้งหมด", + "send_error_minimum_value" : "จำนวนขั้นต่ำของจำนวนเงินคือ 0.01", + "send_error_currency" : "สกุลเงินสามารถเป็นเลขเท่านั้น", + "send_estimated_fee" : "ค่าธรรมเนียมที่คาดการณ์:", + "send_priority" : "ในขณะนี้ค่าธรรมเนียมถูกตั้งค่าเป็นความสำคัญ ${transactionPriority} \nความสำคัญของธุรกรรมสามารถปรับได้ในการตั้งค่า", + "send_creating_transaction" : "กำลังสร้างธุรกรรม", + "send_templates" : "แม่แบบ", + "send_new" : "ใหม่", + "send_amount" : "จำนวน:", + "send_fee" : "ค่าธรรมเนียม:", + "send_name" : "ชื่อ", + "send_got_it" : "เข้าใจ", + "send_sending" : "กำลังส่ง...", + "send_success" : "คุณได้ส่ง ${crypto} เรียบร้อยแล้ว", + + + "settings_title" : "การตั้งค่า", + "settings_nodes" : "จุดเชื่อมต่อ", + "settings_current_node" : "จุดเชื่อมต่อปัจจุบัน", + "settings_wallets" : "กระเป๋าสตางค์", + "settings_display_balance" : "แสดงยอดคงเหลือ", + "settings_currency" : "สกุลเงิน", + "settings_fee_priority" : "ความสำคัญของค่าธรรมเนียม", + "settings_save_recipient_address" : "บันทึกที่อยู่ผู้รับ", + "settings_personal" : "ส่วนตัว", + "settings_change_pin" : "เปลี่ยน PIN", + "settings_change_language" : "เปลี่ยนภาษา", + "settings_allow_biometrical_authentication" : "อนุญาตให้ใช้การยืนยันตัวตนทางระบบชีวภาพ", + "settings_dark_mode" : "โหมดดำ", + "settings_transactions" : "ธุรกรรม", + "settings_trades" : "การซื้อขาย", + "settings_display_on_dashboard_list" : "แสดงบนรายการแดชบอร์ด", + "settings_all" : "ทั้งหมด", + "settings_only_trades" : "เฉพาะการซื้อขาย", + "settings_only_transactions" : "เฉพาะธุรกรรม", + "settings_none" : "ไม่มี", + "settings_support" : "สนับสนุน", + "settings_terms_and_conditions" : "ข้อกำหนดและเงื่อนไข", + "pin_is_incorrect" : "PIN ไม่ถูกต้อง", + + + "setup_pin" : "ตั้งค่า PIN", + "enter_your_pin_again" : "ใส่ PIN ของคุณอีกครั้ง", + "setup_successful" : "การตั้งค่า PIN ของคุณสำเร็จแล้ว!", + + "wallet_keys" : "ซีดของกระเป๋า/คีย์", + "wallet_seed" : "ซีดของกระเป๋า", + "private_key" : "คีย์ส่วนตัว", + "public_key" : "คีย์สาธารณะ", + "view_key_private" : "คีย์มุมมอง (ส่วนตัว)", + "view_key_public" : "คีย์มุมมอง (สาธารณะ)", + "spend_key_private" : "คีย์จ่าย (ส่วนตัว)", + "spend_key_public" : "คีย์จ่าย (สาธารณะ)", + "copied_key_to_clipboard" : "คัดลอก ${key} ไปยัง Clipboard แล้ว" + + + "new_subaddress_title" : "ที่อยู่ใหม่", + "new_subaddress_label_name" : "ชื่อป้ายกำกับ", + "new_subaddress_create" : "สร้าง", + + "address_label" : "ป้ายกำกับที่อยู่", + + "subaddress_title" : "รายการที่อยู่ย่อย", + + "trade_details_title" : "รายละเอียดการแลกเปลี่ยน", + "trade_details_id" : "รหัส", + "trade_details_state" : "สถานะ", + "trade_details_fetching" : "กำลังเรียกข้อมูล", + "trade_details_provider" : "ผู้ให้บริการ", + "trade_details_created_at" : "สร้างเมื่อ", + "trade_details_pair" : "คู่", + "trade_details_copied" : "${title} คัดลอกไปยัง Clipboard" + + + "trade_history_title" : "ประวัติการซื้อขาย", + + + "transaction_details_title" : "รายละเอียดการทำรายการ", + "transaction_details_transaction_id" : "ไอดีการทำรายการ", + "transaction_details_date" : "วันที่", + "transaction_details_height" : "ความสูง", + "transaction_details_amount" : "จำนวน", + "transaction_details_fee" : "ค่าธรรมเนียม", + "transaction_details_copied" : "${title} ถูกคัดลอกไปยังคลิปบอร์ด", + "transaction_details_recipient_address" : "ที่อยู่ผู้รับ", + + + "wallet_list_title" : "กระเป๋า Monero", + "wallet_list_create_new_wallet" : "สร้างกระเป๋าใหม่", + "wallet_list_restore_wallet" : "กู้กระเป๋า", + "wallet_list_load_wallet" : "โหลดกระเป๋า", + "wallet_list_loading_wallet" : "กำลังโหลดกระเป๋า ${wallet_name}", + "wallet_list_failed_to_load" : "ไม่สามารถโหลดกระเป๋า ${wallet_name} ได้ ${error}", + "wallet_list_removing_wallet" : "กำลังลบกระเป๋า ${wallet_name}", + "wallet_list_failed_to_remove" : "ไม่สามารถลบกระเป๋า ${wallet_name} ได้ ${error}", + + + "widgets_address" : "ที่อยู่", + "widgets_restore_from_blockheight" : "กู้คืนจากระดับบล็อก", + "widgets_restore_from_date" : "กู้คืนจากวันที่", + "widgets_or" : "หรือ", + "widgets_seed" : "ซีด", + + + "router_no_route" : "ไม่มีเส้นทางที่กำหนดไว้สำหรับ ${name}", + + + "error_text_account_name" : "ชื่อบัญชีสามารถเป็นเพียงตัวอักษรหรือตัวเลขเท่านั้น\nและต้องมีความยาวระหว่าง 1 ถึง 15 ตัวอักษร", + "error_text_contact_name" : "ชื่อผู้ติดต่อไม่สามารถมีสัญลักษณ์ ` , '\" ได้\nและต้องมีความยาวระหว่าง 1 ถึง 32 ตัวอักษร", + "error_text_address" : "ที่อยู่กระเป๋าจะต้องสอดคล้องกับประเภท\nของเหรียญคริปโตเนียม", + "error_text_node_address" : "โปรดป้อนที่อยู่ iPv4", + "error_text_node_port" : "พอร์ตโหนดสามารถมีตัวเลขเท่านั้นระหว่าง 0 ถึง 65535", + "error_text_payment_id" : "Payment ID สามารถมีขนาดระหว่าง 16 ถึง 64 ตัวอักษรตามแบบ hex", + "error_text_xmr" : "มูลค่า XMR ไม่สามารถเกินยอดคงเหลือได้\nจำนวนสตริงทศนิยมต้องน้อยกว่าหรือเท่ากับ 12", + "error_text_fiat" : "มูลค่าของจำนวนเงินไม่สามารถเกินยอดคงเหลือได้\nจำนวนสตริงทศนิยมต้องน้อยกว่าหรือเท่ากับ 2", + "error_text_subaddress_name" : "ชื่อสำหรับที่อยู่ย่อยจะต้องประกอบด้วยตัวอักษร ตัวเลข และสัญลักษณ์ _ - และมีความยาวระหว่าง 1 ถึง 20 ตัวอักษร", + "error_text_amount" : "จำนวนจะต้องประกอบด้วยตัวเลขเท่านั้น", + "error_text_wallet_name" : "ชื่อกระเป๋าสตางค์จะต้องประกอบด้วยตัวอักษร ตัวเลข และสัญลักษณ์ _ - และมีความยาวระหว่าง 1 ถึง 33 ตัวอักษร", + "error_text_keys" : "คีย์ของกระเป๋าสตางค์จะต้องประกอบด้วยตัวอักษรฐาน 16 จำนวน 64 ตัว", + "error_text_crypto_currency" : "จำนวนทศนิยมจะต้องน้อยกว่าหรือเท่ากับ 12", + "error_text_minimal_limit" : "การซื้อขายกับ ${provider} ไม่สามารถดำเนินการได้ จำนวนน้อยกว่าขั้นต่ำ: ${min} ${currency}", + "error_text_maximum_limit" : "การซื้อขายกับ ${provider} ไม่สามารถดำเนินการได้ จำนวนมากกว่าขั้นสูง: ${max} ${currency}", + "error_text_limits_loading_failed" : "การซื้อขายกับ ${provider} ไม่สามารถดำเนินการได้ ไม่สามารถโหลดขอบเขตได้", + "error_text_template" : "ชื่อแม่แบบและที่อยู่ไม่สามารถมีสัญลักษณ์ ` , '\" และต้องมีความยาวระหว่าง 1 ถึง 106 ตัวอักษร", + + + "auth_store_ban_timeout" : "หมดเวลาห้าม", + "auth_store_banned_for" : "ถูกห้ามสำหรับ ", + "auth_store_banned_minutes" : " นาที", + "auth_store_incorrect_password" : "รหัสผ่านไม่ถูกต้อง", + "wallet_store_monero_wallet" : "กระเป๋า Monero", + "wallet_restoration_store_incorrect_seed_length" : "ความยาวของซีดไม่ถูกต้อง", + + + "full_balance" : "ยอดคงเหลือทั้งหมด", + "available_balance" : "ยอดคงเหลือที่ใช้งานได้", + "hidden_balance" : "ยอดคงเหลือซ่อนอยู่", + + + "sync_status_syncronizing" : "กำลังซิงโครไนซ์", + "sync_status_syncronized" : "ซิงโครไนซ์แล้ว", + "sync_status_not_connected" : "ไม่ได้เชื่อมต่อ", + "sync_status_starting_sync" : "กำลังเริ่มซิงโครไนซ์", + "sync_status_failed_connect" : "การเชื่อมต่อล้มเหลว", + "sync_status_connecting" : "กำลังเชื่อมต่อ", + "sync_status_connected" : "เชื่อมต่อแล้ว", + "sync_status_attempting_sync" : "พยายามซิงโครไนซ์", + + + "transaction_priority_slow" : "ช้า", + "transaction_priority_regular" : "ปกติ", + "transaction_priority_medium" : "ปานกลาง", + "transaction_priority_fast" : "เร็ว", + "transaction_priority_fastest" : "เร็วที่สุด", + + + "trade_for_not_created" : "การแลกเปลี่ยนสำหรับ ${title} ยังไม่ได้ถูกสร้างขึ้น", + "trade_not_created" : "การแลกเปลี่ยนยังไม่ได้ถูกสร้าง", + "trade_id_not_found" : "ไม่พบการแลกเปลี่ยน ${tradeId} ของ ${title}", + "trade_not_found" : "ไม่พบการแลกเปลี่ยน", + + + "trade_state_pending" : "รอดำเนินการ", + "trade_state_confirming" : "กำลังยืนยัน", + "trade_state_trading" : "กำลังแลกเปลี่ยน", + "trade_state_traded" : "ถูกแลกเปลี่ยน", + "trade_state_complete" : "เสร็จสมบูรณ์", + "trade_state_to_be_created" : "จะถูกสร้าง", + "trade_state_unpaid" : "ยังไม่ได้จ่าย", + "trade_state_underpaid" : "จ่ายไม่ครบ", + "trade_state_paid_unconfirmed" : "จ่ายแล้วแต่ยังไม่ได้ยืนยัน", + "trade_state_paid" : "จ่ายแล้ว", + "trade_state_btc_sent" : "ส่ง BTC แล้ว", + "trade_state_timeout" : "เวลาหมด", + "trade_state_created" : "ถูกสร้าง", + "trade_state_finished" : "เสร็จสิ้น", + + "change_language" : "เปลี่ยนภาษา", + "change_language_to" : "เปลี่ยนภาษาเป็น ${language}?", + + "paste" : "วาง", + "restore_from_seed_placeholder" : "โปรดป้อนหรือวาง seed ของคุณที่นี่", + "add_new_word" : "เพิ่มคำใหม่", + "incorrect_seed" : "ข้อความที่ป้อนไม่ถูกต้อง", + + "biometric_auth_reason" : "สแกนลายนิ้วมือของคุณเพื่อยืนยันตัวตน", + "version" : "เวอร์ชัน ${currentVersion}", + + "openalias_alert_title" : "พบที่อยู่", + "openalias_alert_content" : "คุณกำลังจะส่งเงินไปยัง\n${recipient_name}", + + "card_address" : "ที่อยู่:", + "buy" : "ซื้อ", + "sell": "ขาย", + + "placeholder_transactions" : "ธุรกรรมของคุณจะปรากฏที่นี่", + "placeholder_contacts" : "รายชื่อผู้ติดต่อของคุณจะปรากฏที่นี่", + + "template" : "แบบฟอร์ม", + "confirm_delete_template" : "การดำเนินการนี้จะลบแบบฟอร์มนี้ คุณต้องการดำเนินการต่อหรือไม่?", + "confirm_delete_wallet" : "การดำเนินการนี้จะลบกระเป๋านี้ คุณต้องการดำเนินการต่อหรือไม่?", + + "picker_description" : "ในการเลือก ChangeNOW หรือ MorphToken โปรดเปลี่ยนคู่แลกเปลี่ยนก่อน", + + "change_wallet_alert_title" : "เปลี่ยนกระเป๋าปัจจุบัน", + "change_wallet_alert_content" : "คุณต้องการเปลี่ยนกระเป๋าปัจจุบันเป็น ${wallet_name} หรือไม่?", + + "creating_new_wallet" : "กำลังสร้างกระเป๋าใหม่", + "creating_new_wallet_error" : "ข้อผิดพลาด: ${description}", + + "seed_alert_title" : "ความสนใจ", + "seed_alert_content" : "Seed เป็นเพียงวิธีเดียวที่จะกู้กระเป๋าของคุณ คุณได้เขียนมันขึ้นลงกระดาษหรือไม่?", + "seed_alert_back" : "กลับ", + "seed_alert_yes" : "ใช่ ฉันได้เขียน", + + "exchange_sync_alert_content" : "โปรดรอจนกว่ากระเป๋าของคุณจะถูกซิงค์", + + "pre_seed_title" : "สำคัญ", + "pre_seed_description" : "บนหน้าถัดไปคุณจะเห็นชุดของคำ ${words} คำ นี่คือ seed ของคุณที่ไม่ซ้ำใดๆ และเป็นความลับเพียงของคุณ และนี่คือเพียงวิธีเดียวที่จะกู้กระเป๋าของคุณในกรณีที่สูญหายหรือมีปัญหา มันเป็นความรับผิดชอบของคุณเพื่อเขียนมันลงบนกระดาษและจัดเก็บไว้ในที่ปลอดภัยนอกแอป Cake Wallet", + "pre_seed_button_text" : "ฉันเข้าใจ แสดง seed ของฉัน", + + "xmr_to_error" : "ข้อผิดพลาด XMR.TO", + "xmr_to_error_description" : "จำนวนไม่ถูกต้อง จำกัดขั้นสูง 8 หลักหลังจุดทศนิยม", + + "provider_error" : "ข้อผิดพลาด ${provider}", + + "use_ssl" : "ใช้ SSL", + "trusted" : "มั่นคง", + + "color_theme" : "ธีมสี", + "light_theme" : "สว่าง", + "bright_theme" : "สดใส", + "dark_theme" : "เข้ม", + "enter_your_note" : "ใส่บันทึกของคุณ...", + "note_optional" : "บันทึก (ไม่จำเป็น)", + "note_tap_to_change" : "หมายเหตุ (กดเพื่อเปลี่ยน)", + "view_in_block_explorer" : "ดูใน Block Explorer", + "view_transaction_on" : "ดูการทำธุรกรรมบน ", + "transaction_key" : "รหัสธุรกรรม", + "confirmations" : "การยืนยัน", + "recipient_address" : "ที่อยู่ผู้รับ", + + "extra_id" : "ไอดีเพิ่มเติม:", + "destination_tag" : "แท็กปลายทาง:", + "memo" : "หมายเหตุ:", + + "backup" : "สำรองข้อมูล", + "change_password" : "เปลี่ยนรหัสผ่าน", + "backup_password" : "รหัสผ่านสำรองข้อมูล", + "write_down_backup_password" : "โปรดจดรหัสผ่านสำรองข้อมูลของคุณลงบนกระดาษ ซึ่งจะใช้ในการนำเข้าไฟล์สำรองข้อมูลของคุณ", + "export_backup" : "ส่งออกข้อมูลสำรอง", + "save_backup_password" : "โปรดตรวจสอบให้แน่ใจว่าคุณได้บันทึกรหัสผ่านสำรองข้อมูลแล้ว คุณจะไม่สามารถนำเข้าไฟล์สำรองข้อมูลของคุณโดยไม่ใช้รหัสผ่านนั้น", + "backup_file" : "ไฟล์สำรองข้อมูล", + + "edit_backup_password" : "แก้ไขรหัสผ่านสำรอง", + "save_backup_password_alert" : "บันทึกรหัสผ่านสำรอง", + "change_backup_password_alert" : "ไฟล์สำรองที่ผ่านมาจะไม่สามารถนำเข้าด้วยรหัสผ่านสำรองใหม่ได้ รหัสผ่านสำรองใหม่จะถูกใช้เฉพาะสำหรับไฟล์สำรองใหม่ คุณแน่ใจหรือว่าต้องการเปลี่ยนรหัสผ่านสำรอง?", + + "enter_backup_password" : "ป้อนรหัสผ่านสำรองที่นี่", + "select_backup_file" : "เลือกไฟล์สำรอง", + "import" : "นำเข้า", + "please_select_backup_file" : "โปรดเลือกไฟล์สำรองและป้อนรหัสผ่านสำรอง", + + "fixed_rate": "อัตราคงที่", + "fixed_rate_alert": "คุณจะสามารถป้อนจำนวนที่ได้รับเมื่อเลือกโหมดอัตราคงที่ คุณต้องการสลับไปที่โหมดอัตราคงที่?", + + "xlm_extra_info": "โปรดอย่าลืมระบุ Memo ID ในขณะที่ส่งธุรกรรม XLM สำหรับการแลกเปลี่ยน", + "xrp_extra_info": "โปรดอย่าลืมระบุ Destination Tag ในขณะที่ส่งธุรกรรม XRP สำหรับการแลกเปลี่ยน", + + "exchange_incorrect_current_wallet_for_xmr" : "หากคุณต้องการแลกเปลี่ยน XMR จากยอดคงเหลือ Monero ใน Cake Wallet ของคุณ กรุณาเปลี่ยนเป็นกระเป๋า Monero ก่อน", + "confirmed" : "ได้รับการยืนยัน", + "unconfirmed" : "ยังไม่ได้รับการยืนยัน", + "displayable" : "สามารถแสดงได้", + + "submit_request" : "ส่งคำขอ", + + "buy_alert_content" : "ในปัจจุบันเรารองรับการซื้อ Bitcoin และ Litecoin เท่านั้น หากต้องการซื้อ Bitcoin หรือ Litecoin โปรดสร้างหรือเปลี่ยนเป็นกระเป๋า Bitcoin หรือ Litecoin ของคุณ", + "sell_alert_content" : "ในปัจจุบันเรารองรับการขาย Bitcoin เท่านั้น หากต้องการขาย Bitcoin โปรดสร้างหรือเปลี่ยนเป็นกระเป๋า Bitcoin ของคุณ", + + "outdated_electrum_wallet_description" : "กระเป๋า Bitcoin ใหม่ที่สร้างใน Cake มี seed ขนาด 24 คำ ซึ่งจำเป็นต้องสร้างกระเป๋า Bitcoin ใหม่และโอนทุกเงินของคุณไปยังกระเป๋าใหม่ขนาด 24 คำ และหยุดใช้กระเป๋าที่มี seed ขนาด 12 คำ กรุณาทำด่วนเพื่อรักษาเงินของคุณ", + "understand" : "ฉันเข้าใจ", + + "apk_update" : "ปรับปรุง APK", + + "buy_bitcoin" : "ซื้อ Bitcoin", + "buy_with" : "ซื้อด้วย", + "moonpay_alert_text" : "มูลค่าของจำนวนต้องมากกว่าหรือเท่ากับ ${minAmount} ${fiatCurrency}", + + "outdated_electrum_wallet_receive_warning": "หากกระเป๋านี้มีซีดีที่มี 12 คำและถูกสร้างขึ้นใน Cake อย่าโอน Bitcoin เข้ากระเป๋านี้ ทุกจำนวน BTC ที่โอนเข้ากระเป๋านี้อาจสูญหาย สร้างกระเป๋าใหม่ที่มีซีดีที่มี 24 คำ (กดที่เมนูที่มุมขวาบนแล้วเลือก Wallets และเลือก Create New Wallet จากนั้นเลือก Bitcoin) และย้าย BTC ไปที่นั้นทันที กระเป๋า BTC ที่มีซีดีที่มี 24 คำของ Cake ปลอดภัย", + "do_not_show_me": "อย่าแสดงข้อความนี้อีก", + + "unspent_coins_title" : "เหรียญที่ไม่ได้ใช้", + "unspent_coins_details_title" : "รายละเอียดเหรียญที่ไม่ได้ใช้", + "freeze" : "ดักจับ", + "frozen" : "ถูกดักจับ", + "coin_control" : "การควบคุมเหรียญ (ตัวเลือก)", + + "address_detected" : "ตรวจพบที่อยู่", + "address_from_domain" : "ที่อยู่นี้มาจาก ${domain} บน Unstoppable Domains", + + "add_receiver" : "เพิ่มผู้รับอื่น ๆ (ตัวเลือก)", + + "manage_yats" : "จัดการ Yats", + "yat_alert_title" : "ส่งและรับเหรียญออนไลน์ง่ายขึ้นด้วย Yat", + "yat_alert_content" : "ผู้ใช้งาน Cake Wallet สามารถส่งและรับเหรียญออนไลน์ทุกเหรียญที่ชื่นชอบของพวกเขาได้ง่ายขึ้นด้วยชื่อผู้ใช้งานที่พิเศษที่ระบุด้วยอีโมจิ", + "get_your_yat" : "รับ Yat ของคุณ", + "connect_an_existing_yat" : "เชื่อมต่อ Yat ที่มีอยู่", + "connect_yats": "เชื่อมต่อ Yats", + "yat_address" : "ที่อยู่ Yat", + "yat" : "Yat", + "address_from_yat" : "ที่อยู่นี้มาจาก ${emoji} บน Yat", + "yat_error" : "ข้อผิดพลาดของ Yat", + "yat_error_content" : "ไม่มีที่อยู่ที่เชื่อมต่อกับ Yat นี้ ลองใช้ Yat อื่น", + "choose_address" : "\n\nโปรดเลือกที่อยู่:", + "yat_popup_title" : "ที่อยู่กระเป๋าของคุณสามารถถูกอัปโหลดเป็นอิโมจิ", + "yat_popup_content" : "ขณะนี้คุณสามารถส่งและรับเหรียญคริปโตใน Cake Wallet ด้วย Yat ของคุณ - ชื่อผู้ใช้ที่สั้นมีอิโมจิ คุณสามารถจัดการ Yat ได้ทุกเวลาบนหน้าจอการตั้งค่า", + "second_intro_title" : "อิโมจิที่อยู่เดียวที่จะควบคุมพวกเขาทั้งหมด", + "second_intro_content" : "Yat ของคุณเป็นอิโมจิที่อยู่เดียวที่จะแทนที่ทุกที่อยู่และเลขฐานสิบหกของคุณสำหรับเหรียญคริปโตทุกชนิด", + "third_intro_title" : "Yat ปฏิบัติตนอย่างดีกับผู้อื่น", + "third_intro_content" : "Yat อาศัยอยู่นอก Cake Wallet ด้วย ที่อยู่กระเป๋าใดๆ ทั่วโลกสามารถแทนด้วย Yat ได้อีกด้วย!" + "learn_more" : "ศึกษาเพิ่มเติม", + "search": "ค้นหา", + "search_language": "ค้นหาภาษา", + "search_currency": "ค้นหาสกุลเงิน", + "new_template" : "แม่แบบใหม่", + "electrum_address_disclaimer": "เราสร้างที่อยู่ใหม่ทุกครั้งที่คุณใช้หนึ่งอย่าง แต่ที่อยู่เก่ายังสามารถใช้ได้ต่อไป", + "wallet_name_exists": "กระเป๋าที่มีชื่อนี้มีอยู่แล้ว โปรดเลือกชื่ออื่นหรือเปลี่ยนชื่อกระเป๋าอื่นก่อน", + "market_place": "ตลาดพื้นที่", + "cake_pay_title": "บัตรของขวัญ Cake Pay", + "cake_pay_subtitle": "ซื้อบัตรของขวัญราคาถูก (สำหรับสหรัฐอเมริกาเท่านั้น)", + "cake_pay_web_cards_title": "Cake Pay Web Cards", + "cake_pay_web_cards_subtitle": "ซื้อบัตรพร้อมเงินระดับโลกและบัตรของขวัญ", + "about_cake_pay": "Cake Pay ช่วยให้คุณสามารถซื้อบัตรของขวัญง่ายๆ ด้วยการใช้สินทรัพย์อนุกรม ซื้อใช้ได้ทันทีกับมากกว่า 150,000 ร้านค้าในสหรัฐอเมริกา", + "cake_pay_account_note": "ลงทะเบียนด้วยอีเมลเพียงอย่างเดียวเพื่อดูและซื้อบัตร บางบัตรอาจมีส่วนลด!", + "already_have_account": "มีบัญชีอยู่แล้ว?", + "create_account": "สร้างบัญชี", + "privacy_policy": "นโยบายความเป็นส่วนตัว", + "welcome_to_cakepay": "ยินดีต้อนรับสู่ Cake Pay!", + "sign_up": "สมัครสมาชิก", + "forgot_password": "ลืมรหัสผ่าน", + "reset_password": "รีเซ็ตรหัสผ่าน", + "gift_cards": "บัตรของขวัญ", + "setup_your_debit_card": "ตั้งค่าบัตรเดบิตของคุณ", + "no_id_required": "ไม่จำเป็นต้องใช้บัตรประจำตัว ฝากเงินและใช้งานได้ทุกที่", + "how_to_use_card": "วิธีใช้บัตรนี้", + "purchase_gift_card": "ซื้อบัตรของขวัญ", + "verification": "การตรวจสอบ", + "fill_code": "โปรดกรอกรหัสยืนยันที่ส่งไปยังอีเมลของคุณ", + "dont_get_code": "ไม่ได้รับรหัส?", + "resend_code": "โปรดส่งอีกครั้ง", + "debit_card": "บัตรเดบิต", + "cakepay_prepaid_card": "บัตรเดบิตเติมเงินของ CakePay", + "no_id_needed": "ไม่จำเป็นต้องใช้บัตรประชาชน!", + "frequently_asked_questions": "คำถามที่พบบ่อย", + "debit_card_terms": "การเก็บรักษาและใช้หมายเลขบัตรจ่ายเงิน (และข้อมูลประจำตัวที่เกี่ยวข้องกับหมายเลขบัตรจ่ายเงิน) ในกระเป๋าดิจิทัลนี้ จะต้องยึดถือข้อกำหนดและเงื่อนไขของข้อตกลงผู้ใช้บัตรของผู้ถือบัตรที่เกี่ยวข้องกับบัตรผู้ถือบัตร ซึ่งจะมีผลตั้งแต่เวลานั้น", + "please_reference_document": "โปรดอ้างอิงเอกสารด้านล่างสำหรับข้อมูลเพิ่มเติม", + "cardholder_agreement": "ข้อตกลงผู้ใช้บัตร", + "e_sign_consent": "การยอมรับ E-Sign", + "agree_and_continue": "ยอมรับและดำเนินการต่อ", + "email_address": "ที่อยู่อีเมล", + "agree_to": "การสร้างบัญชีของคุณยอมรับเงื่อนไขของ", + "and": "และ", + "enter_code": "กรอกรหัส", + "congratulations": "ขอแสดงความยินดี!", + "you_now_have_debit_card": "ขณะนี้คุณมีบัตรเดบิต", + "min_amount": "จำนวนขั้นต่ำ: ${value}", + "max_amount": "จำนวนสูงสุด: ${value}", + "enter_amount": "กรอกจำนวน", + "billing_address_info": "ถ้าถูกร้องขอที่อยู่สำหรับการวางบิล ให้ใช้ที่อยู่จัดส่งของคุณ", + "order_physical_card": "สั่งซื้อบัตรดิบิต", + "add_value": "เพิ่มมูลค่า", + "activate": "เปิดใช้งาน", + "get_a": "รับ " + "digital_and_physical_card": "บัตรเดบิตดิจิตอลและบัตรพื้นฐาน", + "get_card_note": "ที่คุณสามารถเติมเงินด้วยสกุลเงินดิจิตอล ไม่จำเป็นต้องใส่ข้อมูลเพิ่มเติม!", + "signup_for_card_accept_terms": "ลงทะเบียนสำหรับบัตรและยอมรับเงื่อนไข", + "add_fund_to_card": "เพิ่มเงินสำรองไว้บนบัตร (ถึง ${value})", + "use_card_info_two": "เงินจะถูกแปลงค่าเป็นดอลลาร์สหรัฐเมื่อถือไว้ในบัญชีสำรองเงิน ไม่ใช่สกุลเงินดิจิตอล", + "use_card_info_three": "ใช้บัตรดิจิตอลออนไลน์หรือผ่านวิธีการชำระเงินแบบไม่ต้องใช้บัตรกระดาษ", + "hide_details" : "ซ่อนรายละเอียด", + "show_details" : "แสดงรายละเอียด", + "upto": "สูงสุด ${value}", + "discount": "ประหยัด ${value}%", + "gift_card_amount": "จำนวนบัตรของขวัญ", + "bill_amount": "จำนวนบิล", + "you_pay": "คุณจ่าย", + "tip": "เพิ่มค่าตอบแทน:", + "custom": "กำหนดเอง", + "by_cake_pay": "โดย Cake Pay", + "expires": "หมดอายุ", + "mm": "เดือน", + "yy": "ปี", + "online": "ออนไลน์", + "offline": "ออฟไลน์", + "gift_card_number": "หมายเลขบัตรของขวัญ", + "pin_number": "หมายเลข PIN", + "total_saving": "ประหยัดรวม", + "last_30_days": "30 วันล่าสุด", + "avg_savings": "ประหยัดเฉลี่ย", + "view_all": "ดูทั้งหมด", + "active_cards": "บัตรที่ใช้งานได้", + "delete_account": "ลบบัญชี", + "cards": "บัตร", + "active": "ทำงาน", + "redeemed": "แลกของขวัญ", + "gift_card_balance_note": "บัตรของขวัญที่มียอดคงเหลือจะปรากฏที่นี่", + "gift_card_redeemed_note": "บัตรของขวัญที่คุณแลกไปแล้วจะปรากฏที่นี่", + "logout": "ออกจากระบบ", + "add_tip": "เพิ่มคำแนะนำ", + "percentageOf": "${amount} ของ", + "is_percentage": "เป็น", + "search_category": "ค้นหาหมวดหมู่", + "mark_as_redeemed": "ทำเครื่องหมายว่าเคยใช้แล้ว", + "more_options": "ตัวเลือกเพิ่มเติม", + "awaiting_payment_confirmation": "รอการยืนยันการชำระเงิน", + "transaction_sent_notice": "ถ้าหน้าจอไม่ขึ้นหลังจาก 1 นาทีแล้ว ให้ตรวจสอบ block explorer และอีเมลของคุณ", + "agree": "ยอมรับ", + "in_store": "ในร้าน", + "generating_gift_card": "กำลังสร้างบัตรของขวัญ", + "payment_was_received": "การชำระเงินของคุณได้รับการรับทราบแล้ว", + "proceed_after_one_minute": "หากหน้าจอไม่ดำเนินการหลังจาก 1 นาทีโปรดตรวจสอบอีเมลของคุณ", + "order_id": "เลขที่ออร์เดอร์", + "gift_card_is_generated": "บัตรของขวัญถูกสร้างขึ้น", + "open_gift_card": "เปิดบัตรของขวัญ", + "contact_support": "ติดต่อฝ่ายสนับสนุน", + "gift_cards_unavailable": "บัตรของขวัญจะมีจำหน่ายเฉพาะกับ Monero, Bitcoin, และ Litecoin เท่านั้นในขณะนี้", + "introducing_cake_pay": "ยินดีต้อนรับสู่ Cake Pay!", + "cake_pay_learn_more": "ซื้อและเบิกบัตรของขวัญในแอพพลิเคชันทันที!\nกระแทกขวาไปซ้ายเพื่อเรียนรู้เพิ่มเติม", + "automatic": "อัตโนมัติ", + "fixed_pair_not_supported": "คู่ความสัมพันธ์ที่ถูกกำหนดไว้นี้ไม่สนับสนุนกับหุ้นที่เลือก", + "variable_pair_not_supported": "คู่ความสัมพันธ์ที่เปลี่ยนแปลงได้นี้ไม่สนับสนุนกับหุ้นที่เลือก", + "none_of_selected_providers_can_exchange": "ไม่มีผู้ให้บริการที่เลือกที่สามารถแลกเปลี่ยนนี้ได้", + "choose_one": "เลือกหนึ่งรายการ", + "choose_from_available_options": "เลือกจากตัวเลือกที่มีอยู่:", + "custom_redeem_amount": "จำนวนรับคืนที่กำหนดเอง", + "add_custom_redemption": "เพิ่มการรับคืนที่กำหนดเอง", + "remaining": "เหลืออยู่", + "delete_wallet": "ลบกระเป๋า", + "delete_wallet_confirm_message" : "คุณแน่ใจหรือว่าต้องการลบกระเป๋า${wallet_name}?", + "low_fee": "ค่าธรรมเนียมต่ำ", + "low_fee_alert": "ขณะนี้คุณกำลังใช้ค่าธรรมเนียมของเครือข่ายที่มีความสำคัญต่ำ ซึ่งอาจทำให้เกิดการรอนาน ราคาที่แตกต่างกัน หรือยกเลิกการซื้อขาย เราแนะนำให้กำหนดค่าธรรมเนียมที่สูงขึ้นเพื่อประสบการณ์ที่ดีขึ้น", + "ignor": "ละเว้น", + "use_suggested": "ใช้ที่แนะนำ", + "do_not_share_warning_text" : "อย่าแชร์ข้อมูลนี้กับใครอื่น รวมถึงฝ่ายสนับสนุนด้วย\n\nการเงินของคุณอาจถูกขโมยโดยไม่หวังดี!", + "help": "ช่วยเหลือ", + "all_transactions": "การทำธุรกรรมทั้งหมด", + "all_trades": "การซื้อขายทั้งหมด", + "connection_sync": "การเชื่อมต่อและการซิงค์", + "security_and_backup": "ความปลอดภัยและการสำรองข้อมูล", + "create_backup": "สร้างการสำรองข้อมูล", + "privacy_settings": "การตั้งค่าความเป็นส่วนตัว", + "privacy": "ความเป็นส่วนตัว", + "display_settings": "การตั้งค่าการแสดงผล", + "other_settings": "การตั้งค่าอื่น ๆ", + "require_pin_after": "ต้องการ PIN หลังจาก", + "always": "เสมอ", + "minutes_to_pin_code": "${minute} นาที", + "disable_exchange": "ปิดใช้งานการแลกเปลี่ยน", + "advanced_privacy_settings": "การตั้งค่าความเป็นส่วนตัวขั้นสูง", + "settings_can_be_changed_later" : "การตั้งค่านี้สามารถเปลี่ยนแปลงได้ภายหลังในการตั้งค่าแอพฯ", + "add_custom_node" : "เพิ่มจุดโหนดแบบกำหนดเอง", + "disable_fiat" : "ปิดใช้งานสกุลเงินตรา", + "fiat_api" : "API สกุลเงินตรา", + "disabled" : "ปิดใช้งาน", + "enabled" : "เปิดใช้งาน", + "tor_only" : "Tor เท่านั้น", + "unmatched_currencies" : "สกุลเงินของกระเป๋าปัจจุบันของคุณไม่ตรงกับของ QR ที่สแกน" +} From 768320003c568d60478fd4d61cf159aef89cb81c Mon Sep 17 00:00:00 2001 From: Mathias Herberts Date: Thu, 5 Jan 2023 22:39:32 +0100 Subject: [PATCH 091/100] Fixed FR translations. Added localized strings in contact list --- .../screens/contact/contact_list_page.dart | 4 +-- res/values/strings_en.arb | 4 ++- res/values/strings_fr.arb | 28 ++++++++++--------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/src/screens/contact/contact_list_page.dart b/lib/src/screens/contact/contact_list_page.dart index 7cd7a0157..0065b9281 100644 --- a/lib/src/screens/contact/contact_list_page.dart +++ b/lib/src/screens/contact/contact_list_page.dart @@ -72,10 +72,10 @@ class ContactListPage extends BasePage { dividerThemeColor: Theme.of(context).primaryTextTheme.caption!.decorationColor!, sectionTitleBuilder: (_, int sectionIndex) { - var title = 'Contacts'; + var title = S.current.contact_list_contacts; if (sectionIndex == 0) { - title = 'My wallets'; + title = S.current.contact_list_wallets; } return Container( diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 548ba35c0..e9a0c4d49 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -677,5 +677,7 @@ "disabled": "Disabled", "enabled": "Enabled", "tor_only": "Tor only", - "unmatched_currencies": "Your current wallet's currency does not match that of the scanned QR" + "unmatched_currencies": "Your current wallet's currency does not match that of the scanned QR", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 2168e31a2..99fbcd282 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -534,7 +534,7 @@ "search_currency": "Rechercher une devise", "new_template" : "Nouveau Modèle", "electrum_address_disclaimer": "Nous générons de nouvelles adresses à chaque fois que vous en utilisez une, mais les adresses précédentes continuent à fonctionner", - "wallet_name_exists": "Un portefeuille portant ce nom existe déjà", + "wallet_name_exists": "Un portefeuille (wallet) portant ce nom existe déjà", "market_place": "Place de marché", "cake_pay_title": "Cartes cadeaux Cake Pay", "cake_pay_subtitle": "Achetez des cartes-cadeaux à prix réduit (États-Unis uniquement)", @@ -562,7 +562,7 @@ "cakepay_prepaid_card": "Carte de débit prépayée Cake Pay", "no_id_needed": "Aucune pièce d'identité nécessaire !", "frequently_asked_questions": "Foire aux questions", - "debit_card_terms": "Le stockage et l'utilisation de votre numéro de carte de paiement (et des informations d'identification correspondant à votre numéro de carte de paiement) dans ce portefeuille numérique sont soumis aux conditions générales de l'accord du titulaire de carte applicable avec l'émetteur de la carte de paiement, en vigueur à partir de de temps en temps.", + "debit_card_terms": "Le stockage et l'utilisation de votre numéro de carte de paiement (et des informations d'identification correspondant à votre numéro de carte de paiement) dans ce portefeuille numérique peuvent être soumis aux conditions générales de l'accord du titulaire de carte parfois en vigueur avec l'émetteur de la carte de paiement.", "please_reference_document": "Veuillez vous référer aux documents ci-dessous pour plus d'informations.", "cardholder_agreement": "Contrat de titulaire de carte", "e_sign_consent": "Consentement de signature électronique", @@ -595,7 +595,7 @@ "gift_card_amount": "Montant de la carte-cadeau", "bill_amount": "Montant de la facture", "you_pay": "Vous payez", - "tip": "Astuce :", + "tip": "Pourboire :", "custom": "personnalisé", "by_cake_pay": "par Cake Pay", "expire": "Expire", @@ -617,7 +617,7 @@ "gift_card_balance_note": "Les cartes-cadeaux avec un solde restant apparaîtront ici", "gift_card_redeemed_note": "Les cartes-cadeaux que vous avez utilisées apparaîtront ici", "logout": "Déconnexion", - "add_tip": "Ajouter une astuce", + "add_tip": "Ajouter un pourboire", "percentageOf": "sur ${amount}", "is_percentage": "est", "search_category": "Catégorie de recherche", @@ -646,16 +646,16 @@ "custom_redeem_amount": "Montant d'échange personnalisé", "add_custom_redemption": "Ajouter un remboursement personnalisé", "remaining": "restant", - "delete_wallet": "Supprimer le portefeuille", - "delete_wallet_confirm_message" : "Êtes-vous sûr de vouloir supprimer le portefeuille ${wallet_name}?", + "delete_wallet": "Supprimer le portefeuille (wallet)", + "delete_wallet_confirm_message" : "Êtes-vous sûr de vouloir supprimer le portefeuille (wallet) ${wallet_name}?", "low_fee": "Frais modiques", "low_fee_alert": "Vous utilisez actuellement une priorité de frais de réseau peu élevés. Cela pourrait entraîner de longues attentes, des taux différents ou des transactions annulées. Nous vous recommandons de fixer des frais plus élevés pour une meilleure expérience.", "ignor": "Ignorer", "use_suggested": "Utilisation suggérée", - "do_not_share_warning_text" : "Ne les partagez avec personne d'autre, y compris avec l'assistance.\n\nVos fonds peuvent et seront volés!", - "help": "aider", + "do_not_share_warning_text" : "Ne les partagez avec personne, y compris avec l'assistance.\n\nVos fonds seraient inmanquablement volés !", + "help": "aide", "all_transactions": "Toutes transactions", - "all_trades": "Tous métiers", + "all_trades": "Tous échanges", "connection_sync": "Connexion et synchronisation", "security_and_backup": "Sécurité et sauvegarde", "create_backup": "Créer une sauvegarde", @@ -663,17 +663,19 @@ "privacy": "Confidentialité", "display_settings": "Paramètres d'affichage", "other_settings": "Autres paramètres", - "require_pin_after": "NIP requis après", + "require_pin_after": "Code PIN requis après", "always": "toujours", "minutes_to_pin_code": "${minute} minutes", "disable_exchange": "Désactiver l'échange", "advanced_privacy_settings": "Paramètres de confidentialité avancés", "settings_can_be_changed_later": "Ces paramètres peuvent être modifiés ultérieurement dans les paramètres de l'application", "add_custom_node": "Ajouter un nouveau nœud personnalisé", - "disable_fiat": "Désactiver fiat", + "disable_fiat": "Désactiver les montants en fiat", "fiat_api": "Fiat API", - "disabled": "Handicapé", + "disabled": "Désactivé", "enabled": "Activé", "tor_only": "Tor uniquement", - "unmatched_currencies": "La devise de votre portefeuille actuel ne correspond pas à celle du QR scanné" + "unmatched_currencies": "La devise de votre portefeuille (wallet) actuel ne correspond pas à celle du QR code scanné", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "Mes portefeuilles (wallets)" } From de4ecefd20e5e950fa9366c3bd4658de44a919ba Mon Sep 17 00:00:00 2001 From: Mathias Herberts Date: Thu, 5 Jan 2023 22:44:19 +0100 Subject: [PATCH 092/100] Added localized strings in contact list --- res/values/strings_de.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 +++- 13 files changed, 39 insertions(+), 13 deletions(-) diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 3382b73f8..a5076f289 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -677,5 +677,7 @@ "disabled": "Deaktiviert", "enabled": "Ermöglicht", "tor_only": "Nur Tor", - "unmatched_currencies": "Die Währung Ihres aktuellen Wallets stimmt nicht mit der des gescannten QR überein" + "unmatched_currencies": "Die Währung Ihres aktuellen Wallets stimmt nicht mit der des gescannten QR überein", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index db0a813b4..12cf47469 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -677,5 +677,7 @@ "disabled": "Desactivado", "enabled": "Activado", "tor_only": "solo Tor", - "unmatched_currencies": "La moneda de su billetera actual no coincide con la del QR escaneado" + "unmatched_currencies": "La moneda de su billetera actual no coincide con la del QR escaneado", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 9acf7657c..53abe527a 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -677,5 +677,7 @@ "disabled": "अक्षम", "enabled": "सक्रिय", "tor_only": "Tor केवल", - "unmatched_currencies": "आपके वर्तमान वॉलेट की मुद्रा स्कैन किए गए क्यूआर से मेल नहीं खाती" + "unmatched_currencies": "आपके वर्तमान वॉलेट की मुद्रा स्कैन किए गए क्यूआर से मेल नहीं खाती" , + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index dacd3952b..0c4c84d2f 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -677,5 +677,7 @@ "disabled": "Onemogućeno", "enabled": "Omogućeno", "tor_only": "Samo Tor", - "unmatched_currencies": "Valuta vašeg trenutnog novčanika ne odgovara onoj na skeniranom QR-u" + "unmatched_currencies": "Valuta vašeg trenutnog novčanika ne odgovara onoj na skeniranom QR-u", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index ac0ad5833..dc4375380 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -677,5 +677,7 @@ "disabled": "Disabilitato", "enabled": "Abilitato", "tor_only": "Solo Tor", - "unmatched_currencies": "La valuta del tuo portafoglio attuale non corrisponde a quella del QR scansionato" + "unmatched_currencies": "La valuta del tuo portafoglio attuale non corrisponde a quella del QR scansionato", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index fc1abc280..88f9d5bc9 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -677,5 +677,7 @@ "disabled": "無効", "enabled": "有効", "tor_only": "Torのみ", - "unmatched_currencies": "現在のウォレットの通貨がスキャンされたQRの通貨と一致しません" + "unmatched_currencies": "現在のウォレットの通貨がスキャンされたQRの通貨と一致しません", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index b30529038..d55f0175b 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -677,5 +677,7 @@ "disabled": "장애가 있는", "enabled": "사용", "tor_only": "Tor 뿐", - "unmatched_currencies": "현재 지갑의 통화가 스캔한 QR의 통화와 일치하지 않습니다." + "unmatched_currencies": "현재 지갑의 통화가 스캔한 QR의 통화와 일치하지 않습니다.", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 734347991..41bd8de75 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -677,5 +677,7 @@ "disabled": "Gehandicapt", "enabled": "Ingeschakeld", "tor_only": "Alleen Tor", - "unmatched_currencies": "De valuta van uw huidige portemonnee komt niet overeen met die van de gescande QR" + "unmatched_currencies": "De valuta van uw huidige portemonnee komt niet overeen met die van de gescande QR", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index b7806d2a4..c8e208fbd 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -677,5 +677,7 @@ "disabled": "Wyłączone", "enabled": "Włączony", "tor_only": "Tylko Tor", - "unmatched_currencies": "Waluta Twojego obecnego portfela nie odpowiada walucie zeskanowanego kodu QR" + "unmatched_currencies": "Waluta Twojego obecnego portfela nie odpowiada walucie zeskanowanego kodu QR", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 80177d22c..0312ed07f 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -676,5 +676,7 @@ "disabled": "Desabilitado", "enabled": "Habilitado", "tor_only": "Tor apenas", - "unmatched_currencies": "A moeda da sua carteira atual não corresponde à do QR digitalizado" + "unmatched_currencies": "A moeda da sua carteira atual não corresponde à do QR digitalizado", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index eb63a974f..145f0418d 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -677,5 +677,7 @@ "disabled": "Отключено", "enabled": "Включено", "tor_only": "Только Tor", - "unmatched_currencies": "Валюта вашего текущего кошелька не соответствует валюте отсканированного QR-кода." + "unmatched_currencies": "Валюта вашего текущего кошелька не соответствует валюте отсканированного QR-кода.", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 20cbfaf6f..dd8a83d08 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -676,5 +676,7 @@ "disabled": "Вимкнено", "enabled": "Увімкнено", "tor_only": "Тільки Tor", - "unmatched_currencies": "Валюта вашого гаманця не збігається з валютою сканованого QR-коду" + "unmatched_currencies": "Валюта вашого гаманця не збігається з валютою сканованого QR-коду", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 248eabda1..a2021fa56 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -675,5 +675,7 @@ "disabled": "禁用", "enabled": "启用", "tor_only": "仅限 Tor", - "unmatched_currencies": "您当前钱包的货币与扫描的 QR 的货币不匹配" + "unmatched_currencies": "您当前钱包的货币与扫描的 QR 的货币不匹配", + "contact_list_contacts": "Contacts", + "contact_list_wallets": "My Wallets" } From 21dfe86da02f7fe921f4b81ee9511f90c13ea656 Mon Sep 17 00:00:00 2001 From: rosedaler <121954045+maddymodd@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:21:10 -0500 Subject: [PATCH 093/100] Update strings_th.arb --- res/values/strings_th.arb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index f39025e3d..aaff40730 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -261,7 +261,7 @@ "view_key_public" : "คีย์มุมมอง (สาธารณะ)", "spend_key_private" : "คีย์จ่าย (ส่วนตัว)", "spend_key_public" : "คีย์จ่าย (สาธารณะ)", - "copied_key_to_clipboard" : "คัดลอก ${key} ไปยัง Clipboard แล้ว" + "copied_key_to_clipboard" : "คัดลอก ${key} ไปยัง Clipboard แล้ว", "new_subaddress_title" : "ที่อยู่ใหม่", @@ -279,7 +279,7 @@ "trade_details_provider" : "ผู้ให้บริการ", "trade_details_created_at" : "สร้างเมื่อ", "trade_details_pair" : "คู่", - "trade_details_copied" : "${title} คัดลอกไปยัง Clipboard" + "trade_details_copied" : "${title} คัดลอกไปยัง Clipboard", "trade_history_title" : "ประวัติการซื้อขาย", @@ -527,7 +527,7 @@ "second_intro_title" : "อิโมจิที่อยู่เดียวที่จะควบคุมพวกเขาทั้งหมด", "second_intro_content" : "Yat ของคุณเป็นอิโมจิที่อยู่เดียวที่จะแทนที่ทุกที่อยู่และเลขฐานสิบหกของคุณสำหรับเหรียญคริปโตทุกชนิด", "third_intro_title" : "Yat ปฏิบัติตนอย่างดีกับผู้อื่น", - "third_intro_content" : "Yat อาศัยอยู่นอก Cake Wallet ด้วย ที่อยู่กระเป๋าใดๆ ทั่วโลกสามารถแทนด้วย Yat ได้อีกด้วย!" + "third_intro_content" : "Yat อาศัยอยู่นอก Cake Wallet ด้วย ที่อยู่กระเป๋าใดๆ ทั่วโลกสามารถแทนด้วย Yat ได้อีกด้วย!", "learn_more" : "ศึกษาเพิ่มเติม", "search": "ค้นหา", "search_language": "ค้นหาภาษา", @@ -580,7 +580,7 @@ "order_physical_card": "สั่งซื้อบัตรดิบิต", "add_value": "เพิ่มมูลค่า", "activate": "เปิดใช้งาน", - "get_a": "รับ " + "get_a": "รับ ", "digital_and_physical_card": "บัตรเดบิตดิจิตอลและบัตรพื้นฐาน", "get_card_note": "ที่คุณสามารถเติมเงินด้วยสกุลเงินดิจิตอล ไม่จำเป็นต้องใส่ข้อมูลเพิ่มเติม!", "signup_for_card_accept_terms": "ลงทะเบียนสำหรับบัตรและยอมรับเงื่อนไข", From 23490b088f00711f64d4c24b03d7f743af9338c3 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 6 Jan 2023 14:40:35 +0200 Subject: [PATCH 094/100] Translate contact list for other languages --- res/values/strings_de.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 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index a5076f289..9ba0a7553 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -678,6 +678,6 @@ "enabled": "Ermöglicht", "tor_only": "Nur Tor", "unmatched_currencies": "Die Währung Ihres aktuellen Wallets stimmt nicht mit der des gescannten QR überein", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Kontakte", + "contact_list_wallets": "Meine Geldbörsen" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 12cf47469..10c866676 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -678,6 +678,6 @@ "enabled": "Activado", "tor_only": "solo Tor", "unmatched_currencies": "La moneda de su billetera actual no coincide con la del QR escaneado", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Contactos", + "contact_list_wallets": "Mis billeteras" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 53abe527a..a5c27ddb4 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -678,6 +678,6 @@ "enabled": "सक्रिय", "tor_only": "Tor केवल", "unmatched_currencies": "आपके वर्तमान वॉलेट की मुद्रा स्कैन किए गए क्यूआर से मेल नहीं खाती" , - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "संपर्क", + "contact_list_wallets": "मेरा बटुआ" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 0c4c84d2f..9aa9f0b4f 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -678,6 +678,6 @@ "enabled": "Omogućeno", "tor_only": "Samo Tor", "unmatched_currencies": "Valuta vašeg trenutnog novčanika ne odgovara onoj na skeniranom QR-u", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Kontakti", + "contact_list_wallets": "Moji novčanici" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index dc4375380..e90fc20c2 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -678,6 +678,6 @@ "enabled": "Abilitato", "tor_only": "Solo Tor", "unmatched_currencies": "La valuta del tuo portafoglio attuale non corrisponde a quella del QR scansionato", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Contatti", + "contact_list_wallets": "I miei portafogli" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 88f9d5bc9..3c5a5d951 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -678,6 +678,6 @@ "enabled": "有効", "tor_only": "Torのみ", "unmatched_currencies": "現在のウォレットの通貨がスキャンされたQRの通貨と一致しません", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "連絡先", + "contact_list_wallets": "マイウォレット" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index d55f0175b..216a3a143 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -678,6 +678,6 @@ "enabled": "사용", "tor_only": "Tor 뿐", "unmatched_currencies": "현재 지갑의 통화가 스캔한 QR의 통화와 일치하지 않습니다.", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "콘택트 렌즈", + "contact_list_wallets": "내 지갑" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 41bd8de75..9ac0cd1d1 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -678,6 +678,6 @@ "enabled": "Ingeschakeld", "tor_only": "Alleen Tor", "unmatched_currencies": "De valuta van uw huidige portemonnee komt niet overeen met die van de gescande QR", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Contacten", + "contact_list_wallets": "Mijn portefeuilles" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index c8e208fbd..11bf637e5 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -678,6 +678,6 @@ "enabled": "Włączony", "tor_only": "Tylko Tor", "unmatched_currencies": "Waluta Twojego obecnego portfela nie odpowiada walucie zeskanowanego kodu QR", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Łączność", + "contact_list_wallets": "Moje portfele" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 0312ed07f..8529aadb8 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -677,6 +677,6 @@ "enabled": "Habilitado", "tor_only": "Tor apenas", "unmatched_currencies": "A moeda da sua carteira atual não corresponde à do QR digitalizado", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Contatos", + "contact_list_wallets": "minhas carteiras" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 145f0418d..1ba5fd85c 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -678,6 +678,6 @@ "enabled": "Включено", "tor_only": "Только Tor", "unmatched_currencies": "Валюта вашего текущего кошелька не соответствует валюте отсканированного QR-кода.", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Контакты", + "contact_list_wallets": "Мои кошельки" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index dd8a83d08..4fad9a19d 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -677,6 +677,6 @@ "enabled": "Увімкнено", "tor_only": "Тільки Tor", "unmatched_currencies": "Валюта вашого гаманця не збігається з валютою сканованого QR-коду", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "Контакти", + "contact_list_wallets": "Мої гаманці" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index a2021fa56..7c0f4ab74 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -676,6 +676,6 @@ "enabled": "启用", "tor_only": "仅限 Tor", "unmatched_currencies": "您当前钱包的货币与扫描的 QR 的货币不匹配", - "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_contacts": "联系人", + "contact_list_wallets": "我的钱包" } From 0b5b74943c52be53dc0fcd0e33be4f3207dd7dd9 Mon Sep 17 00:00:00 2001 From: rosedaler <121954045+maddymodd@users.noreply.github.com> Date: Fri, 6 Jan 2023 07:57:04 -0500 Subject: [PATCH 095/100] Update strings_th.arb --- res/values/strings_th.arb | 1 + 1 file changed, 1 insertion(+) diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index aaff40730..6955a68dc 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -587,6 +587,7 @@ "add_fund_to_card": "เพิ่มเงินสำรองไว้บนบัตร (ถึง ${value})", "use_card_info_two": "เงินจะถูกแปลงค่าเป็นดอลลาร์สหรัฐเมื่อถือไว้ในบัญชีสำรองเงิน ไม่ใช่สกุลเงินดิจิตอล", "use_card_info_three": "ใช้บัตรดิจิตอลออนไลน์หรือผ่านวิธีการชำระเงินแบบไม่ต้องใช้บัตรกระดาษ", + "optionally_order_card": "เลือกเพิ่มสั่งการ์ดจริง", "hide_details" : "ซ่อนรายละเอียด", "show_details" : "แสดงรายละเอียด", "upto": "สูงสุด ${value}", From 5e96c387a23ee897abb22bd7b3dc5054a9faee63 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 6 Jan 2023 15:22:00 +0200 Subject: [PATCH 096/100] Add Thai translation for contact list [skip ci] --- res/values/strings_th.arb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 6955a68dc..242a8d110 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -675,5 +675,7 @@ "disabled" : "ปิดใช้งาน", "enabled" : "เปิดใช้งาน", "tor_only" : "Tor เท่านั้น", - "unmatched_currencies" : "สกุลเงินของกระเป๋าปัจจุบันของคุณไม่ตรงกับของ QR ที่สแกน" + "unmatched_currencies" : "สกุลเงินของกระเป๋าปัจจุบันของคุณไม่ตรงกับของ QR ที่สแกน", + "contact_list_contacts": "ติดต่อ", + "contact_list_wallets": "กระเป๋าเงินของฉัน" } From 15d5375eb6dfe878c1c8aae2bb7f102a3e566cd9 Mon Sep 17 00:00:00 2001 From: xd Date: Fri, 6 Jan 2023 17:14:33 +0200 Subject: [PATCH 097/100] Add Support for Arabic Language --- README.md | 5 +- assets/images/flags/sau.png | Bin 0 -> 476 bytes lib/entities/language_service.dart | 6 +- res/values/strings_ar.arb | 681 +++++++++++++++++++++++++++++ 4 files changed, 688 insertions(+), 4 deletions(-) create mode 100644 assets/images/flags/sau.png create mode 100644 res/values/strings_ar.arb diff --git a/README.md b/README.md index f485ca244..14cb5e2ee 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull reque - Japanese - Chinese - Korean +- Arabic ## Add a new language @@ -117,7 +118,7 @@ The only parts to be translated, if needed, are the values m and s after the var 4. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language. -5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. +5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pixels with a 3 pixels of transparent margin on all 4 sides. ## Add a new fiat currency @@ -127,4 +128,4 @@ The only parts to be translated, if needed, are the values m and s after the var 3. Add the raw mapping underneath in `lib/entities/fiat_currency.dart` following the same format as the others. -4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides. \ No newline at end of file +4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pixels with a 3 pixels of transparent margin on all 4 sides. diff --git a/assets/images/flags/sau.png b/assets/images/flags/sau.png new file mode 100644 index 0000000000000000000000000000000000000000..97951983a0a89eab9edc06ebfd093923f0f0baf2 GIT binary patch literal 476 zcmV<20VDp2P)DtwcK0E?P>o~=kdA_r#@JNJJ;@jIVSMu*nR9Bbl7f00R z`$?ZFE^5Xj+sJMg0|>{SsqLJO|EyEblt#o*ShitB}q8otqm;`yaep)e{}6Y~iGL5n+{B z`m@2IWtJn^iM!v1M|c1*G!^h}Y7hX^L^pl&V@$69WVosg_kRV$izu~iwVx^IXrjR; zERf>W=22e7CEb`8t2c0bdP1z;;Csf@5|C(iPjw*Ws(3V4uZaemM localeCountryCode = { @@ -36,7 +37,8 @@ class LanguageService { 'uk': 'ukr', 'zh': 'chn', 'hr': 'hrv', - 'it': 'ita' + 'it': 'ita', + 'ar': 'sau' }; static final list = {}; diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb new file mode 100644 index 000000000..01708d5fd --- /dev/null +++ b/res/values/strings_ar.arb @@ -0,0 +1,681 @@ +{ + "welcome":"مرحبا بك في", + "cake_wallet":"Cake Wallet", + "first_wallet_text":"محفظة رائعة ل Monero, Bitcoin, Litecoin و Haven", + "please_make_selection":"يرجى الأختيار لإنشاء أو استعادة محفظتك.", + "create_new":"إنشاء محفظة جديدة", + "restore_wallet":"استعادة محفظة", + + "monero_com":"Monero.com بواسطة Cake Wallet", + "monero_com_wallet_text":"محفظة رائعة ل Monero", + + "haven_app":"Haven بواسطة Cake Wallet", + "haven_app_wallet_text":"محفظة رائعة ل Haven", + + "accounts":"حسابتي", + "edit":"تعديل", + "account":"حساب", + "add":"إضافة", + + + "address_book":"دليل العناوين", + "contact":"تواصل", + "please_select":"الرجاء الأختيار:", + "cancel":"إلغاء", + "ok":"حسناً", + "contact_name":"اسم جهة الاتصال", + "reset":"إعادة", + "save":"حفظ", + "address_remove_contact":"ازالة جهة الاتصال", + "address_remove_content":"هل أنت متأكد من رغبتك في إزالة جهة الاتصال المحددة؟", + + + "authenticated":"تم المصادقة", + "authentication":"المصادقة", + "failed_authentication":"${state_error} فشل المصادقة.", + + + "wallet_menu":"قائمة", + "Blocks_remaining":"بلوك متبقي ${status}", + "please_try_to_connect_to_another_node":"الرجاء محاولة الاتصال بعقدة أخرى", + "xmr_hidden":"مختفي", + "xmr_available_balance":"الرصيد المتوفر", + "xmr_full_balance":"الرصيد الكامل", + "send":"إرسال", + "receive":"استلام", + "transactions":"المعاملات", + "incoming":"الواردة", + "outgoing":"الصادره", + "transactions_by_date":"المعاملات حسب التاريخ", + "trades":"عمليات التداول", + "filter_by":"تصفية حسب", + "today":"اليوم", + "yesterday":"الامس", + "received":"استلام", + "sent":"تم الأرسال", + "pending":" (في الإنتظار)", + "rescan":"إعادة الفحص", + "reconnect":"أعد الاتصال", + "wallets":"المحافظ", + "show_seed":"عرض السييد", + "show_keys":"اظهار السييد / المفاتيح", + "address_book_menu":"دليل العناوين", + "reconnection":"إعادة الاتصال", + "reconnect_alert_text":"هل أنت متأكد من رغبتك في إعادة الاتصال؟", + + + "exchange":"تبادل", + "clear":"مسح", + "refund_address":"عنوان إعادة المال", + "change_exchange_provider":"تغيير مزود الصرف", + "you_will_send":"تحويل من", + "you_will_get":"حول الى", + "amount_is_guaranteed":"مبلغ الاستلام مضمون", + "amount_is_estimate":"المبلغ المستلم هو تقدير", + "powered_by":"بدعم من ${title}", + "error":"خطأ", + "estimated":"مُقدَّر", + "min_value":"الحد الأدنى: ${value} ${currency}", + "max_value":"الحد الأقصى: ${value} ${currency}", + "change_currency":"تغيير العملة", + "overwrite_amount":"تغير المبلغ", + "qr_payment_amount":"يحتوي هذا ال QR على مبلغ الدفع. هل تريد تغير المبلغ فوق القيمة الحالية؟", + + "copy_id":"نسخ معرف العملية", + "exchange_result_write_down_trade_id":"يرجى نسخ أو كتابة معرّف العملية للمتابعة.", + "trade_id":"معرف عملية التبادل:", + "copied_to_clipboard":"نسخ إلى الحافظة", + "saved_the_trade_id":"لقد تم حفظ معرف العملية", + "fetching":"جار الجلب", + "id":"رقم المعرف:", + "amount":"مقدار:", + "payment_id":"معرف الدفع:", + "status":"الحالة:", + "offer_expires_in":"ينتهي العرض في:", + "trade_is_powered_by":"عملية التبادل مدعومة من ${provider}", + "copy_address":"نسخ العنوان", + "exchange_result_confirm":"بالضغط على تأكيد ، سترسل ${fetchingLabel} ${from} من محفظتك المسماة ${walletName} إلى العنوان الموضح أدناه. أو يمكنك الإرسال من محفظتك الخارجية إلى العنوان أدناه / QR.\n\nيرجى الضغط على تأكيد للمتابعة أو الرجوع لتغيير المبالغ.", + "exchange_result_description":"يجب عليك إرسال ما لا يقل عن ${fetchingLabel} ${from} إلى العنوان المعروض في الصفحة التالية. إذا أرسلت مبلغًا أقل من ${fetchingLabel} ${from} فقد لا يتم تحويله وقد لا يتم رده.", + "exchange_result_write_down_ID":"* يرجى نسخ أو كتابة معرف هويتك الأعلى لحفظة.", + "confirm":"تأكيد", + "confirm_sending":"تأكيد الإرسال", + "commit_transaction_amount_fee":"تنفيذ الصفقة\nالمبلغ: ${amount}\nالرسوم: ${fee}", + "sending":"يتم الإرسال", + "transaction_sent":"تم إرسال المعاملة!", + "expired":"منتهي الصلاحية", + "time":"${minutes}د ${seconds}س", + "send_xmr":"أرسل XMR", + "exchange_new_template":"قالب جديد", + + "faq":"الأسئلة الشائعة", + + + "enter_your_pin":"أدخل كود الرقم السري", + "loading_your_wallet":"يتم تحميل محفظتك", + + + "new_wallet":"إنشاء محفظة جديدة", + "wallet_name":"اسم المحفظة", + "continue_text":"التالي", + "choose_wallet_currency":"الرجاء اختيار عملة المحفظة:", + + + "node_new":"عقدة جديدة", + "node_address":"عنوان العقدة", + "node_port":"منفذ العقدة", + "login":"تسجيل الدخول", + "password":"كلمة المرور", + "nodes":"العقد", + "node_reset_settings_title":"اعادة الضبط", + "nodes_list_reset_to_default_message":"هل أنت متأكد أنك تريد إعادة تعيين الإعدادات إلى الافتراضي؟", + "change_current_node":"هل أنت متأكد من تغيير العقدة الحالية إلى ${node}؟", + "change":"تغير", + "remove_node":"إزالة العقدة", + "remove_node_message":"هل أنت متأكد أنك تريد إزالة العقدة المحددة؟", + "remove":"إزالة", + "delete":"حذف", + "add_new_node":"أضافة عقدة جديدة", + "change_current_node_title":"تغيير العقدة الحالية", + "node_test":"تجربة", + "node_connection_successful":"تم الاتصال بنجاح", + "node_connection_failed":"فشل الاتصال", + "new_node_testing":"تجربة العقدة الجديدة", + + + "use":"التبديل إلى", + "digit_pin":"-رقم PIN", + + + "share_address":"شارك العنوان", + "receive_amount":"المقدار", + "subaddresses":"العناوين الفرعية", + "addresses":"عناوين", + "scan_qr_code":"امسح ال QR للحصول على العنوان", + "qr_fullscreen":"انقر لفتح ال QR بملء الشاشة", + "rename":"إعادة تسمية", + "choose_account":"اختر حساب", + "create_new_account":"انشاء حساب جديد", + "accounts_subaddresses":"الحسابات والعناوين الفرعية", + + + "restore_restore_wallet":"استعادة محفظة", + "restore_title_from_seed_keys":"استعادة من السييد / المفاتيح", + "restore_description_from_seed_keys":"استرجع محفظتك من السييد / المفاتيح التي قمت بحفظها في مكان آمن", + "restore_next":"التالي", + "restore_title_from_backup":"استعادة من النسخة الاحتياطية", + "restore_description_from_backup":"يمكنك استعادة تطبيق Cake Wallet بالكامل من ملف النسخ الاحتياطي", + "restore_seed_keys_restore":"استعادة السييد / المفاتيح", + "restore_title_from_seed":"استعادة من السييد", + "restore_description_from_seed":"قم باستعادة محفظتك من الرمز المكون من 25 كلمة أو 13 كلمة", + "restore_title_from_keys":"استعادة من المفاتيح", + "restore_description_from_keys":"قم باستعادة محفظتك من ضغطات المفاتيح المولدة المحفوظة من مفاتيحك الخاصة", + "restore_wallet_name":"اسم المحفظة", + "restore_address":"العنوان", + "restore_view_key_private":"مفتاح العرض (خاص)", + "restore_spend_key_private":"مفتاح الإنفاق (خاص)", + "restore_recover":"استعادة", + "restore_wallet_restore_description":"وصف استعادة المحفظة", + "restore_new_seed":"سييد جديدة", + "restore_active_seed":"السييد النشطة", + "restore_bitcoin_description_from_seed":"قم باستعادة محفظتك من كود مكون من 24 كلمة", + "restore_bitcoin_description_from_keys":"قم باستعادة محفظتك من سلسلة WIF التي تم إنشاؤها من مفاتيحك الخاصة", + "restore_bitcoin_title_from_keys":"استعادة من WIF", + "restore_from_date_or_blockheight":"الرجاء إدخال تاريخ قبل إنشاء هذه المحفظة ببضعة أيام. أو إذا كنت تعرف ارتفاع البلوك، فيرجى إدخاله بدلاً من ذلك", + + + "seed_reminder":"يرجى تدوينها في حالة فقد هاتفك أو مسحه", + "seed_title":"سييد", + "seed_share":"شارك السييد", + "copy":"نسخ", + + + "seed_language_choose":"الرجاء اختيار لغة السييد:", + "seed_choose":"اختر لغة السييد", + "seed_language_next":"التالي", + "seed_language_english":"إنجليزي", + "seed_language_chinese":"صينى", + "seed_language_dutch":"هولندي", + "seed_language_german":"ألمانية", + "seed_language_japanese":"اليابانية", + "seed_language_portuguese":"البرتغالية", + "seed_language_russian":"الروسية", + "seed_language_spanish":"الأسبانية", + "seed_language_french":"فرنسي", + "seed_language_italian":"إيطالي", + + + "send_title":"إرسال", + "send_your_wallet":"محفظتك", + "send_address":"عنوان ${cryptoCurrency}", + "send_payment_id":"معرف عملية الدفع (اختياري)", + "all":"الكل", + "send_error_minimum_value":"الحد الأدنى لقيمة المبلغ هو 0.01", + "send_error_currency":"العملة يجب أن تحتوي على أرقام فقط", + "send_estimated_fee":"الرسوم المقدرة:", + "send_priority":"حاليًا ، تم تحديد الرسوم بأولوية ${transactionPriority}.\nيمكن تعديل أولوية المعاملة في الإعدادات", + "send_creating_transaction":" يتم إنشاء المعاملة", + "send_templates":"القوالب", + "send_new":"جديد", + "send_amount":"مقدار:", + "send_fee":"الرسوم:", + "send_name":"الأسم", + "send_got_it":"فهمتك", + "send_sending":"يتم الإرسال...", + "send_success":"تم إرسال ${crypto} الخاص بك بنجاح", + + + "settings_title":"إعدادات", + "settings_nodes":"العقد", + "settings_current_node":"العقدة الحالية", + "settings_wallets":"المحافظ", + "settings_display_balance":"عرض الرصيد", + "settings_currency":"العملة", + "settings_fee_priority":"رسوم الأولوية", + "settings_save_recipient_address":"حفظ عنوان المستلم", + "settings_personal":"شخصي", + "settings_change_pin":"تغيير PIN", + "settings_change_language":"تغيير اللغة", + "settings_allow_biometrical_authentication":"السماح بالمصادقة البيومترية", + "settings_dark_mode":"الوضع الداكن", + "settings_transactions":"المبادلات", + "settings_trades":"الصفقات", + "settings_display_on_dashboard_list":"عرض في قائمة لوحة المعلومات", + "settings_all":"الكل", + "settings_only_trades":"الصفقات فقط", + "settings_only_transactions":"المعاملات فقط", + "settings_none":"لا شيء", + "settings_support":"الدعم", + "settings_terms_and_conditions":"الأحكام والشروط", + "pin_is_incorrect":"رقم ال PIN غير صحيح", + + + "setup_pin":"تعيين PIN", + "enter_your_pin_again":"أدخل PIN الخاص بك مرة أخرى", + "setup_successful":"تم إعداد PIN الخاص بك بنجاح!", + + + "wallet_keys":"سييد المحفظة / المفاتيح", + "wallet_seed":"سييد المحفظة", + "private_key":"مفتاح خاص", + "public_key":"مفتاح عمومي", + "view_key_private":"مفتاح العرض (خاص)", + "view_key_public":"مفتاح العرض (عام)", + "spend_key_private":"مفتاح الإنفاق (خاص)", + "spend_key_public":"مفتاح الإنفاق (عام)", + "copied_key_to_clipboard":"تم نسخ ${key} إلى الحافظة", + + + "new_subaddress_title":"عنوان جديد", + "new_subaddress_label_name":"تسمية", + "new_subaddress_create":"إنشاء", + + "address_label":"تسمية عنوان", + + "subaddress_title":"قائمة العناوين الفرعية", + + + "trade_details_title":"تفاصيل الصفقة", + "trade_details_id":"معرف (ID)", + "trade_details_state":"الحالة", + "trade_details_fetching":"جار الجلب", + "trade_details_provider":"مزود", + "trade_details_created_at":"أنشئت في", + "trade_details_pair":"زوج", + "trade_details_copied":"تم نسخ ${title} إلى الحافظة", + + + "trade_history_title":"تاريخ الصفقه", + + + "transaction_details_title":"تفاصيل المعاملة", + "transaction_details_transaction_id":"رقم المعاملة", + "transaction_details_date":"تاريخ", + "transaction_details_height":"ارتفاع", + "transaction_details_amount":"مقدار", + "transaction_details_fee":"رسوم", + "transaction_details_copied":"تم نسخ ${title} إلى الحافظة", + "transaction_details_recipient_address":"عناوين المستلم", + + + "wallet_list_title":"محفظة Monero", + "wallet_list_create_new_wallet":"إنشاء محفظة جديدة", + "wallet_list_restore_wallet":"استعادة المحفظة", + "wallet_list_load_wallet":"تحميل المحفظة", + "wallet_list_loading_wallet":"جار تحميل محفظة ${wallet_name}", + "wallet_list_failed_to_load":"فشل تحميل محفظة ${wallet_name}. ${error}", + "wallet_list_removing_wallet":"يتم إزالة محفظة ${wallet_name}", + "wallet_list_failed_to_remove":"فشلت إزالة محفظة ${wallet_name}. ${error}", + + + "widgets_address":"عنوان", + "widgets_restore_from_blockheight":"استعادة من ارتفاع البلوك", + "widgets_restore_from_date":"استعادة من التاريخ", + "widgets_or":"أو", + "widgets_seed":"سييد", + + + "router_no_route":"لم يتم تحديد مسار لـ ${name}", + + + "error_text_account_name":"يجب أن يحتوي اسم الحساب على أحرف وأرقام فقط\nويجب أن يتراوح بين حرف واحد و 15 حرفًا", + "error_text_contact_name":"لا يمكن أن يحتوي اسم جهة الاتصال على الرموز ` , ' \"\nويجب أن يتراوح بين حرف و 32 حرفًا", + "error_text_address":"يجب أن يتوافق عنوان المحفظة مع نوع\nالعملة المشفرة", + "error_text_node_address":"الرجاء إدخال عنوان IPv4", + "error_text_node_port":"منفذ العقدة يمكن أن يحتوي فقط على أرقام بين 0 و 65535", + "error_text_payment_id":"يمكن أن يحتوي معرّف الدفع فقط من 16 إلى 64 حرفًا hex", + "error_text_xmr":"لا يمكن أن تتجاوز قيمة XMR الرصيد المتاح.\nيجب أن يكون عدد الكسور أقل من أو يساوي 12", + "error_text_fiat":"لا يمكن أن تتجاوز قيمة المبلغ الرصيد المتاح.\nيجب أن يكون عدد الكسور أقل أو يساوي 2", + "error_text_subaddress_name":"لا يمكن أن يحتوي اسم العنوان الفرعي على رموز ` , ' \"\nويجب أن يتراوح طولها بين حرف واحد و 20 حرفًا", + "error_text_amount":"يجب أن يحتوي المبلغ على أرقام فقط", + "error_text_wallet_name":"يمكن أن يحتوي اسم المحفظة على أحرف وأرقام ورموز _ - فقط\nويجب أن يتراوح طولها بين حرف واحد و 33 حرفًا", + "error_text_keys":"يمكن أن تحتوي مفاتيح المحفظة على 64 حرفًا hex", + "error_text_crypto_currency":"عدد الكسور\nيجب أن تكون أقل من أو تساوي 12", + "error_text_minimal_limit":"لم يتم إنشاء الصفقة لـ ${provider}. المبلغ أقل من الحد الأدنى: ${min} ${currency}", + "error_text_maximum_limit":"لم يتم إنشاء الصفقة لـ ${provider}. المبلغ أكبر من الحد الأقصى: ${max} ${currency}", + "error_text_limits_loading_failed":"لم يتم إنشاء الصفقة لـ ${provider}. فشل تحميل الحدود", + "error_text_template":"لا يمكن أن يحتوي اسم القالب وعنوانه على رموز ` , \"\nويجب أن يتراوح طولها بين 1 و 106 حرفًا", + + + "auth_store_ban_timeout":"مهلة_الحظر", + "auth_store_banned_for":"محظور ل", + "auth_store_banned_minutes":" دقيقة", + "auth_store_incorrect_password":"PIN خطأ", + "wallet_store_monero_wallet":"محفظة Monero", + "wallet_restoration_store_incorrect_seed_length":"طول السييد غير صحيح", + + + "full_balance":"الرصيد الكامل", + "available_balance":"الرصيد المتوفر", + "hidden_balance":"الميزان الخفي", + + + "sync_status_syncronizing":"يتم المزامنة", + "sync_status_syncronized":"متزامن", + "sync_status_not_connected":"غير متصل", + "sync_status_starting_sync":"بدء المزامنة", + "sync_status_failed_connect":"انقطع الاتصال", + "sync_status_connecting":"يتم التوصيل", + "sync_status_connected":"متصل", + "sync_status_attempting_sync":"جاري محاولة المزامنة", + + + "transaction_priority_slow":"بطيء", + "transaction_priority_regular":"عادي", + "transaction_priority_medium":"متوسط", + "transaction_priority_fast":"سريع", + "transaction_priority_fastest":"أسرع", + + + "trade_for_not_created":"لم يتم إنشاء التداول للعنصر ${title}.", + "trade_not_created":"التداول لم ينشأ", + "trade_id_not_found":"تداول ${tradeId} من ${title} غير موجود.", + "trade_not_found":"التداول غير موجودة.", + + + "trade_state_pending":"قيد الانتظار", + "trade_state_confirming":"جاري التأكيد", + "trade_state_trading":"يتم التداول", + "trade_state_traded":"تم التداول بنجاح", + "trade_state_complete":"اكتمل", + "trade_state_to_be_created":"ليتم انشائه", + "trade_state_unpaid":"غير مدفوعة", + "trade_state_underpaid":"أجر أقل من اللازم", + "trade_state_paid_unconfirmed":"دفع غير مؤكد", + "trade_state_paid":"مدفوع", + "trade_state_btc_sent":"تم أرسل Btc", + "trade_state_timeout":"نفذ الوقت", + "trade_state_created":"تم الأنشاء", + "trade_state_finished":"تم", + + "change_language":"تغيير اللغة", + "change_language_to":"هل تريد تغيير اللغة إلى ${language}؟", + + "paste":"لصق", + "restore_from_seed_placeholder":"الرجاء إدخال أو لصق السييد الخاصة بك هنا", + "add_new_word":"أضف كلمة جديدة", + "incorrect_seed":"النص الذي تم إدخاله غير صالح.", + + "biometric_auth_reason":"امسح بصمة إصبعك للمصادقة", + "version":"الإصدار ${currentVersion}", + + "openalias_alert_title":"تم ايجاد العنوان", + "openalias_alert_content":"سوف ترسل الأموال إلى\n${recipient_name}", + + "card_address":"العنوان:", + "buy":"اشتري", + "sell":"بيع", + + "placeholder_transactions":"سيتم عرض معاملاتك هنا", + "placeholder_contacts":"سيتم عرض جهات الاتصال الخاصة بك هنا", + + "template":"قالب", + "confirm_delete_template":"سيؤدي هذا الإجراء إلى حذف هذا القالب. هل ترغب في الاستمرار؟", + "confirm_delete_wallet":"سيؤدي هذا الإجراء إلى حذف هذه المحفظة. هل ترغب في الاستمرار؟", + + "picker_description":"لاختيار ChangeNOW أو MorphToken ، يرجى تغيير زوج التداول الخاص بك أولاً", + + "change_wallet_alert_title":"تغيير المحفظة الحالية", + "change_wallet_alert_content":"هل تريد تغيير المحفظة الحالية إلى ${wallet_name}؟", + + "creating_new_wallet":"يتم إنشاء محفظة جديدة", + "creating_new_wallet_error":"خطأ: ${description}", + + "seed_alert_title":"انتباه", + "seed_alert_content":"السييد هي الطريقة الوحيدة لاسترداد محفظتك. هل كتبتها؟", + "seed_alert_back":"العودة إلى الوراء", + "seed_alert_yes":"نعم، فعلت ذلك", + + "exchange_sync_alert_content":"يرجى الانتظار حتى تتم مزامنة محفظتك", + + "pre_seed_title":"مهم", + "pre_seed_description":"في الصفحة التالية ستشاهد سلسلة من الكلمات ${words}. هذه هي سييد الفريدة والخاصة بك وهي الطريقة الوحيدة لاسترداد محفظتك في حالة فقدها أو عطلها. تقع على عاتقك مسؤولية تدوينها وتخزينها في مكان آمن خارج تطبيق Cake Wallet.", + "pre_seed_button_text":"انا أفهم. أرني سييد الخاص بي", + + "xmr_to_error":"خطأ XMR.TO", + "xmr_to_error_description":"مبلغ غير صحيح. الحد الأقصى 8 أرقام بعد الفاصلة العشرية", + + "provider_error":"خطأ ${provider}", + + "use_ssl":"استخدم SSL", + "trusted":"موثوق به", + + "color_theme":"سمة اللون", + "light_theme":"فاتح", + "bright_theme":"مشرق", + "dark_theme":"داكن", + "enter_your_note":"أدخل ملاحظتك ...", + "note_optional":"ملاحظة (اختياري)", + "note_tap_to_change":"ملاحظة (انقر للتغيير)", + "view_in_block_explorer":"عرض في Block Explorer", + "view_transaction_on":"عرض العملية على", + "transaction_key":"مفتاح العملية", + "confirmations":"التأكيدات", + "recipient_address":"عنوان المستلم", + + "extra_id":"معرف إضافي:", + "destination_tag":"علامة الوجهة:", + "memo":"مذكرة:", + + "backup":"نسخ الاحتياطي", + "change_password":"تغيير كلمة المرور", + "backup_password":"كلمة مرور النسخ الاحتياطي", + "write_down_backup_password":"يرجى كتابة كلمة المرور الاحتياطية الخاصة بك ، والتي يتم استخدامها لاستيراد ملفات النسخ الاحتياطي الخاصة بك.", + "export_backup":"تصدير نسخة احتياطية", + "save_backup_password":"يرجى التأكد من حفظ كلمة المرور الاحتياطية. لن تتمكن من استيراد ملفات النسخ الاحتياطي بدونها.", + "backup_file":"ملف النسخ الاحتياطي", + + "edit_backup_password":"تعديل كلمة مرور النسخ الاحتياطي", + "save_backup_password_alert":"حفظ كلمة المرور الاحتياطية", + "change_backup_password_alert":"لن تكون ملفات النسخ الاحتياطي السابقة متاحة للاستيراد بكلمة مرور نسخ احتياطي جديدة. سيتم استخدام كلمة مرور النسخ الاحتياطي الجديدة لملفات النسخ الاحتياطي الجديدة فقط. هل أنت متأكد أنك تريد تغيير كلمة المرور الاحتياطية؟", + + "enter_backup_password":"أدخل كلمة المرور الاحتياطية هنا", + "select_backup_file":"حدد ملف النسخ الاحتياطي", + "import":"اختيار ملف", + "please_select_backup_file":"الرجاء تحديد ملف النسخ الاحتياطي وإدخال كلمة مرور النسخ الاحتياطي.", + + "fixed_rate":"السعر الثابت", + "fixed_rate_alert":"ستتمكن من إدخال مبلغ الاستلام عند تشغيل وضع السعر الثابت. هل تريد التبديل إلى وضع السعر الثابت؟", + + "xlm_extra_info":"من فضلك لا تنس تحديد معرّف المذكرة أثناء إرسال معاملة XLM للتبادل", + "xrp_extra_info":"من فضلك لا تنس تحديد علامة الوجهة أثناء إرسال معاملة XRP للتبادل", + + "exchange_incorrect_current_wallet_for_xmr":"إذا كنت ترغب في استبدال XMR من رصيد Cake Wallet Monero ، فيرجى التبديل إلى محفظة Monero أولاً.", + "confirmed":"مؤكد", + "unconfirmed":"غير مؤكد", + "displayable":"قابل للعرض", + + "submit_request":"تقديم طلب", + + "buy_alert_content":"لا ندعم حاليًا سوى شراء Bitcoin و Litecoin. لشراء Bitcoin أو Litecoin ، يرجى إنشاء محفظة Bitcoin أو Litecoin أو التبديل إليها.", + "sell_alert_content":"نحن ندعم حاليًا بيع البيتكوين فقط. لبيع Bitcoin ، يرجى إنشاء أو التبديل إلى محفظة Bitcoin الخاصة بك.", + + "outdated_electrum_wallet_description":"محافظ Bitcoin الجديدة التي تم إنشاؤها في Cake الآن سييد مكونة من 24 كلمة. من الضروري أن تقوم بإنشاء محفظة Bitcoin جديدة وتحويل جميع أموالك إلى المحفظة الجديدة المكونة من 24 كلمة ، والتوقف عن استخدام محافظ سييد مكونة من 12 كلمة. يرجى القيام بذلك على الفور لتأمين أموالك.", + "understand":"لقد فهمت", + + "apk_update":"تحديث APK", + + "buy_bitcoin":"شراء Bitcoin", + "buy_with":"اشتر بواسطة", + "moonpay_alert_text":"يجب أن تكون قيمة المبلغ أكبر من أو تساوي ${minAmount} ${fiatCurrency}", + + "outdated_electrum_wallet_receive_warning":"إذا كانت هذه المحفظة تحتوي على سييد مكونة من 12 كلمة وتم إنشاؤها في Cake ، فلا تقم بإيداع Bitcoin في هذه المحفظة. قد يتم فقد أي BTC تم تحويله إلى هذه المحفظة. قم بإنشاء محفظة جديدة مكونة من 24 كلمة (انقر فوق القائمة في الجزء العلوي الأيمن ، وحدد محافظ ، واختر إنشاء محفظة جديدة ، ثم حدد Bitcoin) وقم على الفور بنقل BTC الخاص بك هناك. محافظ BTC الجديدة (24 كلمة) من Cake آمنة", + "do_not_show_me":"لا ترني هذا مجددا", + + "unspent_coins_title":"العملات الغير المنفقة", + "unspent_coins_details_title":"تفاصيل العملات الغير المنفقة", + "freeze":"تجميد", + "frozen":"مجمدة", + "coin_control":"التحكم في العملة (اختياري)", + + "address_detected":"تم ايجاد العنوان", + "address_from_domain":"هذا العنوان من ${domain} من Unstoppable Domains", + + "add_receiver":"أضف مستقبل آخر (اختياري)", + + "manage_yats":"إدارة Yats", + "yat_alert_title":"أرسل واستقبل العملات المشفرة بسهولة أكبر مع Yat", + "yat_alert_content":"يمكن لمستخدمي Cake Wallet الآن إرسال واستلام جميع عملاتهم المفضلة باستخدام اسم مستخدم فريد من نوعه قائم على الرموز التعبيرية.", + "get_your_yat":"احصل على Yat", + "connect_an_existing_yat":"توصيل Yat الحالي", + "connect_yats":"توصيل Yats", + "yat_address":"عنوان Yat", + "yat":"Yat", + "address_from_yat":"هذا العنوان من ${emoji} على Yat", + "yat_error":"خطأ Yat", + "yat_error_content":"لا توجد عناوين مرتبطة بهذا Yat. جرب يات آخر", + "choose_address":"\n\nالرجاء اختيار عنوان:", + "yat_popup_title":"يمكن تحويل عنوان محفظتك إلى رموز تعبيرية.", + "yat_popup_content":"يمكنك الآن إرسال واستلام العملات المشفرة في Cake Wallet باستخدام Yat - اسم مستخدم قصير يعتمد على الرموز التعبيرية. إدارة Yats في أي وقت على شاشة الإعدادات", + "second_intro_title":"عنوان تعبيري ايموجي واحد يحكمهم جميعا!", + "second_intro_content":"Yat الخاص بك هو عنوان تعبيري فريد يحل محل جميع العناوين السداسية العشرية الطويلة لجميع عملاتك.", + "third_intro_title":"يتماشي Yat بلطف مع الآخرين", + "third_intro_content":"يعيش Yats خارج Cake Wallet أيضًا. يمكن استبدال أي عنوان محفظة على وجه الأرض بـ Yat!", + "learn_more":"اعرف المزيد", + "search":"بحث", + "search_language":"ابحث عن لغة", + "search_currency":"ابحث عن عملة", + "new_template":"قالب جديد", + "electrum_address_disclaimer":"نقوم بإنشاء عناوين جديدة في كل مرة تستخدم فيها عنوانًا ، لكن العناوين السابقة تستمر في العمل", + "wallet_name_exists":"توجد بالفعل محفظة بهذا الاسم. الرجاء اختيار اسم مختلف أو إعادة تسمية المحفظة الأخرى أولاً.", + "market_place":"منصة التجارة", + "cake_pay_title":"بطاقات هدايا Cake Pay", + "cake_pay_subtitle":"شراء بطاقات هدايا مخفضة السعر (الولايات المتحدة فقط)", + "cake_pay_web_cards_title":"بطاقات Cake Pay Web", + "cake_pay_web_cards_subtitle":"اشتري بطاقات مدفوعة مسبقا وبطاقات هدايا في جميع أنحاء العالم", + "about_cake_pay":"يتيح لك Cake Pay شراء بطاقات هدايا بأصول افتراضية بسهولة ، ويمكن إنفاقها على الفور لدى أكثر من 150,000 تاجر في الولايات المتحدة.", + "cake_pay_account_note":"قم بالتسجيل باستخدام عنوان بريد إلكتروني فقط لمشاهدة البطاقات وشرائها. حتى أن بعضها متوفر بسعر مخفض!", + "already_have_account":"لديك حساب؟", + "create_account":"إنشاء حساب", + "privacy_policy":"سياسة الخصوصية", + "welcome_to_cakepay":"مرحبا بكم في Cake Pay!", + "sign_up":"اشتراك", + "forgot_password":"هل نسيت كلمة السر", + "reset_password":"إعادة تعيين كلمة المرور", + "gift_cards":"بطاقات الهدايا", + "setup_your_debit_card":"قم بإعداد بطاقة ائتمان الخاصة بك", + "no_id_required":"لا ID مطلوب. اشحن وانفق في أي مكان", + "how_to_use_card":"كيفية استخدام هذه البطاقة", + "purchase_gift_card":"شراء بطاقة هدايا", + "verification":"تَحَقّق", + "fill_code":"يرجى ملء رمز التحقق المرسل إلى بريدك الإلكتروني", + "dont_get_code":"لم تحصل على رمز؟", + "resend_code":"الرجاء إعادة إرسالها", + "debit_card":"بطاقة ائتمان", + "cakepay_prepaid_card":"بطاقة ائتمان CakePay مسبقة الدفع", + "no_id_needed":"لا حاجة لID!", + "frequently_asked_questions":"الأسئلة الشائعة", + "debit_card_terms":"يخضع تخزين واستخدام رقم بطاقة الدفع الخاصة بك (وبيانات الاعتماد المقابلة لرقم بطاقة الدفع الخاصة بك) في هذه المحفظة الرقمية لشروط وأحكام اتفاقية حامل البطاقة المعمول بها مع جهة إصدار بطاقة الدفع ، كما هو معمول به من وقت لآخر.", + "please_reference_document":"يرجى الرجوع إلى الوثائق أدناه لمزيد من المعلومات.", + "cardholder_agreement":"اتفاقية حامل البطاقة", + "e_sign_consent":"الموافقة على التوقيع الإلكتروني", + "agree_and_continue":"الموافقة ومتابعة", + "email_address":"عنوان البريد الالكترونى", + "agree_to":"من خلال إنشاء حساب فإنك توافق على", + "and":"و", + "enter_code":"ادخل الرمز", + "congratulations":"تهانينا!", + "you_now_have_debit_card":"لديك الآن بطاقة ائتمان", + "min_amount":"الحد الأدنى: ${value}", + "max_amount":"الحد الأقصى: ${value}", + "enter_amount":"أدخل المبلغ", + "billing_address_info":"إذا طُلب منك عنوان إرسال فواتير ، فأدخل عنوان الشحن الخاص بك", + "order_physical_card":"طلب البطاقة المادية", + "add_value":"إضافة قيمة", + "activate":"تفعيل", + "get_a":"احصل على", + "digital_and_physical_card":" بطاقة ائتمان رقمية ومادية مسبقة الدفع", + "get_card_note":" يمكنك إعادة تحميلها بالعملات الرقمية. لا توجد معلومات إضافية مطلوبة!", + "signup_for_card_accept_terms":"قم بالتسجيل للحصول على البطاقة وقبول الشروط.", + "add_fund_to_card":"أضف أموالاً مدفوعة مسبقًا إلى البطاقات (حتى ${value})", + "use_card_info_two":"يتم تحويل الأموال إلى الدولار الأمريكي عند الاحتفاظ بها في الحساب المدفوع مسبقًا ، وليس بالعملات الرقمية.", + "use_card_info_three":"استخدم البطاقة الرقمية عبر الإنترنت أو مع طرق الدفع غير التلامسية.", + "optionally_order_card":"اختياريا اطلب بطاقة فعلية (مادية).", + "hide_details":"أخف التفاصيل", + "show_details":"اظهر التفاصيل", + "upto":"حتى ${value}", + "discount":"وفر ${value}٪", + "gift_card_amount":"مبلغ بطاقة الهدايا", + "bill_amount":"مبلغ الفاتورة", + "you_pay":"انت تدفع", + "tip":"بقشيش:", + "custom":"مخصصة", + "by_cake_pay":"عن طريق Cake Pay", + "expires":"تنتهي", + "mm":"MM", + "yy":"YY", + "online":"متصل", + "offline":"غير متصل على الانترنت", + "gift_card_number":"رقم بطاقة الهدية", + "pin_number":"الرقم السري", + "total_saving":"إجمالي المدخرات", + "last_30_days":"آخر 30 يومًا", + "avg_savings":"متوسط مدخرات", + "view_all":"مشاهدة الكل", + "active_cards":"البطاقات النشطة", + "delete_account":"حذف الحساب", + "cards":"البطاقات", + "active":"نشيط", + "redeemed":"استردت", + "gift_card_balance_note":"ستظهر هنا بطاقات الهدايا ذات الرصيد المتبقي", + "gift_card_redeemed_note":"ستظهر هنا بطاقات الهدايا التي استردت قيمتها", + "logout":"تسجيل خروج", + "add_tip":"أضف بقشيش", + "percentageOf":"من ${amount}", + "is_percentage":"يكون", + "search_category":"فئة البحث", + "mark_as_redeemed":"وضع علامة كمسترد", + "more_options":"المزيد من الخيارات", + "awaiting_payment_confirmation":"في انتظار تأكيد الدفع", + "transaction_sent_notice":"إذا لم تستمر الشاشة بعد دقيقة واحدة ، فتحقق من مستكشف البلوك والبريد الإلكتروني.", + "agree":"موافق", + "in_store":"في المتجر", + "generating_gift_card":"يتم توليد بطاقة هدية", + "payment_was_received":"تم استلام الدفع الخاص بك.", + "proceed_after_one_minute":"إذا لم تستمر الشاشة بعد دقيقة واحدة ، فتحقق من بريدك الإلكتروني.", + "order_id":"رقم التعريف الخاص بالطلب", + "gift_card_is_generated":"تم إنشاء بطاقة الهدايا", + "open_gift_card":"افتح بطاقة الهدية", + "contact_support":"اتصل بالدعم", + "gift_cards_unavailable":"تتوفر بطاقات الهدايا للشراء فقط باستخدام Monero و Bitcoin و Litecoin في الوقت الحالي", + "introducing_cake_pay":"نقدم لكم Cake Pay!", + "cake_pay_learn_more":"شراء واسترداد بطاقات الهدايا على الفور في التطبيق!\nاسحب من اليسار إلى اليمين لمعرفة المزيد.", + "automatic":"تلقائي", + "fixed_pair_not_supported":"هذا الزوج الثابت غير مدعوم في التبادلات المحددة", + "variable_pair_not_supported":"هذا الزوج المتغير غير مدعوم في التبادلات المحددة", + "none_of_selected_providers_can_exchange":"لا يمكن لأي من مقدمي الخدمة المختارين إجراء هذا التبادل", + "choose_one":"اختر واحدة", + "choose_from_available_options":"اختر من بين الخيارات المتاحة:", + "custom_redeem_amount":"مبلغ الاسترداد مخصص", + "add_custom_redemption":"إضافة استرداد مخصص", + "remaining":"متبقي", + "delete_wallet":"حذف المحفظة", + "delete_wallet_confirm_message":"هل أنت متأكد أنك تريد حذف محفظة ${wallet_name}؟", + "low_fee":"رسوم منخفضة", + "low_fee_alert":"أنت تستخدم حاليًا أولوية منخفضة لرسوم الشبكة. قد يتسبب هذا في فترات انتظار طويلة ، أو أسعار مختلفة ، أو إلغاء صفقات. نوصي بتحديد رسوم أعلى لتجربة أفضل.", + "ignor":"تجاهل", + "use_suggested":"استخدام المقترح", + "do_not_share_warning_text":"لا تشارك هذه مع أي شخص آخر ، بما في ذلك الدعم.\n\nيمكن أن تتم سرقة أموالك!", + "help":"مساعده", + "all_transactions":"كل التحركات المالية", + "all_trades":"جميع عمليات التداول", + "connection_sync":"الاتصال والمزامنة", + "security_and_backup":"الأمان والنسخ الاحتياطي", + "create_backup":"انشئ نسخة احتياطية", + "privacy_settings":"إعدادات الخصوصية", + "privacy":"خصوصية", + "display_settings":"اعدادات العرض", + "other_settings":"اعدادات اخرى", + "require_pin_after":"طلب PIN بعد", + "always":"دائماً", + "minutes_to_pin_code":"${minutes} دقيقة", + "disable_exchange":"تعطيل التبادل", + "advanced_privacy_settings":"إعدادات الخصوصية المتقدمة", + "settings_can_be_changed_later":"يمكن تغيير هذه الإعدادات لاحقًا في إعدادات التطبيق", + "add_custom_node":"إضافة عقدة مخصصة جديدة", + "disable_fiat":"تعطيل fiat", + "fiat_api":"Fiat API", + "disabled":"معطلة", + "enabled":"ممكنة", + "tor_only":"Tor فقط", + "unmatched_currencies": "عملة محفظتك الحالية لا تتطابق مع عملة QR الممسوحة ضوئيًا" +} From d227e6e97ee5913047f34287f55eac9352b101c6 Mon Sep 17 00:00:00 2001 From: Telsbat <115116835+Telsbat@users.noreply.github.com> Date: Mon, 9 Jan 2023 15:04:44 +0100 Subject: [PATCH 098/100] Update strings_pl.arb Almost everything was from some online translator. I've translated everything that was no sense. --- res/values/strings_pl.arb | 366 +++++++++++++++++++------------------- 1 file changed, 183 insertions(+), 183 deletions(-) diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 11bf637e5..104e6eb90 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -2,7 +2,7 @@ "welcome" : "Witamy w", "cake_wallet" : "Cake Wallet", "first_wallet_text" : "Świetny portfel na Monero, Bitcoin, Litecoin, i Haven", - "please_make_selection" : "Wybierz poniżej, aby cutwórz lub odzyskaj swój portfel.", + "please_make_selection" : "Wybierz poniżej, aby utworzyć lub przywrócić swój portfel.", "create_new" : "Utwórz nowy portfel", "restore_wallet" : "Przywróć portfel", @@ -13,39 +13,39 @@ "haven_app_wallet_text": "Awesome wallet for Haven", "accounts" : "Konta", - "edit" : "Edytować", + "edit" : "Edytuj", "account" : "Konto", "add" : "Dodaj", - "address_book" : "Książka adresowa", + "address_book" : "Kontakty", "contact" : "Kontakt", "please_select" : "Proszę wybrać:", - "cancel" : "Anulować", - "ok" : "Dobrze", + "cancel" : "Anuluj", + "ok" : "Ok", "contact_name" : "Nazwa Kontaktu", - "reset" : "Nastawić", - "save" : "Zapisać", + "reset" : "Wyczyść", + "save" : "Zapisz", "address_remove_contact" : "Usuń kontakt", "address_remove_content" : "Czy na pewno chcesz usunąć wybrany kontakt?", - "authenticated" : "Zalegalizowany", - "authentication" : "Poświadczenie", + "authenticated" : "Uwierzytelniony", + "authentication" : "Uwierzytelnianie", "failed_authentication" : "Nieudane uwierzytelnienie. ${state_error}", "wallet_menu" : "Menu portfela", - "Blocks_remaining" : "${status} Bloki pozostałe", + "Blocks_remaining" : "Pozostało ${status} bloków", "please_try_to_connect_to_another_node" : "Spróbuj połączyć się z innym węzłem", "xmr_hidden" : "Ukryty", - "xmr_available_balance" : "Dostępne saldo", - "xmr_full_balance" : "Pełna równowaga", - "send" : "Wysłać", - "receive" : "Otrzymać", + "xmr_available_balance" : "Dostępne środki", + "xmr_full_balance" : "Pełne saldo", + "send" : "Wyślij", + "receive" : "Otrzymaj", "transactions" : "Transakcje", "incoming" : "Przychodzące", - "outgoing" : "Towarzyski", + "outgoing" : "Wychodzące", "transactions_by_date" : "Transakcje według daty", "trades" : "Transakcje", "filter_by": "Filtruj według", @@ -55,48 +55,48 @@ "sent" : "Wysłano", "pending" : " (w oczekiwaniu)", "rescan" : "Skanuj ponownie", - "reconnect" : "Na nowo połączyć", + "reconnect" : "Połącz ponownie", "wallets" : "Portfele", - "show_seed" : "Pokaż nasiona", - "show_keys" : "Pokaż nasiona/klucze", - "address_book_menu" : "Książka adresowa", - "reconnection" : "Ponowne połączenie", - "reconnect_alert_text" : "Czy na pewno ponownie się połączysz?", + "show_seed" : "Pokaż frazy seed", + "show_keys" : "Pokaż seed/klucze", + "address_book_menu" : "Kontakty", + "reconnection" : "Ponowne łączenie", + "reconnect_alert_text" : "Czy na pewno ponownie się ponownie połączysz?", - "exchange" : "Wymieniać się", + "exchange" : "Wymień", "clear" : "Wyczyść", - "refund_address" : "Adres zwrotu", - "change_exchange_provider" : "Zmień dostawcę programu Exchange", + "refund_address" : "Adres do zwrotu", + "change_exchange_provider" : "Zmień dostawcę wymiany", "you_will_send" : "Konwertuj z", "you_will_get" : "Konwertuj na", "amount_is_guaranteed" : "Otrzymana kwota jest gwarantowana", "amount_is_estimate" : "Otrzymana kwota jest wartością szacunkową", - "powered_by" : "Zasilany przez ${title}", + "powered_by" : "Obsługiwane przez ${title}", "error" : "Błąd", "estimated" : "Oszacowano", "min_value" : "Min: ${value} ${currency}", "max_value" : "Max: ${value} ${currency}", - "change_currency" : "Change Currency", - "overwrite_amount" : "Overwrite amount", - "qr_payment_amount" : "This QR code contains a payment amount. Do you want to overwrite the current value?", + "change_currency" : "Zmień walutę", + "overwrite_amount" : "Nadpisz ilość", + "qr_payment_amount" : "Ten kod QR zawiera kwotę do zapłaty. Czy chcesz nadpisać obecną wartość?", - "copy_id" : "ID kopii", - "exchange_result_write_down_trade_id" : "Skopiuj lub zanotuj identyfikator transakcji, aby kontynuować.", - "trade_id" : "Identyfikator handlu:", - "copied_to_clipboard" : "Skopiowane do schowka", + "copy_id" : "skopiuj ID", + "exchange_result_write_down_trade_id" : "Skopiuj lub zanotuj identyfikator transakcji (ID), aby kontynuować.", + "trade_id" : "ID transakcji:", + "copied_to_clipboard" : "Skopiowano do schowka", "saved_the_trade_id" : "Zapisałem ID", - "fetching" : "Ujmujący", + "fetching" : "Pobieranie", "id" : "ID: ", "amount" : "Ilość: ", - "payment_id" : "Płatności ID: ", + "payment_id" : "ID Płatności: ", "status" : "Status: ", "offer_expires_in" : "Oferta wygasa za ", - "trade_is_powered_by" : "Ten handel jest zasilany przez ${provider}", + "trade_is_powered_by" : "Ta wymiana jest obsługiwana przez ${provider}", "copy_address" : "Skopiuj adress", "exchange_result_confirm" : "Naciskając Potwierdź, wyślesz ${fetchingLabel} ${from} z twojego portfela ${walletName} na adres podany poniżej. Lub możesz wysłać z zewnętrznego portfela na poniższy adres / kod QR.\n\nNaciśnij Potwierdź, aby kontynuować lub wróć, aby zmienić kwoty.", - "exchange_result_description" : "Musisz wysłać co najmniej ${fetchingLabel} ${from} na adres podany na następnej stronie. Jeśli wyślesz kwotę niższą niż ${fetchingLabel} ${from}, może ona nie zostać przeliczona i może nie zostać zwrócona.", - "exchange_result_write_down_ID" : "*Skopiuj lub zanotuj swój identyfikator pokazany powyżej.", + "exchange_result_description" : "Musisz wysłać co najmniej ${fetchingLabel} ${from} na adres podany na następnej stronie. Jeśli wyślesz kwotę niższą niż ${fetchingLabel} ${from}, może ona nie zostać uwzględniona i może nie zostać zwrócona.", + "exchange_result_write_down_ID" : "*Skopiuj lub zanotuj identyfikator transakcji pokazany powyżej.", "confirm" : "Potwierdzać", "confirm_sending" : "Potwierdź wysłanie", "commit_transaction_amount_fee" : "Zatwierdź transakcję\nIlość: ${amount}\nOpłata: ${fee}", @@ -104,13 +104,13 @@ "transaction_sent" : "Transakcja wysłana!", "expired" : "Przedawniony", "time" : "${minutes}m ${seconds}s", - "send_xmr" : "Wysłać XMR", - "exchange_new_template" : "Nowy szablon", + "send_xmr" : "Wyślij XMR", + "exchange_new_template" : "Nowy szablon wymiany", "faq" : "FAQ", - "enter_your_pin" : "Wpisz Twój kod PIN", + "enter_your_pin" : "Wpisz kod PIN", "loading_your_wallet" : "Ładowanie portfela", @@ -123,17 +123,17 @@ "node_new" : "Nowy węzeł", "node_address" : "Adres węzła", "node_port" : "Port węzła", - "login" : "Zaloguj Się", + "login" : "Login", "password" : "Hasło", "nodes" : "Węzły", - "node_reset_settings_title" : "Resetowanie ustawień", + "node_reset_settings_title" : "Zresetuj ustawienia węzłów", "nodes_list_reset_to_default_message" : "Czy na pewno chcesz przywrócić ustawienia domyślne?", - "change_current_node" : "Czy na pewno chcesz przywrócić ustawienia domyślne? ${node}?", - "change" : "Zmiana", + "change_current_node" : "Czy na pewno chcesz wybrać ten węzeł? ${node}?", + "change" : "Zmień", "remove_node" : "Usuń węzeł", "remove_node_message" : "Czy na pewno chcesz usunąć wybrany węzeł?", - "remove" : "Usunąć", - "delete" : "Kasować", + "remove" : "Usuń", + "delete" : "Skasuj", "add_new_node" : "Dodaj nowy węzeł", "change_current_node_title" : "Zmień bieżący węzeł", "node_test" : "Test", @@ -142,8 +142,8 @@ "new_node_testing" : "Testowanie nowych węzłów", - "use" : "Używać ", - "digit_pin" : "-znak PIN", + "use" : "Użyj ", + "digit_pin" : "-znakowy PIN", "share_address" : "Udostępnij adres", @@ -152,46 +152,46 @@ "addresses" : "Adresy", "scan_qr_code" : "Zeskanuj kod QR, aby uzyskać adres", "qr_fullscreen" : "Dotknij, aby otworzyć pełnoekranowy kod QR", - "rename" : "Przemianować", + "rename" : "Zmień nazwę", "choose_account" : "Wybierz konto", "create_new_account" : "Stwórz nowe konto", "accounts_subaddresses" : "Konta i podadresy", "restore_restore_wallet" : "Przywróć portfel", - "restore_title_from_seed_keys" : "Przywróć z nasion / kluczy", - "restore_description_from_seed_keys" : "Odzyskaj swój portfel z nasion / kluczy, które zapisałeś w bezpiecznym miejscu", + "restore_title_from_seed_keys" : "Przywróć z seedów / kluczy", + "restore_description_from_seed_keys" : "Odzyskaj swój portfel z seedów / kluczy, które zapisałeś w bezpiecznym miejscu", "restore_next" : "Kolejny", "restore_title_from_backup" : "Przywróć z pliku kopii zapasowej", - "restore_description_from_backup" : "Możesz przywrócić całą aplikację Cake Wallet z plik kopii zapasowej", - "restore_seed_keys_restore" : "Przywracanie nasion / kluczy", - "restore_title_from_seed" : "Przywróć z nasion", - "restore_description_from_seed" : "Przywróć swój portfel z 25 słów lub 13-słowny kod kombinacji", + "restore_description_from_backup" : "Możesz przywrócić całą aplikację Cake Wallet z pliku kopii zapasowej", + "restore_seed_keys_restore" : "Przywracanie seedów / kluczy", + "restore_title_from_seed" : "Przywróć z seedów", + "restore_description_from_seed" : "Przywróć swój portfel z 25 lub 13-słownej frazy seed", "restore_title_from_keys" : "Przywróć z kluczy", - "restore_description_from_keys" : "Przywróć swój portfel z wygenerowanego naciśnięcia klawiszy zapisane z kluczy prywatnych", + "restore_description_from_keys" : "Przywróć swój portfel z kluczy prywatnych", "restore_wallet_name" : "Nazwa portfela", "restore_address" : "Adres", - "restore_view_key_private" : "Wyświetl klucz (prywatny)", - "restore_spend_key_private" : "Wydaj klucz (prywatny)", - "restore_recover" : "Wyzdrowieć", - "restore_wallet_restore_description" : "Opis przywracania portfela", - "restore_new_seed" : "Nowe nasienie", - "restore_active_seed" : "Aktywne nasiona", - "restore_bitcoin_description_from_seed" : "Przywróć swój portfel z kodu złożonego z 24 słów", - "restore_bitcoin_description_from_keys" : "Przywróć swój portfel z wygenerowanego ciągu WIF z kluczy prywatnych", - "restore_bitcoin_title_from_keys" : "Przywróć z WIF", - "restore_from_date_or_blockheight" : "Wprowadź datę na kilka dni przed utworzeniem tego portfela. Lub jeśli znasz wysokość bloku, wprowadź go zamiast tego", + "restore_view_key_private" : "Podaj klucz prywatny", + "restore_spend_key_private" : "Podaj prywatny klucz wglądu (view key)", + "restore_recover" : "Przywróć", + "restore_wallet_restore_description" : "Przywracanie portfela", + "restore_new_seed" : "Nowy seed", + "restore_active_seed" : "Aktywne seedy", + "restore_bitcoin_description_from_seed" : "Przywróć swój portfel z frazy seed złożonej z 24 słów", + "restore_bitcoin_description_from_keys" : "Przywróć swój portfel z klucza prywatnego", + "restore_bitcoin_title_from_keys" : "Przywróć z klucza prywatnego", + "restore_from_date_or_blockheight" : "Wprowadź datę na kilka dni przed utworzeniem tego portfela, lub jeśli znasz wysokość bloku, wprowadź go zamiast daty", - "seed_reminder" : "Zapisz je na wypadek zgubienia lub wyczyszczenia telefonu", - "seed_title" : "Ziarno", - "seed_share" : "Udostępnij ziarno", + "seed_reminder" : "Musisz zapisać tą fraze, bo bez niej możesz nie odzyskać portfela!", + "seed_title" : "Seed", + "seed_share" : "Udostępnij seed", "copy" : "Kopiuj", - "seed_language_choose" : "Proszę wybrać język początkowy:", - "seed_choose" : "Wybierz język początkowy", - "seed_language_next" : "Kolejny", + "seed_language_choose" : "Proszę wybrać język słów we frazie seed:", + "seed_choose" : "Wybierz język", + "seed_language_next" : "Następny", "seed_language_english" : "Angielski", "seed_language_chinese" : "Chiński", "seed_language_dutch" : "Holenderski", @@ -209,7 +209,7 @@ "send_address" : "Adres ${cryptoCurrency}", "send_payment_id" : "Identyfikator płatności (opcjonalny)", "all" : "WSZYSTKO", - "send_error_minimum_value" : "Minimalna wartość kwoty to 0,01", + "send_error_minimum_value" : "Minimalna wartość to 0,01", "send_error_currency" : "Waluta może zawierać tylko cyfry", "send_estimated_fee" : "Szacowana opłata:", "send_priority" : "Obecnie opłata ustalona jest na ${transactionPriority} priorytet.\nPriorytet transakcji można zmienić w ustawieniach", @@ -219,7 +219,7 @@ "send_amount" : "Ilość:", "send_fee" : "Opłata:", "send_name" : "Imię", - "send_got_it" : "Rozumiem", + "send_got_it" : "Wysłano", "send_sending" : "Wysyłanie...", "send_success" : "Twoje ${crypto} zostało pomyślnie wysłane", @@ -232,21 +232,21 @@ "settings_currency" : "Waluta", "settings_fee_priority" : "Priorytet opłaty", "settings_save_recipient_address" : "Zapisz adres odbiorcy", - "settings_personal" : "Osobisty", + "settings_personal" : "Osobiste", "settings_change_pin" : "Zmień PIN", "settings_change_language" : "Zmień język", "settings_allow_biometrical_authentication" : "Zezwalaj na uwierzytelnianie biometryczne", "settings_dark_mode" : "Tryb ciemny", "settings_transactions" : "Transakcje", "settings_trades" : "Transakcje", - "settings_display_on_dashboard_list" : "Wyświetl na liście kokpitu", - "settings_all" : "Cały", + "settings_display_on_dashboard_list" : "Wyświetl na pulpicie", + "settings_all" : "Wszystkie", "settings_only_trades" : "Tylko transakcje", "settings_only_transactions" : "Tylko transakcje", "settings_none" : "Żaden", "settings_support" : "Wsparcie", "settings_terms_and_conditions" : "Zasady i warunki", - "pin_is_incorrect" : "PPIN jest niepoprawny", + "pin_is_incorrect" : "PIN jest niepoprawny", "setup_pin" : "Ustaw PIN", @@ -254,47 +254,47 @@ "setup_successful" : "Twój kod PIN został pomyślnie skonfigurowany!", - "wallet_keys" : "Nasiono portfela/klucze", - "wallet_seed" : "Nasiono portfela", - "private_key" : "Prywatny klucz", + "wallet_keys" : "Klucze portfela", + "wallet_seed" : "Seed portfela", + "private_key" : "Klucz prywatny", "public_key" : "Klucz publiczny", - "view_key_private" : "Wyświetl klucz (prywatny)", - "view_key_public" : "Wyświetl klucz (publiczny)", - "spend_key_private" : "Wydaj klucz (prywatny)", - "spend_key_public" : "Wydaj klucz (publiczny)", - "copied_key_to_clipboard" : "Skopiowane ${key} do schowka", + "view_key_private" : "Prywatny Klucz Wglądu", + "view_key_public" : "Publiczny Klucz Wglądu", + "spend_key_private" : "Klucz prywatny", + "spend_key_public" : "Klucz publiczny", + "copied_key_to_clipboard" : "Skopiowaneo ${key} do schowka", "new_subaddress_title" : "Nowy adres", - "new_subaddress_label_name" : "Nazwa etykiety", + "new_subaddress_label_name" : "Etykieta nazwy adresu", "new_subaddress_create" : "Stwórz", - "address_label" : "Address label", + "address_label" : "Etykieta Adresu", "subaddress_title" : "Lista podadresów", - "trade_details_title" : "Szczegóły handlu", + "trade_details_title" : "Szczegóły transakcji", "trade_details_id" : "ID", - "trade_details_state" : "Stan", - "trade_details_fetching" : "Ujmujący", + "trade_details_state" : "Status", + "trade_details_fetching" : "Pobieranie", "trade_details_provider" : "Dostawca", - "trade_details_created_at" : "Utworzono w", + "trade_details_created_at" : "Utworzono ", "trade_details_pair" : "Para", "trade_details_copied" : "${title} skopiowane do schowka", - "trade_history_title" : "Historia handlu", + "trade_history_title" : "Historia wymian", "transaction_details_title" : "Szczegóły transakcji", - "transaction_details_transaction_id" : "Transakcja ID", + "transaction_details_transaction_id" : "ID Trancakcji", "transaction_details_date" : "Data", - "transaction_details_height" : "Wysokość", + "transaction_details_height" : "Wysokość Bloku", "transaction_details_amount" : "Ilość", "transaction_details_fee" : "Opłata", "transaction_details_copied" : "${title} skopiowane do schowka", - "transaction_details_recipient_address" : "Adresy odbiorców", + "transaction_details_recipient_address" : "Adres odbiorcy", "wallet_list_title" : "Portfel Monero", @@ -311,23 +311,23 @@ "widgets_restore_from_blockheight" : "Przywróć z wysokości bloku", "widgets_restore_from_date" : "Przywróć od daty", "widgets_or" : "lub", - "widgets_seed" : "Ziarno", + "widgets_seed" : "Seed", "router_no_route" : "Brak zdefiniowanej trasy dla ${name}", "error_text_account_name" : "Nazwa konta może zawierać tylko litery, cyfry\ni musi mieć od 1 do 15 znaków", - "error_text_contact_name" : "Nazwa kontaktu nie może zawierać` , ' \" symbolika\ni musi mieć od 1 do 32 znaków ", - "error_text_address" : "Wallet address must correspond to the type\nof cryptocurrency", + "error_text_contact_name" : "Nazwa kontaktu nie może zawierać symboli ` , ' \"\ni musi mieć od 1 do 32 znaków ", + "error_text_address" : "Adres musi odpowiadać typowi kryptowaluty", "error_text_node_address" : "Wpisz adres iPv4", "error_text_node_port" : "Port węzła może zawierać tylko liczby od 0 do 65535", "error_text_payment_id" : "ID może zawierać od 16 do 64 znaków w formacie szesnastkowym", "error_text_xmr" : "Wartość XMR nie może przekraczać dostępnego salda.\nLiczba cyfr ułamkowych musi być mniejsza lub równa 12", "error_text_fiat" : "Wartość kwoty nie może przekroczyć dostępnego salda.\nLiczba cyfr ułamkowych musi być mniejsza lub równa 2", - "error_text_subaddress_name" : "Nazwa podadresu nie może zawierać ` , ' \" symbolika\ni musi mieć od 1 do 20 znaków", + "error_text_subaddress_name" : "Nazwa podadresu nie może zawierać symboli ` , ' \"\ni musi mieć od 1 do 20 znaków", "error_text_amount" : "Kwota może zawierać tylko liczby", - "error_text_wallet_name" : "Nazwa portfela może zawierać tylko litery, cyfry, _ - symbole\ni musi mieć od 1 do 33 znaków", + "error_text_wallet_name" : "Nazwa portfela może zawierać tylko litery, cyfry lub symbole _ - \ni musi mieć od 1 do 33 znaków", "error_text_keys" : "Klucze portfela mogą zawierać tylko 64 znaki w systemie szesnastkowym", "error_text_crypto_currency" : "Liczba cyfr ułamkowych\nmusi być mniejsza lub równa 12", "error_text_minimal_limit" : "Wymiana dla ${provider} nie została utworzona. Kwota jest mniejsza niż minimalna: ${min} ${currency}", @@ -337,69 +337,69 @@ "auth_store_ban_timeout" : "przekroczenie limitu czasu", - "auth_store_banned_for" : "Bzbanowany za ", + "auth_store_banned_for" : "Zablokowany za ", "auth_store_banned_minutes" : " minuty", "auth_store_incorrect_password" : "Niepoprawny PIN", "wallet_store_monero_wallet" : "Portfel Monero", - "wallet_restoration_store_incorrect_seed_length" : "Nieprawidłowa długość nasion", + "wallet_restoration_store_incorrect_seed_length" : "Nieprawidłowa długość frazy seed", - "full_balance" : "Pełna równowaga", - "available_balance" : "Dostępne saldo", - "hidden_balance" : "Ukryta równowaga", + "full_balance" : "Pełne saldo", + "available_balance" : "Dostępne środki", + "hidden_balance" : "Ukryte saldo", "sync_status_syncronizing" : "SYNCHRONIZACJA", - "sync_status_syncronized" : "SYNCHRONIZOWANY", + "sync_status_syncronized" : "SYNCHRONIZOWANIE", "sync_status_not_connected" : "NIE POŁĄCZONY", "sync_status_starting_sync" : "ROZPOCZĘCIE SYNCHRONIZACJI", - "sync_status_failed_connect" : "NIEPOWIĄZANY", - "sync_status_connecting" : "ZŁĄCZONY", + "sync_status_failed_connect" : "POŁĄCZENIE NIEUDANE", + "sync_status_connecting" : "ŁĄCZENIE", "sync_status_connected" : "POŁĄCZONY", "sync_status_attempting_sync" : "PRÓBA SYNCHRONIZACJI", - "transaction_priority_slow" : "Powolny", - "transaction_priority_regular" : "Regularny", - "transaction_priority_medium" : "Średni", - "transaction_priority_fast" : "Szybki", - "transaction_priority_fastest" : "Najszybszy", + "transaction_priority_slow" : "Wolna(Zalecane)", + "transaction_priority_regular" : "Regularna", + "transaction_priority_medium" : "Średnia", + "transaction_priority_fast" : "Szybka", + "transaction_priority_fastest" : "Najszybsza", - "trade_for_not_created" : "Zamienić się za ${title} nie jest tworzony.", - "trade_not_created" : "Handel nie utworzony", - "trade_id_not_found" : "Handel ${tradeId} of ${title} nie znaleziono.", - "trade_not_found" : "Nie znaleziono handlu.", + "trade_for_not_created" : "Wymiana za ${title} nie została utworzona.", + "trade_not_created" : "Wymiana nie została utworzona", + "trade_id_not_found" : "Transakcja ${tradeId} ${title} nie znaleziona.", + "trade_not_found" : "Nie znaleziono transakcji.", - "trade_state_pending" : "W oczekiwaniu", - "trade_state_confirming" : "Potwierdzam", - "trade_state_trading" : "Handlowy", - "trade_state_traded" : "Handlowane", - "trade_state_complete" : "Kompletny", - "trade_state_to_be_created" : "Zostać stworzonym", - "trade_state_unpaid" : "Nie zapłacony", + "trade_state_pending" : "Oczekująca", + "trade_state_confirming" : "Potwierdzanie", + "trade_state_trading" : "Wymiana", + "trade_state_traded" : "Wymienione", + "trade_state_complete" : "Ukończona", + "trade_state_to_be_created" : "Została stworzona", + "trade_state_unpaid" : "Nie opłacona", "trade_state_underpaid" : "Niedopłacone", - "trade_state_paid_unconfirmed" : "Płatne niepotwierdzone", - "trade_state_paid" : "Płatny", - "trade_state_btc_sent" : "Wysłane", + "trade_state_paid_unconfirmed" : "Transakcja niepotwierdzona", + "trade_state_paid" : "Opłacona", + "trade_state_btc_sent" : "Wysłanie", "trade_state_timeout" : "Koniec czasu", - "trade_state_created" : "Stworzony", - "trade_state_finished" : "Skończone", + "trade_state_created" : "Stworzona", + "trade_state_finished" : "Zakończona", "change_language" : "Zmień język", "change_language_to" : "Zmień język na ${language}?", - "paste" : "Pasta", - "restore_from_seed_placeholder" : "Wpisz lub wklej tutaj swoją frazę kodową", + "paste" : "Wklej", + "restore_from_seed_placeholder" : "Wpisz lub wklej tutaj swoją frazę seed", "add_new_word" : "Dodaj nowe słowo", - "incorrect_seed" : "Wprowadzony tekst jest nieprawidłowy.", + "incorrect_seed" : "Wprowadzony seed jest nieprawidłowy.", - "biometric_auth_reason" : "Zeskanuj swój odcisk palca, aby go uwierzytelnić", + "biometric_auth_reason" : "Zeskanuj swój odcisk palca, aby uwierzytelnić", "version" : "Wersja ${currentVersion}", "openalias_alert_title" : "Wykryto Adres", - "openalias_alert_content" : "Będziesz wysyłać środki na\n${recipient_name}", + "openalias_alert_content" : "Wysyłasz środki na\n${recipient_name}", "card_address" : "Adres:", "buy" : "Kup", @@ -418,36 +418,36 @@ "change_wallet_alert_content" : "Czy chcesz zmienić obecny portfel na ${wallet_name}?", "creating_new_wallet" : "Tworzenie nowego portfela", - "creating_new_wallet_error" : "Pomyłka: ${description}", + "creating_new_wallet_error" : "Błąd: ${description}", "seed_alert_title" : "Uwaga", - "seed_alert_content" : "Ziarno to jedyny sposób na odzyskanie portfela. Zapisałeś to?", + "seed_alert_content" : "Fraza Seed to jedyny sposób na odzyskanie portfela. Zapisałeś ją?", "seed_alert_back" : "Wróć", "seed_alert_yes" : "Tak", "exchange_sync_alert_content" : "Poczekaj, aż portfel zostanie zsynchronizowany", "pre_seed_title" : "WAŻNY", - "pre_seed_description" : "Na następnej stronie zobaczysz serię ${words} słów. To jest Twoje unikalne i prywatne ziarno i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu poza aplikacją Cake Wallet.", - "pre_seed_button_text" : "Rozumiem. Pokaż mi moje nasienie", + "pre_seed_description" : "Na następnej stronie zobaczysz serię ${words} słów. To jest Twoje unikalna i prywatna fraza seed i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii telefonu. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu (np. na kartce w SEJFIE).", + "pre_seed_button_text" : "Rozumiem. Pokaż mi moją fraze seed", - "xmr_to_error" : "Pomyłka XMR.TO", - "xmr_to_error_description" : "Nieprawidłowa kwota. Maksymalny limit 8 cyfr po przecinku", + "xmr_to_error" : "Błąd XMR.TO", + "xmr_to_error_description" : "Nieprawidłowa kwota. Maksymalny limit to 8 cyfr po przecinku", "provider_error" : "${provider} pomyłka", "use_ssl" : "Użyj SSL", - "trusted" : "zaufany", + "trusted" : "Zaufany", "color_theme" : "Motyw kolorystyczny", - "light_theme" : "Lekki", - "bright_theme" : "Jasny", + "light_theme" : "Jasny", + "bright_theme" : "Biały", "dark_theme" : "Ciemny", "enter_your_note" : "Wpisz notatkę…", "note_optional" : "Notatka (opcjonalnie)", "note_tap_to_change" : "Notatka (dotknij, aby zmienić)", - "view_in_block_explorer" : "View in Block Explorer", - "view_transaction_on" : "View Transaction on ", + "view_in_block_explorer" : "Zobacz w eksploratorze bloków", + "view_transaction_on" : "Zobacz transakcje na ", "transaction_key" : "Klucz transakcji", "confirmations" : "Potwierdzenia", "recipient_address" : "Adres odbiorcy", @@ -456,27 +456,27 @@ "destination_tag" : "Tag docelowy:", "memo" : "Notatka:", - "backup" : "Kopię zapasową", + "backup" : "Kopia zapasowa", "change_password" : "Zmień hasło", - "backup_password" : "Hasło zapasowe", - "write_down_backup_password" : "Zapisz swoje hasło zapasowe, które jest używane do importowania plików kopii zapasowych.", + "backup_password" : "Hasło kpoii zapasowej", + "write_down_backup_password" : "Zapisz swoje hasło kopii zapasowej, które jest używane do importowania plików kopii zapasowych.", "export_backup" : "Eksportuj kopię zapasową", - "save_backup_password" : "Upewnij się, że zapisałeś swoje zapasowe hasło. Bez tego nie będziesz mógł importować plików kopii zapasowej.", + "save_backup_password" : "Upewnij się, że zapisałeś swoje hasło kopii zapasowej. Bez tego nie będziesz mógł zaimportować pliku kopii zapasowej.", "backup_file" : "Plik kopii zapasowej", "edit_backup_password" : "Edytuj hasło kopii zapasowej", - "save_backup_password_alert" : "Zapisz hasło zapasowe", - "change_backup_password_alert" : "Twoje poprzednie pliki kopii zapasowej nie będą dostępne do zaimportowania z nowym hasłem kopii zapasowej. Nowe hasło zapasowe będzie używane tylko dla nowych plików kopii zapasowych. Czy na pewno chcesz zmienić hasło zapasowe?", + "save_backup_password_alert" : "Zapisz hasło kopii zapasowej", + "change_backup_password_alert" : "Twoje poprzednie pliki kopii zapasowej nie będą dostępne do zaimportowania z nowym hasłem kopii zapasowej. Nowe hasło kopii zapasowej będzie używane tylko dla nowych plików kopii zapasowych. Czy na pewno chcesz zmienić hasło zapasowe?", - "enter_backup_password" : "Wprowadź tutaj hasło zapasowe", + "enter_backup_password" : "Wprowadź tutaj hasło kopii zapasowej", "select_backup_file" : "Wybierz plik kopii zapasowej", - "import" : "Import", - "please_select_backup_file" : "Wybierz plik kopii zapasowej i wprowadź hasło zapasowe.", + "import" : "Zaimportuj", + "please_select_backup_file" : "Wybierz plik kopii zapasowej i wprowadź hasło.", "fixed_rate" : "Stała stawka", - "fixed_rate_alert" : "Będziesz mógł wprowadzić kwotę otrzymaną, gdy zaznaczony jest tryb stałej stawki. Czy chcesz przejść do trybu stałej stawki?", + "fixed_rate_alert" : "Będziesz mógł wprowadzić kwotę do otrzymania, gdy wybrany bedzie tryb stałego przeliczenia. Czy chcesz przejść do trybu stałej stawki?", - "xlm_extra_info" : "Nie zapomnij podać identyfikatora notatki podczas wysyłania transakcji XLM do wymiany", + "xlm_extra_info" : "Nie zapomnij podać dodatkowego identyfikatora (memo) podczas wysyłania transakcji XLM do wymiany", "xrp_extra_info" : "Nie zapomnij podać tagu docelowego podczas wysyłania transakcji XRP do wymiany", "exchange_incorrect_current_wallet_for_xmr" : "Jeśli chcesz wymienić XMR z salda Cake Wallet Monero, najpierw przełącz się na portfel Monero.", @@ -484,12 +484,12 @@ "unconfirmed" : "Niepotwierdzony", "displayable" : "Wyświetlane", - "submit_request" : "złożyć wniosek", + "submit_request" : "Złóż wniosek", - "buy_alert_content" : "Obecnie obsługujemy tylko zakup Bitcoin i Litecoin. Aby kupić Bitcoin lub Litecoin, utwórz lub przełącz się na swój portfel Bitcoin lub Litecoin.", + "buy_alert_content" : "Obecnie obsługujemy tylko zakup Bitcoina i Litecoina. Aby kupić Bitcoin lub Litecoin, utwórz lub przełącz się na swój portfel Bitcoin lub Litecoin.", "sell_alert_content": "Obecnie obsługujemy tylko sprzedaż Bitcoina. Aby sprzedać Bitcoin, utwórz lub przełącz się na swój portfel Bitcoin.", - "outdated_electrum_wallet_description" : "Nowe portfele Bitcoin utworzone w Cake mają teraz ziarno składające się z 24 słów. Konieczne jest utworzenie nowego portfela Bitcoin i przeniesienie wszystkich środków do nowego portfela na 24 słowa oraz zaprzestanie korzystania z portfeli z zalążkiem na 12 słów. Zrób to natychmiast, aby zabezpieczyć swoje fundusze.", + "outdated_electrum_wallet_description" : "Nowe portfele Bitcoin utworzone w Cake mają teraz fraze seed składające się z 24 słów. Konieczne jest utworzenie nowego portfela Bitcoin i przeniesienie wszystkich środków do nowego portfela na 24 słowa oraz zaprzestanie korzystania z portfeli z frazą seed na 12 słów. Zrób to natychmiast, aby zabezpieczyć swoje fundusze.", "understand" : "Rozumiem", "apk_update" : "Aktualizacja APK", @@ -498,19 +498,19 @@ "buy_with" : "Kup za pomocą", "moonpay_alert_text" : "Wartość kwoty musi być większa lub równa ${minAmount} ${fiatCurrency}", - "outdated_electrum_wallet_receive_warning": "Jeśli ten portfel ma 12-wyrazowy seed i został utworzony w Cake, NIE Wpłacaj Bitcoina do tego portfela. Wszelkie BTC przeniesione do tego portfela mogą zostać utracone. Utwórz nowy portfel z 24 słowami (dotknij menu w prawym górnym rogu, wybierz Portfele, wybierz Utwórz nowy portfel, a następnie Bitcoin) i NATYCHMIAST przenieś tam swoje BTC. Nowe (24 słowa) portfele BTC firmy Cake są bezpieczne", + "outdated_electrum_wallet_receive_warning": "Jeśli ten portfel ma 12-wyrazowy seed i został utworzony w Cake, NIE Wpłacaj Bitcoina do tego portfela. Wszelkie BTC przeniesione do tego portfela mogą zostać utracone. Utwórz nowy portfel z 24 słowami (dotknij menu w prawym górnym rogu, wybierz Portfele, wybierz Utwórz nowy portfel, a następnie Bitcoin) i NATYCHMIAST przenieś tam swoje BTC. Nowe (24 słowa) portfele BTC Cake Wallet są bezpieczne", "do_not_show_me": "Nie pokazuj mi tego ponownie", "unspent_coins_title" : "Niewydane monety", "unspent_coins_details_title" : "Szczegóły niewydanych monet", - "freeze" : "Zamrażać", - "frozen" : "Mrożony", + "freeze" : "Zamróź", + "frozen" : "Zamrożone", "coin_control" : "Kontrola monet (opcjonalnie)", "address_detected" : "Wykryto adres", - "address_from_domain" : "Ten adres jest od ${domain} na Unstoppable Domains", + "address_from_domain" : "Ten adres to ${domain} na Unstoppable Domains", - "add_receiver" : "Dodaj kolejny odbiornik (opcjonalnie)", + "add_receiver" : "Dodaj kolejnego odbiorcę (opcjonalnie)", "manage_yats" : "Zarządzaj Yats", "yat_alert_title" : "Łatwiejsze wysyłanie i odbieranie kryptowalut dzięki Yat", @@ -521,21 +521,21 @@ "yat" : "Yat", "connect_yats": "Połącz Yats", "address_from_yat" : "Ten adres jest od ${emoji} na Yat", - "yat_error" : "Pomyłka Yata", + "yat_error" : "Błąd Yat", "yat_error_content" : "Brak adresów powiązanych z tym Yat. Wypróbuj inny Yat", "choose_address" : "\n\nWybierz adres:", - "yat_popup_title" : "Twój adres portfela może być emojified.", + "yat_popup_title" : "Twój adres portfela może być zemotkowany.", "yat_popup_content" : "Możesz teraz wysyłać i odbierać krypto w Cake Wallet za pomocą swojego Yat – krótkiej nazwy użytkownika opartej na emotikonach. Zarządzaj Yats w dowolnym momencie na ekranie ustawień", - "second_intro_title" : "Jeden adres emoji, aby rządzić nimi wszystkimi", + "second_intro_title" : "Jeden adres emoji, aby zarzadzać wszystkimi walutami", "second_intro_content" : "Twój Yat to jeden unikalny adres emoji, który zastępuje wszystkie Twoje długie adresy szesnastkowe dla wszystkich Twoich walut.", "third_intro_title" : "Yat ładnie bawi się z innymi", "third_intro_content" : "Yats mieszkają również poza Cake Wallet. Każdy adres portfela na ziemi można zastąpić Yat!", - "learn_more" : "Ucz się więcej", + "learn_more" : "Dowiedz się więcej", "search": "Szukaj", "search_language": "Wyszukaj język", "search_currency": "Wyszukaj walutę", "new_template" : "Nowy szablon", - "electrum_address_disclaimer": "Za każdym razem, gdy korzystasz z jednego z nich, generujemy nowe adresy, ale poprzednie adresy nadal działają", + "electrum_address_disclaimer": "Za każdym razem, gdy wykorzystasz adres, dla wiekszej prywatności generujemy nowy, ale poprzednie adresy nadal działają, i moga odbierać środki", "wallet_name_exists": "Portfel o tej nazwie już istnieje", "market_place": "Rynek", "cake_pay_title": "Karty podarunkowe Cake Pay", @@ -553,16 +553,16 @@ "reset_password": "Zresetuj hasło", "gift_cards": "Karty podarunkowe", "setup_your_debit_card": "Skonfiguruj swoją kartę debetową", - "no_id_required": "Nie wymagamy ID. Doładuj i wydawaj gdziekolwiek", - "how_to_use_card": "Jak korzystać z tej karty", + "no_id_required": "Nie wymagamy Dowodu. Doładuj i wydawaj gdziekolwiek", + "how_to_use_card": "Jak korzystać z tej karty?", "purchase_gift_card": "Kup kartę podarunkową", "verification": "Weryfikacja", - "fill_code": "Proszę wpisać kod weryfikacyjny podany w wiadomości e-mail", - "dont_get_code": "Nie odbierasz kodu?", + "fill_code": "Proszę wpisać kod weryfikacyjny który otrzymałeś w wiadomości e-mail", + "dont_get_code": "Nie dostałeś kodu?", "resend_code": "Wyślij go ponownie", "debit_card": "Karta debetowa", "cakepay_prepaid_card": "Przedpłacona karta debetowa CakePay", - "no_id_needed": "Nie potrzeba ID!", + "no_id_needed": "Nie potrzeba Dowodu!", "frequently_asked_questions": "Często zadawane pytania", "debit_card_terms": "Przechowywanie i używanie numeru karty płatniczej (oraz danych uwierzytelniających odpowiadających numerowi karty płatniczej) w tym portfelu cyfrowym podlega Warunkom odpowiedniej umowy posiadacza karty z wydawcą karty płatniczej, zgodnie z obowiązującym od od czasu do czasu.", "please_reference_document": "Proszę odwołać się do poniższych dokumentów, aby uzyskać więcej informacji.", @@ -626,7 +626,7 @@ "mark_as_redeemed": "Oznacz jako wykorzystany", "more_options": "Więcej opcji", "awaiting_payment_confirmation": "Oczekiwanie na potwierdzenie płatności", - "transaction_sent_notice": "Jeśli ekran nie pojawi się po 1 minucie, sprawdź eksplorator bloków i swój e-mail.", + "transaction_sent_notice": "Jeśli ekran nie zmieni się po 1 minucie, sprawdź eksplorator bloków i swój e-mail.", "agree": "Zgadzam się", "in_store": "W Sklepie", "generating_gift_card": "Generowanie karty podarunkowej", @@ -637,7 +637,7 @@ "open_gift_card": "Otwórz kartę podarunkową", "contact_support": "Skontaktuj się z pomocą techniczną", "gift_cards_unavailable": "Karty podarunkowe można obecnie kupić tylko za pośrednictwem Monero, Bitcoin i Litecoin", - "introducing_cake_pay": "Przedstawiamy Ciasto Pay!", + "introducing_cake_pay": "Przedstawiamy Cake Pay!", "cake_pay_learn_more": "Kupuj i wykorzystuj karty podarunkowe od razu w aplikacji!\nPrzesuń od lewej do prawej, aby dowiedzieć się więcej.", "automatic": "Automatyczny", "fixed_pair_not_supported": "Ta stała para nie jest obsługiwana na wybranych giełdach", @@ -654,7 +654,7 @@ "low_fee_alert": "Obecnie korzystasz z niskiego priorytetu opłaty sieciowej. Może to spowodować długie oczekiwanie, różne stawki lub anulowane transakcje. Zalecamy ustawienie wyższej opłaty, aby zapewnić lepsze wrażenia.", "ignor": "Ignorować", "use_suggested": "Użyj sugerowane", - "do_not_share_warning_text" : "Nie udostępniaj ich nikomu innemu, w tym pomocy.\n\nTwoje środki mogą i zostaną skradzione!", + "do_not_share_warning_text" : "NIE udostępniaj ich nikomu innemu, w tym pomocy technicznej.\n\nTwoje środki wtedy prawdopodobnie zostaną skradzione!", "help": "pomoc", "all_transactions": "Wszystkie transakcje", "all_trades": "Wszystkie operacje", @@ -672,12 +672,12 @@ "advanced_privacy_settings": "Zaawansowane ustawienia prywatności", "settings_can_be_changed_later": "Te ustawienia można później zmienić w ustawieniach aplikacji", "add_custom_node": "Dodaj nowy węzeł niestandardowy", - "disable_fiat": "Wyłącz fiat", - "fiat_api": "API Fiata", + "disable_fiat": "Wyłącz waluty FIAT", + "fiat_api": "API Walut FIAT", "disabled": "Wyłączone", - "enabled": "Włączony", - "tor_only": "Tylko Tor", - "unmatched_currencies": "Waluta Twojego obecnego portfela nie odpowiada walucie zeskanowanego kodu QR", + "enabled": "Włączone", + "tor_only": "Tylko sieć Tor", + "unmatched_currencies": "Waluta Twojego obecnego portfela nie zgadza się z waluctą zeskanowanego kodu QR", "contact_list_contacts": "Łączność", "contact_list_wallets": "Moje portfele" } From f1688703f243e850bd2d98e09f0a6458dfeaefa4 Mon Sep 17 00:00:00 2001 From: Telsbat <115116835+Telsbat@users.noreply.github.com> Date: Mon, 9 Jan 2023 17:08:17 +0100 Subject: [PATCH 099/100] Update strings_pl.arb --- res/values/strings_pl.arb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 104e6eb90..dd200cc25 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -428,7 +428,7 @@ "exchange_sync_alert_content" : "Poczekaj, aż portfel zostanie zsynchronizowany", "pre_seed_title" : "WAŻNY", - "pre_seed_description" : "Na następnej stronie zobaczysz serię ${words} słów. To jest Twoje unikalna i prywatna fraza seed i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii telefonu. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu (np. na kartce w SEJFIE).", + "pre_seed_description" : "Na następnej stronie zobaczysz serię ${words} słów. To jest Twoja unikalna i prywatna fraza seed i jest to JEDYNY sposób na odzyskanie portfela w przypadku utraty lub awarii telefonu. Twoim obowiązkiem jest zapisanie go i przechowywanie w bezpiecznym miejscu (np. na kartce w SEJFIE).", "pre_seed_button_text" : "Rozumiem. Pokaż mi moją fraze seed", "xmr_to_error" : "Błąd XMR.TO", From 42948a6d122e093072ee137f63860383a136abc5 Mon Sep 17 00:00:00 2001 From: Justin Ehrenhofer Date: Mon, 9 Jan 2023 10:47:14 -0600 Subject: [PATCH 100/100] Minor: license change --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 4f80e683b..4268b9710 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Cake Labs LLC +Copyright (c) 2018-2023 Cake Labs LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal