From ce8e498cacb2616e243228f69337b20753e4ef8b Mon Sep 17 00:00:00 2001 From: Godwin Asuquo <41484542+godilite@users.noreply.github.com> Date: Thu, 1 Jun 2023 15:46:17 +0300 Subject: [PATCH 01/16] Revert rename nga flag (#952) --- assets/images/flags/{yor.png => nga.png} | Bin lib/entities/language_service.dart | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/images/flags/{yor.png => nga.png} (100%) diff --git a/assets/images/flags/yor.png b/assets/images/flags/nga.png similarity index 100% rename from assets/images/flags/yor.png rename to assets/images/flags/nga.png diff --git a/lib/entities/language_service.dart b/lib/entities/language_service.dart index 05e84cef9..87ee99ff5 100644 --- a/lib/entities/language_service.dart +++ b/lib/entities/language_service.dart @@ -55,11 +55,11 @@ class LanguageService { 'cs': 'czk', 'ur': 'pak', 'id': 'idn', - 'yo': 'yor', + 'yo': 'nga', 'ha': 'hau' }; - static final list = {}; + static final list = {}; static void loadLocaleList() { supportedLocales.forEach((key, value) { From 5e270df568f3b5967ff94aec3ff33f13a68d8d04 Mon Sep 17 00:00:00 2001 From: Mathias Herberts Date: Mon, 5 Jun 2023 14:40:34 +0100 Subject: [PATCH 02/16] Fixed 2FA related French localization (#956) --- res/values/strings_fr.arb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index a26cbb216..1653890be 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -709,22 +709,22 @@ "error_text_input_above_maximum_limit" : "Le montant est supérieur au maximum", "show_market_place" :"Afficher la place de marché", "prevent_screenshots": "Empêcher les captures d'écran et l'enregistrement d'écran", - "modify_2fa": "Modifier le gâteau 2FA", - "disable_cake_2fa": "Désactiver le gâteau 2FA", - "question_to_disable_2fa":"Êtes-vous sûr de vouloir désactiver Cake 2FA ? Un code 2FA ne sera plus nécessaire pour accéder au portefeuille et à certaines fonctions.", + "modify_2fa": "Modifier les paramètres Cake 2FA", + "disable_cake_2fa": "Désactiver Cake 2FA", + "question_to_disable_2fa":"Êtes-vous sûr de vouloir désactiver Cake 2FA ? Un code 2FA ne sera plus nécessaire pour accéder au portefeuille (wallet) et à certaines fonctions.", "disable": "Désactiver", - "setup_2fa": "Gâteau d'installation 2FA", + "setup_2fa": "Paramétrer Cake 2FA", "verify_with_2fa": "Vérifier avec Cake 2FA", "totp_code": "Code TOTP", - "please_fill_totp": "Veuillez renseigner le code à 8 chiffres présent sur votre autre appareil", - "totp_2fa_success": "Succès! Cake 2FA activé pour ce portefeuille. N'oubliez pas de sauvegarder votre graine mnémonique au cas où vous perdriez l'accès au portefeuille.", + "please_fill_totp": "Veuillez renseigner le code à 8 chiffres affiché sur votre autre appareil", + "totp_2fa_success": "Succès! Cake 2FA est activé pour ce portefeuille. N'oubliez pas de sauvegarder votre phrase secrète (seed) au cas où vous perdriez l'accès au portefeuille (wallet).", "totp_verification_success" :"Vérification réussie !", - "totp_2fa_failure": "Code incorrect. Veuillez essayer un code différent ou générer une nouvelle clé secrète. Utilisez une application 2FA compatible qui prend en charge les codes à 8 chiffres et SHA512.", + "totp_2fa_failure": "Code incorrect. Veuillez essayer un code différent ou générer un nouveau secret TOTP. Utilisez une application 2FA compatible qui prend en charge les codes à 8 chiffres et SHA512.", "enter_totp_code": "Veuillez entrer le code TOTP.", - "add_secret_code":"Ajouter ce code secret à un autre appareil", - "totp_secret_code":"Code secret TOTP", + "add_secret_code":"Configurer un autre appareil à l'aide de ce secret TOTP", + "totp_secret_code":"Secret TOTP", "important_note": "Note importante", - "setup_2fa_text": "Cake 2FA n'est PAS aussi sûr que le stockage à froid. 2FA protège contre les types d'attaques de base, comme votre ami fournissant votre empreinte digitale pendant que vous dormez.\n\n Cake 2FA ne protège PAS contre un appareil compromis par un attaquant sophistiqué.\n\n Si vous perdez l'accès à vos codes 2FA , VOUS PERDREZ L'ACCÈS À CE PORTEFEUILLE. Vous devrez restaurer votre portefeuille à partir de graines mnémotechniques. VOUS DEVEZ DONC SAUVEGARDER VOS SEMENCES MNEMONIQUES ! De plus, quelqu'un ayant accès à vos graines mnémoniques pourra voler vos fonds, en contournant Cake 2FA.\n\n Le personnel d'assistance de Cake ne pourra pas vous aider si vous perdez l'accès à vos graines mnémoniques, puisque Cake est un portefeuille non dépositaire.", + "setup_2fa_text": "Cake 2FA (Authentification à 2 Facteurs) n'est PAS aussi sûr que le stockage à froid. Cake 2FA protège contre les attaques basiques, comme un ami fournissant votre empreinte digitale pendant que vous dormez.\n\n Cake 2FA ne protège PAS contre un appareil compromis par un attaquant sophistiqué.\n\n Si vous perdez l'accès à vos codes 2FA , VOUS PERDREZ L'ACCÈS À CE PORTEFEUILLE (WALLET). Vous devrez restaurer votre portefeuille à partir de sa phrase secrète (seed). VOUS DEVEZ DONC SAUVEGARDER VOTRE PHRASE SECRÈTE ! De plus, quelqu'un ayant accès à votre phrase secrète pourra voler vos fonds, en contournant Cake 2FA.\n\n Le personnel d'assistance de Cake ne pourra pas vous aider si vous perdez l'accès à votre phrase secrète, puisque Cake est un portefeuille non dépositaire (non custodial).", "setup_totp_recommended": "Configurer TOTP (recommandé)", "disable_buy": "Désactiver l'action d'achat", "disable_sell": "Désactiver l'action de vente" From 8747d2fe59a3a735e4243f228a03dbcf542df0f1 Mon Sep 17 00:00:00 2001 From: Mathias Herberts Date: Mon, 5 Jun 2023 14:41:15 +0100 Subject: [PATCH 03/16] Fixed for v4.6.4 (#955) --- res/values/strings_fr.arb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 1653890be..edceb9386 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -685,14 +685,14 @@ "arrive_in_this_address" : "${currency} ${tag}arrivera à cette adresse", "do_not_send": "Ne pas envoyer", "error_dialog_content": "Oups, nous avons rencontré une erreur.\n\nMerci d'envoyer le rapport d'erreur à notre équipe d'assistance afin de nous permettre d'améliorer l'application.", - "scan_qr_code": "Scannez le code QR", - "cold_or_recover_wallet": "Ajoutez un cold wallet ou récupérez un paper wallet", - "please_wait": "S'il vous plaît, attendez", - "sweeping_wallet": "Portefeuille de balayage", - "sweeping_wallet_alert": "Cela ne devrait pas prendre longtemps. NE QUITTEZ PAS CET ÉCRAN OU LES FONDS BALAYÉS POURRAIENT ÊTRE PERDUS", + "scan_qr_code": "Scannez le QR code", + "cold_or_recover_wallet": "Ajoutez un portefeuille froid (cold wallet) ou récupérez un portefeuille papier (paper wallet)", + "please_wait": "Merci de patienter", + "sweeping_wallet": "Portefeuille (wallet) de consolidation", + "sweeping_wallet_alert": "Cette opération ne devrait pas prendre longtemps. NE QUITTEZ PAS CET ÉCRAN OU LES FONDS CONSOLIDÉS POURRAIENT ÊTRE PERDUS", "decimal_places_error": "Trop de décimales", "edit_node": "Modifier le nœud", - "frozen_balance": "Équilibre gelé", + "frozen_balance": "Solde gelé", "invoice_details": "Détails de la facture", "donation_link_details": "Détails du lien de don", "anonpay_description": "Générez ${type}. Le destinataire peut ${method} avec n'importe quelle crypto-monnaie prise en charge, et vous recevrez des fonds dans ce portefeuille (wallet).", From 3b073d9751006103e442cdd2ee73d155258ea3cf Mon Sep 17 00:00:00 2001 From: Adegoke David <64401859+Blazebrain@users.noreply.github.com> Date: Tue, 6 Jun 2023 13:13:49 +0100 Subject: [PATCH 04/16] Cw-410 Null Issue With 2FA (#960) * chore: Setup * hotfix: null check operator used when totp arguments are null causing issues * hotfix: null check operator used when totp arguments are null causing issues * hotfix: null check operator used when totp arguments are null causing issues * hotfix: null check operator used when totp arguments are null causing issues * fix: Review changes --------- Co-authored-by: David Adegoke --- lib/reactions/check_connection.dart | 3 +- .../setup_2fa/setup_2fa_enter_code_page.dart | 30 +++++++++---------- lib/store/settings_store.dart | 1 - macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- pubspec_base.yaml | 4 +-- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/reactions/check_connection.dart b/lib/reactions/check_connection.dart index 6b7b79941..9185ffe15 100644 --- a/lib/reactions/check_connection.dart +++ b/lib/reactions/check_connection.dart @@ -1,10 +1,9 @@ import 'dart:async'; +import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cake_wallet/store/settings_store.dart'; -import 'package:connectivity/connectivity.dart'; - Timer? _checkConnectionTimer; void startCheckConnectionReaction( diff --git a/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart b/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart index 49763a797..e88b1090b 100644 --- a/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart +++ b/lib/src/screens/setup_2fa/setup_2fa_enter_code_page.dart @@ -43,26 +43,24 @@ class TotpAuthCodePageState extends State { @override void initState() { - _reaction ??= reaction((_) => widget.setup2FAViewModel.state, (ExecutionState state) { - if (state is ExecutedSuccessfullyState) { + if(widget.totpArguments.onTotpAuthenticationFinished != null) { + _reaction ??= reaction((_) => widget.setup2FAViewModel.state, (ExecutionState state) { WidgetsBinding.instance.addPostFrameCallback((_) { - widget.totpArguments.onTotpAuthenticationFinished!(true, this); - }); - } + if (state is ExecutedSuccessfullyState) { + widget.totpArguments.onTotpAuthenticationFinished!(true, this); + } - if (state is FailureState) { - print(state.error); - WidgetsBinding.instance.addPostFrameCallback((_) { - widget.totpArguments.onTotpAuthenticationFinished!(false, this); - }); - } + if (state is FailureState) { + print(state.error); + widget.totpArguments.onTotpAuthenticationFinished!(false, this); + } - if (state is AuthenticationBanned) { - WidgetsBinding.instance.addPostFrameCallback((_) { - widget.totpArguments.onTotpAuthenticationFinished!(false, this); - }); - } + if (state is AuthenticationBanned) { + widget.totpArguments.onTotpAuthenticationFinished!(false, this); + } + }); }); + } super.initState(); } diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 9dfdacd39..69e92d530 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -580,7 +580,6 @@ abstract class SettingsStoreBase with Store { if (Platform.isAndroid) { final androidInfo = await deviceInfoPlugin.androidInfo; deviceName = '${androidInfo.brand}%20${androidInfo.manufacturer}%20${androidInfo.model}'; - print(deviceName); } else if (Platform.isIOS) { final iosInfo = await deviceInfoPlugin.iosInfo; deviceName = iosInfo.model; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index c7f78b30f..c55241797 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,7 +5,7 @@ import FlutterMacOS import Foundation -import connectivity_macos +import connectivity_plus_macos import cw_monero import device_info_plus import devicelocale diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 73c835f4a..2c8908aea 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -56,8 +56,8 @@ dependencies: # password: ^1.0.0 basic_utils: ^4.3.0 get_it: ^7.2.0 - connectivity: ^3.0.3 - # connectivity_plus: ^2.3.5 + # connectivity: ^3.0.3 + connectivity_plus: ^2.3.5 keyboard_actions: ^4.0.1 another_flushbar: ^1.12.29 archive: ^3.3.0 From e8446f0c9899592aa76f5969983b3410771d5c1b Mon Sep 17 00:00:00 2001 From: Godwin Asuquo <41484542+godilite@users.noreply.github.com> Date: Thu, 8 Jun 2023 02:16:52 +0300 Subject: [PATCH 05/16] CW-400 investigate cupertino nav bar null exception (#943) * Fix null error on back navigation after pushReplacementNamed * Fix null error on back navigation after pushReplacementNamed * Close all visible keyboard for page navigation context * Fix issue with market place navigation * Remove focus before back navigation * Fix background color * Fix background color * Fix background color --- lib/di.dart | 5 +- lib/router.dart | 7 +- lib/src/screens/dashboard/dashboard_page.dart | 11 +- .../desktop_dashboard_actions.dart | 7 +- .../dashboard/widgets/address_page.dart | 6 +- .../dashboard/widgets/market_place_page.dart | 24 ++- .../ionia/auth/ionia_welcome_page.dart | 14 +- .../ionia/cards/ionia_manage_cards_page.dart | 17 +- .../screens/receive/anonpay_invoice_page.dart | 199 ++++++++++-------- .../screens/restore/wallet_restore_page.dart | 2 + .../dashboard/market_place_view_model.dart | 17 ++ .../ionia_gift_cards_list_view_model.dart | 11 +- 12 files changed, 183 insertions(+), 137 deletions(-) create mode 100644 lib/view_model/dashboard/market_place_view_model.dart diff --git a/lib/di.dart b/lib/di.dart index 0f59c702f..85dd7154b 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -39,6 +39,7 @@ import 'package:cake_wallet/utils/payment_request.dart'; import 'package:cake_wallet/view_model/dashboard/desktop_sidebar_view_model.dart'; import 'package:cake_wallet/view_model/anon_invoice_page_view_model.dart'; import 'package:cake_wallet/view_model/anonpay_details_view_model.dart'; +import 'package:cake_wallet/view_model/dashboard/market_place_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/receive_option_view_model.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'; @@ -873,6 +874,8 @@ Future setup({ getIt.registerFactory(() => IoniaGiftCardsListViewModel(ioniaService: getIt.get())); + getIt.registerFactory(()=> MarketPlaceViewModel(getIt.get())); + getIt.registerFactory(() => IoniaAuthViewModel(ioniaService: getIt.get())); getIt.registerFactoryParam( @@ -902,7 +905,7 @@ Future setup({ return IoniaVerifyIoniaOtp(getIt.get(), email, isSignIn); }); - getIt.registerFactory(() => IoniaWelcomePage(getIt.get())); + getIt.registerFactory(() => IoniaWelcomePage()); getIt.registerFactoryParam((List args, _) { final merchant = args.first as IoniaMerchant; diff --git a/lib/router.dart b/lib/router.dart index e61d3f0ac..902af61dc 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -175,7 +175,6 @@ Route createRoute(RouteSettings settings) { fullscreenDialog: true); } else if (isSingleCoin) { return MaterialPageRoute( - fullscreenDialog: true, builder: (_) => getIt.get( param1: availableWalletTypes.first )); @@ -196,7 +195,6 @@ Route createRoute(RouteSettings settings) { case Routes.restoreWallet: return MaterialPageRoute( - fullscreenDialog: true, builder: (_) => getIt.get( param1: settings.arguments as WalletType)); @@ -206,6 +204,7 @@ Route createRoute(RouteSettings settings) { case Routes.dashboard: return CupertinoPageRoute( + settings: settings, builder: (_) => getIt.get()); case Routes.send: @@ -468,7 +467,8 @@ Route createRoute(RouteSettings settings) { return CupertinoPageRoute( builder: (_) => getIt.get()); case Routes.ioniaManageCardsPage: - return CupertinoPageRoute(builder: (_) => getIt.get()); + return CupertinoPageRoute( + builder: (_) => getIt.get()); case Routes.ioniaBuyGiftCardPage: final args = settings.arguments as List; @@ -536,7 +536,6 @@ Route createRoute(RouteSettings settings) { case Routes.anonPayInvoicePage: final args = settings.arguments as List; return CupertinoPageRoute( - fullscreenDialog: true, builder: (_) => getIt.get(param1: args)); case Routes.anonPayReceivePage: diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 2b485aa7a..47a62f53a 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -5,7 +5,7 @@ import 'package:cake_wallet/entities/main_actions.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/market_place_page.dart'; import 'package:cake_wallet/utils/version_comparator.dart'; -import 'package:cake_wallet/wallet_type_utils.dart'; +import 'package:cake_wallet/view_model/dashboard/market_place_view_model.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/yat_emoji_id.dart'; @@ -27,8 +27,6 @@ import 'package:mobx/mobx.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart'; import 'package:cake_wallet/main.dart'; -import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart'; -import 'package:url_launcher/url_launcher.dart'; import 'package:cake_wallet/src/screens/release_notes/release_notes_screen.dart'; class DashboardPage extends StatelessWidget { @@ -251,7 +249,12 @@ class _DashboardPageView extends BasePage { if (dashboardViewModel.shouldShowMarketPlaceInDashboard) { pages.add(Semantics( label: 'Marketplace Page', - child: MarketPlacePage(dashboardViewModel: dashboardViewModel))); + child: MarketPlacePage( + dashboardViewModel: dashboardViewModel, + marketPlaceViewModel: getIt.get(), + ), + ), + ); } pages.add(Semantics(label: 'Balance Page', child: balancePage)); pages.add(Semantics( diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart index e5fa42390..e8fa54b49 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_dashboard_actions.dart @@ -1,7 +1,9 @@ +import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/entities/main_actions.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_action_button.dart'; import 'package:cake_wallet/src/screens/dashboard/widgets/market_place_page.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; +import 'package:cake_wallet/view_model/dashboard/market_place_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; @@ -70,7 +72,10 @@ class DesktopDashboardActions extends StatelessWidget { ], ), Expanded( - child: MarketPlacePage(dashboardViewModel: dashboardViewModel), + child: MarketPlacePage( + dashboardViewModel: dashboardViewModel, + marketPlaceViewModel: getIt.get(), + ), ), ], ); diff --git a/lib/src/screens/dashboard/widgets/address_page.dart b/lib/src/screens/dashboard/widgets/address_page.dart index a5fac2053..82a867058 100644 --- a/lib/src/screens/dashboard/widgets/address_page.dart +++ b/lib/src/screens/dashboard/widgets/address_page.dart @@ -273,7 +273,7 @@ class AddressPage extends BasePage { reaction((_) => receiveOptionViewModel.selectedReceiveOption, (ReceivePageOption option) { switch (option) { case ReceivePageOption.anonPayInvoice: - Navigator.pushReplacementNamed( + Navigator.pushNamed( context, Routes.anonPayInvoicePage, arguments: [addressListViewModel.address.address, option], @@ -285,7 +285,7 @@ class AddressPage extends BasePage { final onionUrl = sharedPreferences.getString(PreferencesKey.onionDonationLink); if (clearnetUrl != null && onionUrl != null) { - Navigator.pushReplacementNamed( + Navigator.pushNamed( context, Routes.anonPayReceivePage, arguments: AnonpayDonationLinkInfo( @@ -295,7 +295,7 @@ class AddressPage extends BasePage { ), ); } else { - Navigator.pushReplacementNamed( + Navigator.pushNamed( context, Routes.anonPayInvoicePage, arguments: [addressListViewModel.address.address, option], diff --git a/lib/src/screens/dashboard/widgets/market_place_page.dart b/lib/src/screens/dashboard/widgets/market_place_page.dart index fe0eb9ec8..248353aca 100644 --- a/lib/src/screens/dashboard/widgets/market_place_page.dart +++ b/lib/src/screens/dashboard/widgets/market_place_page.dart @@ -3,16 +3,20 @@ import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/market_place_item.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; +import 'package:cake_wallet/view_model/dashboard/market_place_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 { - - MarketPlacePage({required this.dashboardViewModel}); + MarketPlacePage({ + required this.dashboardViewModel, + required this.marketPlaceViewModel, + }); final DashboardViewModel dashboardViewModel; + final MarketPlaceViewModel marketPlaceViewModel; final _scrollController = ScrollController(); @override @@ -48,7 +52,7 @@ class MarketPlacePage extends StatelessWidget { children: [ SizedBox(height: 20), MarketPlaceItem( - onTap: () =>_navigatorToGiftCardsPage(context), + onTap: () => _navigatorToGiftCardsPage(context), title: S.of(context).cake_pay_title, subTitle: S.of(context).cake_pay_subtitle, ), @@ -70,12 +74,13 @@ class MarketPlacePage extends StatelessWidget { ), ); } + void _navigatorToGiftCardsPage(BuildContext context) { final walletType = dashboardViewModel.type; switch (walletType) { case WalletType.haven: - showPopUp( + showPopUp( context: context, builder: (BuildContext context) { return AlertWithOneAction( @@ -85,9 +90,14 @@ class MarketPlacePage extends StatelessWidget { buttonAction: () => Navigator.of(context).pop()); }); break; - default: - Navigator.of(context).pushNamed(Routes.ioniaWelcomePage); + default: + marketPlaceViewModel.isIoniaUserAuthenticated().then((value) { + if (value) { + Navigator.pushNamed(context, Routes.ioniaManageCardsPage); + return; + } + Navigator.of(context).pushNamed(Routes.ioniaWelcomePage); + }); } } - } diff --git a/lib/src/screens/ionia/auth/ionia_welcome_page.dart b/lib/src/screens/ionia/auth/ionia_welcome_page.dart index 4d0cf69c0..91d09c2db 100644 --- a/lib/src/screens/ionia/auth/ionia_welcome_page.dart +++ b/lib/src/screens/ionia/auth/ionia_welcome_page.dart @@ -3,14 +3,11 @@ import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; import 'package:cake_wallet/src/widgets/primary_button.dart'; import 'package:cake_wallet/typography.dart'; -import 'package:cake_wallet/view_model/ionia/ionia_gift_cards_list_view_model.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; import 'package:cake_wallet/generated/i18n.dart'; -import 'package:mobx/mobx.dart'; class IoniaWelcomePage extends BasePage { - IoniaWelcomePage(this._cardsListViewModel); + IoniaWelcomePage(); @override Widget middle(BuildContext context) { @@ -25,15 +22,8 @@ class IoniaWelcomePage extends BasePage { ); } - final IoniaGiftCardsListViewModel _cardsListViewModel; - @override Widget body(BuildContext context) { - reaction((_) => _cardsListViewModel.isLoggedIn, (bool state) { - if (state) { - Navigator.pushReplacementNamed(context, Routes.ioniaManageCardsPage); - } - }); return Padding( padding: const EdgeInsets.all(24.0), child: Column( @@ -41,7 +31,7 @@ class IoniaWelcomePage extends BasePage { children: [ Column( children: [ - SizedBox(height: 100), + SizedBox(height: 90), Text( S.of(context).about_cake_pay, style: TextStyle( diff --git a/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart b/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart index 9baa38f24..80ebada1f 100644 --- a/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart +++ b/lib/src/screens/ionia/cards/ionia_manage_cards_page.dart @@ -17,7 +17,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; class IoniaManageCardsPage extends BasePage { - IoniaManageCardsPage(this._cardsListViewModel) { + IoniaManageCardsPage(this._cardsListViewModel): searchFocusNode = FocusNode() { _searchController.addListener(() { if (_searchController.text != _cardsListViewModel.searchString) { _searchDebounce.run(() { @@ -29,6 +29,7 @@ class IoniaManageCardsPage extends BasePage { _cardsListViewModel.getMerchants(); } + final FocusNode searchFocusNode; final IoniaGiftCardsListViewModel _cardsListViewModel; final _searchDebounce = Debounce(Duration(milliseconds: 500)); @@ -86,7 +87,14 @@ class IoniaManageCardsPage extends BasePage { //highlightColor: Colors.transparent, //splashColor: Colors.transparent, //padding: EdgeInsets.all(0), - onPressed: () => Navigator.pop(context), + onPressed: (){ + if (searchFocusNode.hasFocus) { + searchFocusNode.unfocus(); + return; + } + + Navigator.of(context).pop(); + }, child: _backButton), ), ); @@ -149,6 +157,7 @@ class IoniaManageCardsPage extends BasePage { Expanded( child: _SearchWidget( controller: _searchController, + focusNode: searchFocusNode, )), SizedBox(width: 10), filterButton @@ -266,9 +275,10 @@ class _SearchWidget extends StatelessWidget { const _SearchWidget({ Key? key, required this.controller, + required this.focusNode, }) : super(key: key); final TextEditingController controller; - + final FocusNode focusNode; @override Widget build(BuildContext context) { final searchIcon = Padding( @@ -280,6 +290,7 @@ class _SearchWidget extends StatelessWidget { ); return TextField( + focusNode: focusNode, style: TextStyle(color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!), controller: controller, decoration: InputDecoration( diff --git a/lib/src/screens/receive/anonpay_invoice_page.dart b/lib/src/screens/receive/anonpay_invoice_page.dart index 199c33e09..41bd5f6fd 100644 --- a/lib/src/screens/receive/anonpay_invoice_page.dart +++ b/lib/src/screens/receive/anonpay_invoice_page.dart @@ -27,8 +27,7 @@ class AnonPayInvoicePage extends BasePage { AnonPayInvoicePage( this.anonInvoicePageViewModel, this.receiveOptionViewModel, - ) : _amountFocusNode = FocusNode() { - } + ) : _amountFocusNode = FocusNode() {} final _nameController = TextEditingController(); final _emailController = TextEditingController(); @@ -53,6 +52,11 @@ class AnonPayInvoicePage extends BasePage { @override AppBarStyle get appBarStyle => AppBarStyle.transparent; + @override + void onClose(BuildContext context) { + Navigator.popUntil(context, ModalRoute.withName(Routes.dashboard)); + } + @override Widget middle(BuildContext context) => PresentReceiveOptionPicker(receiveOptionViewModel: receiveOptionViewModel); @@ -65,114 +69,125 @@ class AnonPayInvoicePage extends BasePage { anonInvoicePageViewModel.reset(); }); + Future _onNavigateBack(BuildContext context) async { + onClose(context); + return false; + } + @override Widget body(BuildContext context) { WidgetsBinding.instance.addPostFrameCallback((_) => _setReactions(context)); - return KeyboardActions( - disableScroll: true, - config: KeyboardActionsConfig( - keyboardActionsPlatform: KeyboardActionsPlatform.IOS, - keyboardBarColor: Theme.of(context) + return WillPopScope( + onWillPop: () => _onNavigateBack(context), + child: KeyboardActions( + disableScroll: true, + config: KeyboardActionsConfig( + keyboardActionsPlatform: KeyboardActionsPlatform.IOS, + keyboardBarColor: Theme.of(context) .accentTextTheme! .bodyLarge! .backgroundColor!, - nextFocus: false, - actions: [ - KeyboardActionsItem( - focusNode: _amountFocusNode, - toolbarButtons: [(_) => KeyboardDoneButton()], - ), - ]), - child: Container( - color: Theme.of(context).colorScheme.background, - child: ScrollableWithBottomSection( - contentPadding: EdgeInsets.only(bottom: 24), - content: Container( - decoration: DeviceInfo.instance.isMobile ? BoxDecoration( - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), - gradient: LinearGradient( - colors: [ - Theme.of(context).primaryTextTheme!.titleSmall!.color!, - Theme.of(context).primaryTextTheme!.titleSmall!.decorationColor!, - ], - begin: Alignment.topLeft, - end: Alignment.bottomRight, + nextFocus: false, + actions: [ + KeyboardActionsItem( + focusNode: _amountFocusNode, + toolbarButtons: [(_) => KeyboardDoneButton()], ), - ) : null, - child: Observer(builder: (_) { - return Padding( - padding: EdgeInsets.fromLTRB(24, 120, 24, 0), - child: AnonInvoiceForm( - nameController: _nameController, - descriptionController: _descriptionController, - amountController: _amountController, - emailController: _emailController, - depositAmountFocus: _amountFocusNode, - formKey: _formKey, - isInvoice: receiveOptionViewModel.selectedReceiveOption == - ReceivePageOption.anonPayInvoice, - anonInvoicePageViewModel: anonInvoicePageViewModel, - ), - ); - }), - ), - bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), - bottomSection: Observer(builder: (_) { - final isInvoice = - receiveOptionViewModel.selectedReceiveOption == ReceivePageOption.anonPayInvoice; - return Column( - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15), - child: Center( - child: Text( - isInvoice - ? S.of(context).anonpay_description("an invoice", "pay") - : S.of(context).anonpay_description("a donation link", "donate"), - textAlign: TextAlign.center, - style: TextStyle( - color: Theme.of(context) + ]), + child: Container( + color: Theme.of(context).colorScheme.background, + child: ScrollableWithBottomSection( + contentPadding: EdgeInsets.only(bottom: 24), + content: Container( + decoration: DeviceInfo.instance.isMobile + ? BoxDecoration( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), + gradient: LinearGradient( + colors: [ + Theme.of(context).primaryTextTheme!.titleSmall!.color!, + Theme.of(context).primaryTextTheme!.titleSmall!.decorationColor!, + ], + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + ) + : null, + child: Observer(builder: (_) { + return Padding( + padding: EdgeInsets.fromLTRB(24, 120, 24, 0), + child: AnonInvoiceForm( + nameController: _nameController, + descriptionController: _descriptionController, + amountController: _amountController, + emailController: _emailController, + depositAmountFocus: _amountFocusNode, + formKey: _formKey, + isInvoice: receiveOptionViewModel.selectedReceiveOption == + ReceivePageOption.anonPayInvoice, + anonInvoicePageViewModel: anonInvoicePageViewModel, + ), + ); + }), + ), + bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), + bottomSection: Observer(builder: (_) { + final isInvoice = + receiveOptionViewModel.selectedReceiveOption == ReceivePageOption.anonPayInvoice; + return Column( + children: [ + Padding( + padding: EdgeInsets.only(bottom: 15), + child: Center( + child: Text( + isInvoice + ? S.of(context).anonpay_description("an invoice", "pay") + : S.of(context).anonpay_description("a donation link", "donate"), + textAlign: TextAlign.center, + style: TextStyle( + color: Theme.of(context) .primaryTextTheme! .displayLarge! .decorationColor!, fontWeight: FontWeight.w500, fontSize: 12), + ), ), ), - ), - LoadingPrimaryButton( - text: - isInvoice ? S.of(context).create_invoice : S.of(context).create_donation_link, - onPressed: () { - anonInvoicePageViewModel.setRequestParams( - inputAmount: _amountController.text, - inputName: _nameController.text, - inputEmail: _emailController.text, - inputDescription: _descriptionController.text, - ); - if (anonInvoicePageViewModel.receipientEmail.isNotEmpty && - _formKey.currentState != null && - !_formKey.currentState!.validate()) { - return; - } - if (isInvoice) { - anonInvoicePageViewModel.createInvoice(); - } else { - anonInvoicePageViewModel.generateDonationLink(); - } - }, - color: Theme.of(context) + LoadingPrimaryButton( + text: isInvoice + ? S.of(context).create_invoice + : S.of(context).create_donation_link, + onPressed: () { + anonInvoicePageViewModel.setRequestParams( + inputAmount: _amountController.text, + inputName: _nameController.text, + inputEmail: _emailController.text, + inputDescription: _descriptionController.text, + ); + if (anonInvoicePageViewModel.receipientEmail.isNotEmpty && + _formKey.currentState != null && + !_formKey.currentState!.validate()) { + return; + } + if (isInvoice) { + anonInvoicePageViewModel.createInvoice(); + } else { + anonInvoicePageViewModel.generateDonationLink(); + } + }, + color: Theme.of(context) .accentTextTheme! .bodyLarge! .color!, - textColor: Colors.white, - isLoading: anonInvoicePageViewModel.state is IsExecutingState, - ), - ], - ); - }), + textColor: Colors.white, + isLoading: anonInvoicePageViewModel.state is IsExecutingState, + ), + ], + ); + }), + ), ), ), ); diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index 8e4407b3c..6adf9b858 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -266,6 +266,8 @@ class WalletRestorePage extends BasePage { } void _confirmForm() { + // Dismissing all visible keyboard to provide context for navigation + FocusManager.instance.primaryFocus?.unfocus(); final formContext = walletRestoreViewModel.mode == WalletRestoreMode.seed ? walletRestoreFromSeedFormKey.currentContext : walletRestoreFromKeysFormKey.currentContext; diff --git a/lib/view_model/dashboard/market_place_view_model.dart b/lib/view_model/dashboard/market_place_view_model.dart new file mode 100644 index 000000000..470041127 --- /dev/null +++ b/lib/view_model/dashboard/market_place_view_model.dart @@ -0,0 +1,17 @@ +import 'package:cake_wallet/ionia/ionia_service.dart'; +import 'package:mobx/mobx.dart'; + +part 'market_place_view_model.g.dart'; + +class MarketPlaceViewModel = MarketPlaceViewModelBase with _$MarketPlaceViewModel; + +abstract class MarketPlaceViewModelBase with Store { + final IoniaService _ioniaService; + + MarketPlaceViewModelBase(this._ioniaService); + + + Future isIoniaUserAuthenticated() async { + return await _ioniaService.isLogined(); + } +} \ No newline at end of file diff --git a/lib/view_model/ionia/ionia_gift_cards_list_view_model.dart b/lib/view_model/ionia/ionia_gift_cards_list_view_model.dart index 77d8af6c2..b4974c420 100644 --- a/lib/view_model/ionia/ionia_gift_cards_list_view_model.dart +++ b/lib/view_model/ionia/ionia_gift_cards_list_view_model.dart @@ -16,12 +16,10 @@ abstract class IoniaGiftCardsListViewModelBase with Store { ioniaCategories = IoniaCategory.allCategories, selectedIndices = ObservableList.of([IoniaCategory.all]), scrollOffsetFromTop = 0.0, - isLoggedIn = false, merchantState = InitialIoniaMerchantLoadingState(), createCardState = IoniaCreateCardState(), searchString = '', ioniaMerchantList = [] { - _getAuthStatus().then((value) => isLoggedIn = value); } final IoniaService ioniaService; @@ -45,24 +43,17 @@ abstract class IoniaGiftCardsListViewModelBase with Store { @observable List ioniaMerchants; - @observable - bool isLoggedIn; - @observable List ioniaCategories; @observable ObservableList selectedIndices; - Future _getAuthStatus() async { - return await ioniaService.isLogined(); - } - @action Future createCard() async { try { createCardState = IoniaCreateCardLoading(); - final card = await ioniaService.createCard(); + await ioniaService.createCard(); createCardState = IoniaCreateCardSuccess(); } catch (e) { createCardState = IoniaCreateCardFailure(error: e.toString()); From a4c279b5381ce81b3608ea3d4bca1666cb9de914 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo <41484542+godilite@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:46:00 +0300 Subject: [PATCH 06/16] CW-411 Update sideshift api (#959) * Update sideshift api * Fix sideShift api v2 rate * Fix rate calculation on sideshift * Additional fixes * Minor: Add additional unsupported * Add network to quote * Add amount and affiliateID to quote * Refactor tag/network assigning * Fix syntax errors with rate qpi * Add network for fetching rate * Remove amount from rate endpoint * Fix transaction depositAmount * Fix issues from code review * Fix issues from code review * Remove affiliate ID --------- Co-authored-by: Justin Ehrenhofer --- .github/workflows/pr_test_build.yml | 1 - .../sideshift_exchange_provider.dart | 192 ++++++++++-------- .../exchange/exchange_trade_view_model.dart | 9 +- .../exchange/exchange_view_model.dart | 4 +- tool/utils/secret_key.dart | 1 - 5 files changed, 118 insertions(+), 89 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 076fc2ea1..4ca762c12 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -106,7 +106,6 @@ jobs: echo "const moonPayApiKey = '${{ secrets.MOON_PAY_API_KEY }}';" >> lib/.secrets.g.dart echo "const moonPaySecretKey = '${{ secrets.MOON_PAY_SECRET_KEY }}';" >> lib/.secrets.g.dart echo "const sideShiftAffiliateId = '${{ secrets.SIDE_SHIFT_AFFILIATE_ID }}';" >> lib/.secrets.g.dart - echo "const sideShiftApiKey = '${{ secrets.SIDE_SHIFT_API_KEY }}';" >> lib/.secrets.g.dart echo "const simpleSwapApiKey = '${{ secrets.SIMPLE_SWAP_API_KEY }}';" >> lib/.secrets.g.dart echo "const simpleSwapApiKeyDesktop = '${{ secrets.SIMPLE_SWAP_API_KEY_DESKTOP }}';" >> lib/.secrets.g.dart echo "const onramperApiKey = '${{ secrets.ONRAMPER_API_KEY }}';" >> lib/.secrets.g.dart diff --git a/lib/exchange/sideshift/sideshift_exchange_provider.dart b/lib/exchange/sideshift/sideshift_exchange_provider.dart index a5b0c990f..26575f2c1 100644 --- a/lib/exchange/sideshift/sideshift_exchange_provider.dart +++ b/lib/exchange/sideshift/sideshift_exchange_provider.dart @@ -19,10 +19,10 @@ class SideShiftExchangeProvider extends ExchangeProvider { static const affiliateId = secrets.sideShiftAffiliateId; static const apiBaseUrl = 'https://sideshift.ai/api'; - static const rangePath = '/v1/pairs'; - static const orderPath = '/v1/orders'; - static const quotePath = '/v1/quotes'; - static const permissionPath = '/v1/permissions'; + static const rangePath = '/v2/pair'; + static const orderPath = '/v2/shifts'; + static const quotePath = '/v2/quotes'; + static const permissionPath = '/v2/permissions'; static const List _notSupported = [ CryptoCurrency.xhv, @@ -36,23 +36,22 @@ class SideShiftExchangeProvider extends ExchangeProvider { CryptoCurrency.scrt, CryptoCurrency.stx, CryptoCurrency.bttc, + CryptoCurrency.usdt, + CryptoCurrency.eos, ]; static List _supportedPairs() { - final supportedCurrencies = CryptoCurrency.all - .where((element) => !_notSupported.contains(element)) - .toList(); + final supportedCurrencies = + CryptoCurrency.all.where((element) => !_notSupported.contains(element)).toList(); return supportedCurrencies - .map((i) => supportedCurrencies - .map((k) => ExchangePair(from: i, to: k, reverse: true))) + .map((i) => supportedCurrencies.map((k) => ExchangePair(from: i, to: k, reverse: true))) .expand((i) => i) .toList(); } @override - ExchangeProviderDescription get description => - ExchangeProviderDescription.sideShift; + ExchangeProviderDescription get description => ExchangeProviderDescription.sideShift; @override Future fetchRate( @@ -65,17 +64,18 @@ class SideShiftExchangeProvider extends ExchangeProvider { if (amount == 0) { return 0.0; } - final fromCurrency = _normalizeCryptoCurrency(from); - final toCurrency = _normalizeCryptoCurrency(to); - final url = - apiBaseUrl + rangePath + '/' + fromCurrency + '/' + toCurrency; + + final fromCurrency = from.title.toLowerCase(); + final toCurrency = to.title.toLowerCase(); + final depositNetwork = _networkFor(from); + final settleNetwork = _networkFor(to); + + final url = "$apiBaseUrl$rangePath/$fromCurrency-$depositNetwork/$toCurrency-$settleNetwork"; + final uri = Uri.parse(url); final response = await get(uri); final responseJSON = json.decode(response.body) as Map; final rate = double.parse(responseJSON['rate'] as String); - final max = double.parse(responseJSON['max'] as String); - - if (amount > max) return 0.00; return rate; } catch (_) { @@ -101,25 +101,38 @@ class SideShiftExchangeProvider extends ExchangeProvider { } final responseJSON = json.decode(response.body) as Map; - final canCreateOrder = responseJSON['createOrder'] as bool; - final canCreateQuote = responseJSON['createQuote'] as bool; - return canCreateOrder && canCreateQuote; + final cancreateShift = responseJSON['createShift'] as bool; + return cancreateShift; } @override - Future createTrade( - {required TradeRequest request, required bool isFixedRateMode}) async { + Future createTrade({required TradeRequest request, required bool isFixedRateMode}) async { final _request = request as SideShiftRequest; - final quoteId = await _createQuote(_request); - final url = apiBaseUrl + orderPath; - final headers = {'Content-Type': 'application/json'}; + String url = ''; + final depositCoin = request.depositMethod.title.toLowerCase(); + final settleCoin = request.settleMethod.title.toLowerCase(); final body = { - 'type': 'fixed', - 'quoteId': quoteId, 'affiliateId': affiliateId, 'settleAddress': _request.settleAddress, - 'refundAddress': _request.refundAddress + 'refundAddress': _request.refundAddress, }; + + if (isFixedRateMode) { + final quoteId = await _createQuote(_request); + body['quoteId'] = quoteId; + + url = apiBaseUrl + orderPath + '/fixed'; + } else { + url = apiBaseUrl + orderPath + '/variable'; + final depositNetwork = _networkFor(request.depositMethod); + final settleNetwork = _networkFor(request.settleMethod); + body["depositCoin"] = depositCoin; + body["settleCoin"] = settleCoin; + body["settleNetwork"] = settleNetwork; + body["depositNetwork"] = depositNetwork; + } + final headers = {'Content-Type': 'application/json'}; + final uri = Uri.parse(url); final response = await post(uri, headers: headers, body: json.encode(body)); @@ -136,8 +149,9 @@ class SideShiftExchangeProvider extends ExchangeProvider { final responseJSON = json.decode(response.body) as Map; final id = responseJSON['id'] as String; - final inputAddress = responseJSON['depositAddress']['address'] as String; - final settleAddress = responseJSON['settleAddress']['address'] as String; + final inputAddress = responseJSON['depositAddress'] as String; + final settleAddress = responseJSON['settleAddress'] as String; + final depositAmount = responseJSON['depositAmount'] as String?; return Trade( id: id, @@ -147,7 +161,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { inputAddress: inputAddress, refundAddress: settleAddress, state: TradeState.created, - amount: _request.depositAmount, + amount: depositAmount ?? _request.depositAmount, payoutAddress: settleAddress, createdAt: DateTime.now(), ); @@ -156,13 +170,17 @@ class SideShiftExchangeProvider extends ExchangeProvider { Future _createQuote(SideShiftRequest request) async { final url = apiBaseUrl + quotePath; final headers = {'Content-Type': 'application/json'}; - final depositMethod = _normalizeCryptoCurrency(request.depositMethod); - final settleMethod = _normalizeCryptoCurrency(request.settleMethod); + final depositMethod = request.depositMethod.title.toLowerCase(); + final settleMethod = request.settleMethod.title.toLowerCase(); + final depositNetwork = _networkFor(request.depositMethod); + final settleNetwork = _networkFor(request.settleMethod); final body = { - 'depositMethod': depositMethod, - 'settleMethod': settleMethod, + 'depositCoin': depositMethod, + 'settleCoin': settleMethod, 'affiliateId': affiliateId, - 'depositAmount': request.depositAmount, + 'settleAmount': request.depositAmount, + 'settleNetwork': settleNetwork, + 'depositNetwork': depositNetwork, }; final uri = Uri.parse(url); final response = await post(uri, headers: headers, body: json.encode(body)); @@ -189,9 +207,15 @@ class SideShiftExchangeProvider extends ExchangeProvider { {required CryptoCurrency from, required CryptoCurrency to, required bool isFixedRateMode}) async { - final fromCurrency = _normalizeCryptoCurrency(from); - final toCurrency = _normalizeCryptoCurrency(to); - final url = apiBaseUrl + rangePath + '/' + fromCurrency + '/' + toCurrency; + final fromCurrency = isFixedRateMode ? to : from; + final toCurrency = isFixedRateMode ? from : to; + + final fromNetwork = _networkFor(fromCurrency); + final toNetwork = _networkFor(toCurrency); + + final url = + "$apiBaseUrl$rangePath/${fromCurrency.title.toLowerCase()}-$fromNetwork/${toCurrency.title.toLowerCase()}-$toNetwork"; + final uri = Uri.parse(url); final response = await get(uri); @@ -210,6 +234,14 @@ class SideShiftExchangeProvider extends ExchangeProvider { final min = double.tryParse(responseJSON['min'] as String? ?? ''); final max = double.tryParse(responseJSON['max'] as String? ?? ''); + if (isFixedRateMode) { + final currentRate = double.parse(responseJSON['rate'] as String); + return Limits( + min: min != null ? (min * currentRate) : null, + max: max != null ? (max * currentRate) : null, + ); + } + return Limits(min: min, max: max); } @@ -227,8 +259,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { final responseJSON = json.decode(response.body) as Map; final error = responseJSON['error']['message'] as String; - throw TradeNotFoundException(id, - provider: description, description: error); + throw TradeNotFoundException(id, provider: description, description: error); } if (response.statusCode != 200) { @@ -236,36 +267,32 @@ class SideShiftExchangeProvider extends ExchangeProvider { } final responseJSON = json.decode(response.body) as Map; - final fromCurrency = responseJSON['depositMethodId'] as String; + final fromCurrency = responseJSON['depositCoin'] as String; final from = CryptoCurrency.fromString(fromCurrency); - final toCurrency = responseJSON['settleMethodId'] as String; + final toCurrency = responseJSON['settleCoin'] as String; final to = CryptoCurrency.fromString(toCurrency); - final inputAddress = responseJSON['depositAddress']['address'] as String; - final expectedSendAmount = responseJSON['depositAmount'].toString(); - final deposits = responseJSON['deposits'] as List?; - final settleAddress = responseJSON['settleAddress']['address'] as String; + final inputAddress = responseJSON['depositAddress'] as String; + final expectedSendAmount = responseJSON['depositAmount'] as String?; + final status = responseJSON['status'] as String?; + final settleAddress = responseJSON['settleAddress'] as String; TradeState? state; - String? status; - if (deposits?.isNotEmpty ?? false) { - status = deposits![0]['status'] as String?; - } state = TradeState.deserialize(raw: status ?? 'created'); + final isVariable = (responseJSON['type'] as String) == 'variable'; - final expiredAtRaw = responseJSON['expiresAtISO'] as String; - final expiredAt = DateTime.tryParse(expiredAtRaw)?.toLocal(); + final expiredAtRaw = responseJSON['expiresAt'] as String; + final expiredAt = isVariable ? null : DateTime.tryParse(expiredAtRaw)?.toLocal(); return Trade( - id: id, - from: from, - to: to, - provider: description, - inputAddress: inputAddress, - amount: expectedSendAmount, - state: state, - expiredAt: expiredAt, - payoutAddress: settleAddress - ); + id: id, + from: from, + to: to, + provider: description, + inputAddress: inputAddress, + amount: expectedSendAmount ?? '', + state: state, + expiredAt: expiredAt, + payoutAddress: settleAddress); } @override @@ -280,28 +307,25 @@ class SideShiftExchangeProvider extends ExchangeProvider { @override String get title => 'SideShift'; - static String _normalizeCryptoCurrency(CryptoCurrency currency) { - switch (currency) { - case CryptoCurrency.zaddr: - return 'zaddr'; - case CryptoCurrency.zec: - return 'zec'; - case CryptoCurrency.bnb: - return currency.tag!.toLowerCase(); - case CryptoCurrency.usdterc20: - return 'usdtErc20'; - case CryptoCurrency.usdttrc20: - return 'usdtTrc20'; - case CryptoCurrency.usdcpoly: - return 'usdcpolygon'; - case CryptoCurrency.usdcsol: - return 'usdcsol'; - case CryptoCurrency.maticpoly: + String _networkFor(CryptoCurrency currency) => + currency.tag != null ? _normalizeTag(currency.tag!) : 'mainnet'; + + String _normalizeTag(String tag) { + switch (tag) { + case 'ETH': + return 'ethereum'; + case 'TRX': + return 'tron'; + case 'LN': + return 'lightning'; + case 'POLY': return 'polygon'; - case CryptoCurrency.btcln: - return 'ln'; + case 'ZEC': + return 'zcash'; + case 'AVAXC': + return 'avax'; default: - return currency.title.toLowerCase(); + return tag.toLowerCase(); } } } diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 1d9f4f582..d5aeaa4fc 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -47,7 +47,7 @@ abstract class ExchangeTradeViewModelBase with Store { case ExchangeProviderDescription.simpleSwap: _provider = SimpleSwapExchangeProvider(); break; - case ExchangeProviderDescription.trocador: + case ExchangeProviderDescription.trocador: _provider = TrocadorExchangeProvider(); break; } @@ -114,6 +114,10 @@ abstract class ExchangeTradeViewModelBase with Store { updatedTrade.createdAt = trade.createdAt; } + if (updatedTrade.amount.isEmpty) { + updatedTrade.amount = trade.amount; + } + trade = updatedTrade; _updateItems(); @@ -123,7 +127,8 @@ abstract class ExchangeTradeViewModelBase with Store { } void _updateItems() { - final tagFrom = tradesStore.trade!.from.tag != null ? '${tradesStore.trade!.from.tag}' + ' ' : ''; + final tagFrom = + tradesStore.trade!.from.tag != null ? '${tradesStore.trade!.from.tag}' + ' ' : ''; final tagTo = tradesStore.trade!.to.tag != null ? '${tradesStore.trade!.to.tag}' + ' ' : ''; items.clear(); items.add(ExchangeTradeItem( diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 77fb9a3d4..f823001a4 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -443,7 +443,9 @@ abstract class ExchangeViewModelBase with Store { request = SideShiftRequest( depositMethod: depositCurrency, settleMethod: receiveCurrency, - depositAmount: depositAmount.replaceAll(',', '.'), + depositAmount: isFixedRateMode + ? receiveAmount.replaceAll(',', '.') + : depositAmount.replaceAll(',', '.'), settleAddress: receiveAddress, refundAddress: depositAddress, ); diff --git a/tool/utils/secret_key.dart b/tool/utils/secret_key.dart index 621ab1cfc..b5b4de6d6 100644 --- a/tool/utils/secret_key.dart +++ b/tool/utils/secret_key.dart @@ -20,7 +20,6 @@ class SecretKey { SecretKey('moonPayApiKey', () => ''), SecretKey('moonPaySecretKey', () => ''), SecretKey('sideShiftAffiliateId', () => ''), - SecretKey('sideShiftApiKey', () => ''), SecretKey('simpleSwapApiKey', () => ''), SecretKey('simpleSwapApiKeyDesktop', () => ''), SecretKey('anypayToken', () => ''), From b16cfaaff5ac7e318dba9557b3eba6c5af6d30d7 Mon Sep 17 00:00:00 2001 From: Rafael Saes <76502841+saltrafael@users.noreply.github.com> Date: Fri, 9 Jun 2023 19:29:34 -0300 Subject: [PATCH 07/16] Cw 231 display balance in send and transaction screens when long pressing and when show balance is disabled (#926) * feat: allow reversing displayMode by long pressing on transactions page * feat: allow reversing displayMode by long pressing on send page * revert: revert transaction_list_item.dart but keep BalanceDisplayMode get displayMode => balanceViewModel.displayMode --- .../dashboard/widgets/transactions_page.dart | 201 ++++--- lib/src/screens/send/send_page.dart | 534 ++++++++++-------- .../dashboard/transaction_list_item.dart | 3 +- 3 files changed, 396 insertions(+), 342 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/transactions_page.dart b/lib/src/screens/dashboard/widgets/transactions_page.dart index c80edc8d9..61ab84265 100644 --- a/lib/src/screens/dashboard/widgets/transactions_page.dart +++ b/lib/src/screens/dashboard/widgets/transactions_page.dart @@ -25,107 +25,126 @@ class TransactionsPage extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - color: ResponsiveLayoutUtil.instance.isMobile(context) - ? null - : Theme.of(context).colorScheme.background, - padding: EdgeInsets.only(top: 24, bottom: 24), - child: Column( - children: [ - HeaderRow(dashboardViewModel: dashboardViewModel), - Expanded(child: Observer(builder: (_) { - final items = dashboardViewModel.items; + return GestureDetector( + onLongPress: () => dashboardViewModel.balanceViewModel.isReversing = + !dashboardViewModel.balanceViewModel.isReversing, + onLongPressUp: () => dashboardViewModel.balanceViewModel.isReversing = + !dashboardViewModel.balanceViewModel.isReversing, + child: Container( + color: ResponsiveLayoutUtil.instance.isMobile(context) + ? null + : Theme.of(context).colorScheme.background, + padding: EdgeInsets.only(top: 24, bottom: 24), + child: Column( + children: [ + HeaderRow(dashboardViewModel: dashboardViewModel), + Expanded(child: Observer(builder: (_) { + final items = dashboardViewModel.items; - return items.isNotEmpty - ? ListView.builder( - itemCount: items.length, - itemBuilder: (context, index) { - final item = items[index]; + return items.isNotEmpty + ? ListView.builder( + itemCount: items.length, + itemBuilder: (context, index) { + final item = items[index]; - if (item is DateSectionItem) { - return DateSectionRaw(date: item.date); - } + if (item is DateSectionItem) { + return DateSectionRaw(date: item.date); + } - if (item is TransactionListItem) { - final transaction = item.transaction; + if (item is TransactionListItem) { + final transaction = item.transaction; - return Observer( - builder: (_) => TransactionRow( - onTap: () => Navigator.of(context) - .pushNamed(Routes.transactionDetails, arguments: transaction), - direction: transaction.direction, - formattedDate: DateFormat('HH:mm').format(transaction.date), - formattedAmount: item.formattedCryptoAmount, - formattedFiatAmount: - dashboardViewModel.balanceViewModel.isFiatDisabled - ? '' - : item.formattedFiatAmount, - isPending: transaction.isPending, - title: item.formattedTitle + item.formattedStatus)); - } + return Observer( + builder: (_) => TransactionRow( + onTap: () => Navigator.of(context).pushNamed( + Routes.transactionDetails, + arguments: transaction), + direction: transaction.direction, + formattedDate: DateFormat('HH:mm') + .format(transaction.date), + formattedAmount: item.formattedCryptoAmount, + formattedFiatAmount: dashboardViewModel + .balanceViewModel.isFiatDisabled + ? '' + : item.formattedFiatAmount, + isPending: transaction.isPending, + title: item.formattedTitle + + item.formattedStatus)); + } - if (item is AnonpayTransactionListItem) { - final transactionInfo = item.transaction; + if (item is AnonpayTransactionListItem) { + final transactionInfo = item.transaction; - return AnonpayTransactionRow( - onTap: () => Navigator.of(context) - .pushNamed(Routes.anonPayDetailsPage, arguments: transactionInfo), - currency: transactionInfo.fiatAmount != null - ? transactionInfo.fiatEquiv ?? '' - : CryptoCurrency.fromFullName(transactionInfo.coinTo) - .name - .toUpperCase(), - provider: transactionInfo.provider, - amount: transactionInfo.fiatAmount?.toString() ?? - (transactionInfo.amountTo?.toString() ?? ''), - createdAt: DateFormat('HH:mm').format(transactionInfo.createdAt), - ); - } + return AnonpayTransactionRow( + onTap: () => Navigator.of(context).pushNamed( + Routes.anonPayDetailsPage, + arguments: transactionInfo), + currency: transactionInfo.fiatAmount != null + ? transactionInfo.fiatEquiv ?? '' + : CryptoCurrency.fromFullName( + transactionInfo.coinTo) + .name + .toUpperCase(), + provider: transactionInfo.provider, + amount: transactionInfo.fiatAmount?.toString() ?? + (transactionInfo.amountTo?.toString() ?? ''), + createdAt: DateFormat('HH:mm') + .format(transactionInfo.createdAt), + ); + } - if (item is TradeListItem) { - final trade = item.trade; + if (item is TradeListItem) { + final trade = item.trade; - return Observer( - builder: (_) => TradeRow( - onTap: () => Navigator.of(context) - .pushNamed(Routes.tradeDetails, arguments: trade), - provider: trade.provider, - from: trade.from, - to: trade.to, - createdAtFormattedDate: trade.createdAt != null - ? DateFormat('HH:mm').format(trade.createdAt!) - : null, - formattedAmount: item.tradeFormattedAmount)); - } - - if (item is OrderListItem) { - final order = item.order; - - return Observer( - builder: (_) => OrderRow( - onTap: () => Navigator.of(context) - .pushNamed(Routes.orderDetails, arguments: order), - provider: order.provider, - from: order.from!, - to: order.to!, + return Observer( + builder: (_) => TradeRow( + onTap: () => Navigator.of(context).pushNamed( + Routes.tradeDetails, + arguments: trade), + provider: trade.provider, + from: trade.from, + to: trade.to, createdAtFormattedDate: - DateFormat('HH:mm').format(order.createdAt), - formattedAmount: item.orderFormattedAmount, - )); - } + trade.createdAt != null + ? DateFormat('HH:mm') + .format(trade.createdAt!) + : null, + formattedAmount: item.tradeFormattedAmount)); + } - return Container(color: Colors.transparent, height: 1); - }) - : Center( - child: Text( - S.of(context).placeholder_transactions, - style: TextStyle( - fontSize: 14, - color: Theme.of(context).primaryTextTheme!.labelSmall!.decorationColor!), - ), - ); - })) - ], + if (item is OrderListItem) { + final order = item.order; + + return Observer( + builder: (_) => OrderRow( + onTap: () => Navigator.of(context) + .pushNamed(Routes.orderDetails, + arguments: order), + provider: order.provider, + from: order.from!, + to: order.to!, + createdAtFormattedDate: DateFormat('HH:mm') + .format(order.createdAt), + formattedAmount: item.orderFormattedAmount, + )); + } + + return Container(color: Colors.transparent, height: 1); + }) + : Center( + child: Text( + S.of(context).placeholder_transactions, + style: TextStyle( + fontSize: 14, + color: Theme.of(context) + .primaryTextTheme + .labelSmall! + .decorationColor!), + ), + ); + })) + ], + ), ), ); } diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index 9e648d094..6fffffa42 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -145,216 +145,247 @@ class SendPage extends BasePage { Widget body(BuildContext context) { _setEffects(context); - return Form( - key: _formKey, - child: ScrollableWithBottomSection( - contentPadding: EdgeInsets.only(bottom: 24), - content: FocusTraversalGroup( - policy: OrderedTraversalPolicy(), - child: Column( - children: [ - Container( - height: _sendCardHeight(context), - child: Observer( - builder: (_) { - return PageView.builder( - scrollDirection: Axis.horizontal, - controller: controller, - itemCount: sendViewModel.outputs.length, - itemBuilder: (context, index) { - final output = sendViewModel.outputs[index]; - - return SendCard( - key: output.key, - output: output, - sendViewModel: sendViewModel, - initialPaymentRequest: initialPaymentRequest, - ); - }); - }, - )), - Padding( - padding: - EdgeInsets.only(top: 10, left: 24, right: 24, bottom: 10), - child: Container( - height: 10, - child: Observer( - builder: (_) { - final count = sendViewModel.outputs.length; - - return count > 1 - ? SmoothPageIndicator( - controller: controller, - count: count, - effect: ScrollingDotsEffect( - spacing: 6.0, - radius: 6.0, - dotWidth: 6.0, - dotHeight: 6.0, - dotColor: Theme.of(context) - .primaryTextTheme!.displaySmall! - .backgroundColor!, - activeDotColor: Theme.of(context) - .primaryTextTheme!.displayMedium! - .backgroundColor!), - ) - : Offstage(); - }, + return GestureDetector( + onLongPress: () => sendViewModel.balanceViewModel.isReversing = + !sendViewModel.balanceViewModel.isReversing, + onLongPressUp: () => sendViewModel.balanceViewModel.isReversing = + !sendViewModel.balanceViewModel.isReversing, + child: Form( + key: _formKey, + child: ScrollableWithBottomSection( + contentPadding: EdgeInsets.only(bottom: 24), + content: FocusTraversalGroup( + policy: OrderedTraversalPolicy(), + child: Column( + children: [ + Container( + height: _sendCardHeight(context), + child: Observer( + builder: (_) { + return PageView.builder( + scrollDirection: Axis.horizontal, + controller: controller, + itemCount: sendViewModel.outputs.length, + itemBuilder: (context, index) { + final output = sendViewModel.outputs[index]; + + return SendCard( + key: output.key, + output: output, + sendViewModel: sendViewModel, + initialPaymentRequest: initialPaymentRequest, + ); + }); + }, + )), + Padding( + padding: EdgeInsets.only( + top: 10, left: 24, right: 24, bottom: 10), + child: Container( + height: 10, + child: Observer( + builder: (_) { + final count = sendViewModel.outputs.length; + + return count > 1 + ? SmoothPageIndicator( + controller: controller, + count: count, + effect: ScrollingDotsEffect( + spacing: 6.0, + radius: 6.0, + dotWidth: 6.0, + dotHeight: 6.0, + dotColor: Theme.of(context) + .primaryTextTheme + !.displaySmall! + .backgroundColor!, + activeDotColor: Theme.of(context) + .primaryTextTheme + !.displayMedium! + .backgroundColor!), + ) + : Offstage(); + }, + ), ), ), - ), - if (sendViewModel.hasMultiRecipient) - Container( - height: 40, - width: double.infinity, - padding: EdgeInsets.only(left: 24), - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Observer( - builder: (_) { - final templates = sendViewModel.templates; - final itemCount = templates.length; - - return Row( - children: [ - AddTemplateButton( - onTap: () => Navigator.of(context).pushNamed(Routes.sendTemplate), - currentTemplatesLength: templates.length, - ), - ListView.builder( - scrollDirection: Axis.horizontal, - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - itemCount: itemCount, - itemBuilder: (context, index) { - final template = templates[index]; - return TemplateTile( - key: UniqueKey(), - to: template.name, - amount: template.isCurrencySelected ? template.amount : template.amountFiat, - from: template.isCurrencySelected ? template.cryptoCurrency : template.fiatCurrency, - onTap: () async { - final fiatFromTemplate = FiatCurrency.all.singleWhere((element) => element.title == template.fiatCurrency); - final output = _defineCurrentOutput(); - output.address = template.address; - if(template.isCurrencySelected){ - output.setCryptoAmount(template.amount); - }else{ - sendViewModel.setFiatCurrency(fiatFromTemplate); - output.setFiatAmount(template.amountFiat); - } - output.resetParsedAddress(); - await output.fetchParsedAddress(context); - }, - onRemove: () { - showPopUp( - context: context, - builder: (dialogContext) { - return AlertWithTwoActions( - alertTitle: S.of(context).template, - alertContent: S - .of(context) - .confirm_delete_template, - rightButtonText: S.of(context).delete, - leftButtonText: S.of(context).cancel, - actionRightButton: () { - Navigator.of(dialogContext).pop(); - sendViewModel.sendTemplateViewModel - .removeTemplate( - template: template); - }, - actionLeftButton: () => - Navigator.of(dialogContext) - .pop()); + if (sendViewModel.hasMultiRecipient) + Container( + height: 40, + width: double.infinity, + padding: EdgeInsets.only(left: 24), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Observer( + builder: (_) { + final templates = sendViewModel.templates; + final itemCount = templates.length; + + return Row( + children: [ + AddTemplateButton( + onTap: () => Navigator.of(context) + .pushNamed(Routes.sendTemplate), + currentTemplatesLength: templates.length, + ), + ListView.builder( + scrollDirection: Axis.horizontal, + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + itemCount: itemCount, + itemBuilder: (context, index) { + final template = templates[index]; + return TemplateTile( + key: UniqueKey(), + to: template.name, + amount: template.isCurrencySelected + ? template.amount + : template.amountFiat, + from: template.isCurrencySelected + ? template.cryptoCurrency + : template.fiatCurrency, + onTap: () async { + final fiatFromTemplate = FiatCurrency + .all + .singleWhere((element) => + element.title == + template.fiatCurrency); + final output = _defineCurrentOutput(); + output.address = template.address; + if (template.isCurrencySelected) { + output + .setCryptoAmount(template.amount); + } else { + sendViewModel.setFiatCurrency( + fiatFromTemplate); + output.setFiatAmount( + template.amountFiat); + } + output.resetParsedAddress(); + await output + .fetchParsedAddress(context); + }, + onRemove: () { + showPopUp( + context: context, + builder: (dialogContext) { + return AlertWithTwoActions( + alertTitle: + S.of(context).template, + alertContent: S + .of(context) + .confirm_delete_template, + rightButtonText: + S.of(context).delete, + leftButtonText: + S.of(context).cancel, + actionRightButton: () { + Navigator.of(dialogContext) + .pop(); + sendViewModel + .sendTemplateViewModel + .removeTemplate( + template: template); + }, + actionLeftButton: () => + Navigator.of(dialogContext) + .pop()); + }, + ); }, ); }, - ); - }, - ), - ], - ); - }, - ), - ), - ) - ], - ), - ), - bottomSectionPadding: - EdgeInsets.only(left: 24, right: 24, bottom: 24), - bottomSection: Column( - children: [ - if (sendViewModel.hasCurrecyChanger) - Observer(builder: (_) => - Padding( - padding: EdgeInsets.only(bottom: 12), - child: PrimaryButton( - onPressed: () => presentCurrencyPicker(context), - text: 'Change your asset (${sendViewModel.selectedCryptoCurrency})', - color: Colors.transparent, - textColor: Theme.of(context) - .accentTextTheme!.displaySmall! - .decorationColor!, + ), + ], + ); + }, + ), + ), ) - ) - ), - if (sendViewModel.hasMultiRecipient) - Padding( - padding: EdgeInsets.only(bottom: 12), - child: PrimaryButton( - onPressed: () { - sendViewModel.addOutput(); - Future.delayed(const Duration(milliseconds: 250), () { - controller.jumpToPage(sendViewModel.outputs.length - 1); - }); - }, - text: S.of(context).add_receiver, - color: Colors.transparent, - textColor: Theme.of(context) - .accentTextTheme!.displaySmall! - .decorationColor!, - isDottedBorder: true, - borderColor: Theme.of(context) - .primaryTextTheme!.displaySmall! - .decorationColor!, - )), - Observer( - builder: (_) { - return LoadingPrimaryButton( - onPressed: () async { - if (_formKey.currentState != null && !_formKey.currentState!.validate()) { - if (sendViewModel.outputs.length > 1) { - showErrorValidationAlert(context); + ], + ), + ), + bottomSectionPadding: + EdgeInsets.only(left: 24, right: 24, bottom: 24), + bottomSection: Column( + children: [ + if (sendViewModel.hasCurrecyChanger) + Observer( + builder: (_) => Padding( + padding: EdgeInsets.only(bottom: 12), + child: PrimaryButton( + onPressed: () => presentCurrencyPicker(context), + text: + 'Change your asset (${sendViewModel.selectedCryptoCurrency})', + color: Colors.transparent, + textColor: Theme.of(context) + .accentTextTheme + !.displaySmall! + .decorationColor!, + ))), + if (sendViewModel.hasMultiRecipient) + Padding( + padding: EdgeInsets.only(bottom: 12), + child: PrimaryButton( + onPressed: () { + sendViewModel.addOutput(); + Future.delayed(const Duration(milliseconds: 250), () { + controller + .jumpToPage(sendViewModel.outputs.length - 1); + }); + }, + text: S.of(context).add_receiver, + color: Colors.transparent, + textColor: Theme.of(context) + .accentTextTheme + !.displaySmall! + .decorationColor!, + isDottedBorder: true, + borderColor: Theme.of(context) + .primaryTextTheme + !.displaySmall! + .decorationColor!, + )), + Observer( + builder: (_) { + return LoadingPrimaryButton( + onPressed: () async { + if (_formKey.currentState != null && + !_formKey.currentState!.validate()) { + if (sendViewModel.outputs.length > 1) { + showErrorValidationAlert(context); + } + + return; } - return; - } + final notValidItems = sendViewModel.outputs + .where((item) => + item.address.isEmpty || + item.cryptoAmount.isEmpty) + .toList(); - final notValidItems = sendViewModel.outputs - .where((item) => - item.address.isEmpty || item.cryptoAmount.isEmpty) - .toList(); + if (notValidItems.isNotEmpty ?? false) { + showErrorValidationAlert(context); + return; + } - if (notValidItems.isNotEmpty ?? false) { - showErrorValidationAlert(context); - return; - } - - await sendViewModel.createTransaction(); - - }, - text: S.of(context).send, - color: Theme.of(context).accentTextTheme!.bodyLarge!.color!, - textColor: Colors.white, - isLoading: sendViewModel.state is IsExecutingState || - sendViewModel.state is TransactionCommitting, - isDisabled: !sendViewModel.isReadyForSend, - ); - }, - ) - ], - )), + await sendViewModel.createTransaction(); + }, + text: S.of(context).send, + color: + Theme.of(context).accentTextTheme!.bodyLarge!.color!, + textColor: Colors.white, + isLoading: sendViewModel.state is IsExecutingState || + sendViewModel.state is TransactionCommitting, + isDisabled: !sendViewModel.isReadyForSend, + ); + }, + ) + ], + )), + ), ); } @@ -382,51 +413,54 @@ class SendPage extends BasePage { WidgetsBinding.instance.addPostFrameCallback((_) { if (context.mounted) { showPopUp( - context: context, - builder: (BuildContext context) { - return ConfirmSendingAlert( - alertTitle: S.of(context).confirm_sending, - amount: S.of(context).send_amount, - amountValue: - sendViewModel.pendingTransaction!.amountFormatted, - fiatAmountValue: sendViewModel.pendingTransactionFiatAmountFormatted, - fee: S.of(context).send_fee, - feeValue: sendViewModel.pendingTransaction!.feeFormatted, - feeFiatAmount: sendViewModel.pendingTransactionFeeFiatAmountFormatted, - outputs: sendViewModel.outputs, - rightButtonText: S.of(context).ok, - leftButtonText: S.of(context).cancel, - actionRightButton: () { - Navigator.of(context).pop(); - sendViewModel.commitTransaction(); - showPopUp( - context: context, - builder: (BuildContext context) { - return Observer(builder: (_) { - final state = sendViewModel.state; + context: context, + builder: (BuildContext context) { + return ConfirmSendingAlert( + alertTitle: S.of(context).confirm_sending, + amount: S.of(context).send_amount, + amountValue: + sendViewModel.pendingTransaction!.amountFormatted, + fiatAmountValue: + sendViewModel.pendingTransactionFiatAmountFormatted, + fee: S.of(context).send_fee, + feeValue: sendViewModel.pendingTransaction!.feeFormatted, + feeFiatAmount: sendViewModel + .pendingTransactionFeeFiatAmountFormatted, + outputs: sendViewModel.outputs, + rightButtonText: S.of(context).ok, + leftButtonText: S.of(context).cancel, + actionRightButton: () { + Navigator.of(context).pop(); + sendViewModel.commitTransaction(); + showPopUp( + context: context, + builder: (BuildContext context) { + return Observer(builder: (_) { + final state = sendViewModel.state; - if (state is FailureState) { - Navigator.of(context).pop(); - } - - if (state is TransactionCommitted) { - return AlertWithOneAction( - alertTitle: '', - alertContent: S.of(context).send_success( - sendViewModel.selectedCryptoCurrency.toString()), - buttonText: S.of(context).ok, - buttonAction: () { - Navigator.of(context).pop(); - RequestReviewHandler.requestReview(); - }); + if (state is FailureState) { + Navigator.of(context).pop(); } - return Offstage(); + if (state is TransactionCommitted) { + return AlertWithOneAction( + alertTitle: '', + alertContent: S.of(context).send_success( + sendViewModel.selectedCryptoCurrency + .toString()), + buttonText: S.of(context).ok, + buttonAction: () { + Navigator.of(context).pop(); + RequestReviewHandler.requestReview(); + }); + } + + return Offstage(); + }); }); - }); - }, - actionLeftButton: () => Navigator.of(context).pop()); - }); + }, + actionLeftButton: () => Navigator.of(context).pop()); + }); } }); } @@ -461,16 +495,18 @@ class SendPage extends BasePage { }); } - void presentCurrencyPicker(BuildContext context) async { + void presentCurrencyPicker(BuildContext context) async { await showPopUp( builder: (_) => Picker( - items: sendViewModel.currencies, - displayItem: (Object item) => item.toString(), - selectedAtIndex: sendViewModel.currencies.indexOf(sendViewModel.selectedCryptoCurrency), - title: S.of(context).please_select, - mainAxisAlignment: MainAxisAlignment.center, - onItemSelected: (CryptoCurrency cur) => sendViewModel.selectedCryptoCurrency = cur, - ), + items: sendViewModel.currencies, + displayItem: (Object item) => item.toString(), + selectedAtIndex: sendViewModel.currencies + .indexOf(sendViewModel.selectedCryptoCurrency), + title: S.of(context).please_select, + mainAxisAlignment: MainAxisAlignment.center, + onItemSelected: (CryptoCurrency cur) => + sendViewModel.selectedCryptoCurrency = cur, + ), context: context); } } diff --git a/lib/view_model/dashboard/transaction_list_item.dart b/lib/view_model/dashboard/transaction_list_item.dart index 0f16bdfe8..c8c6f5175 100644 --- a/lib/view_model/dashboard/transaction_list_item.dart +++ b/lib/view_model/dashboard/transaction_list_item.dart @@ -13,7 +13,6 @@ import 'package:cake_wallet/view_model/dashboard/balance_view_model.dart'; import 'package:cw_core/keyable.dart'; import 'package:cw_core/wallet_type.dart'; - class TransactionListItem extends ActionListItem with Keyable { TransactionListItem( {required this.transaction, @@ -28,7 +27,7 @@ class TransactionListItem extends ActionListItem with Keyable { FiatCurrency get fiatCurrency => settingsStore.fiatCurrency; - BalanceDisplayMode get displayMode => settingsStore.balanceDisplayMode; + BalanceDisplayMode get displayMode => balanceViewModel.displayMode; @override dynamic get keyIndex => transaction.id; From e84d02f66106ce055bb92f8f57bbeace31fc0b87 Mon Sep 17 00:00:00 2001 From: Rafael Saes <76502841+saltrafael@users.noreply.github.com> Date: Fri, 9 Jun 2023 19:31:05 -0300 Subject: [PATCH 08/16] CW-383-replace-swipe-to-delete-wallet-action-with-a-delete-trash-icon-on-the-right (#935) * feat: replace "swipe to delete" wallet action with a delete / trash icon on the right * fix: remove InkWell and _actionPane actions * feat: add a bit of padding from the end --- .../screens/wallet_list/wallet_list_page.dart | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index b20b2bd1a..3f33ebc7a 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -149,12 +149,26 @@ class WalletListBodyState extends State { return wallet.isCurrent ? row - : Slidable( - key: Key('${wallet.key}'), - startActionPane: _actionPane(wallet), - endActionPane: _actionPane(wallet), - child: row, - ); + : Row(children: [ + Expanded(child: row), + GestureDetector( + onTap: () => _removeWallet(wallet), + child: Container( + height: 40, + width: 44, + padding: EdgeInsets.only(right: 20), + child: Center( + child: Image.asset('assets/images/trash.png', + height: 16, + width: 16, + color: Theme.of(context) + .primaryTextTheme + .titleLarge! + .color), + ), + ), + ) + ]); }), ), ), @@ -277,18 +291,4 @@ class WalletListBodyState extends State { _progressBar = null; }); } - - 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, - ), - ], - ); } From affc35f3355f20740f9ba47458ef93028ebda699 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo <41484542+godilite@users.noreply.github.com> Date: Wed, 14 Jun 2023 02:04:52 +0300 Subject: [PATCH 09/16] CW-342 Enable Mac Layout on iPad (#958) * Add iPad responsive layout * Set magic number to position input field on wider screens * Adjust screen resolution * Update target device family for ios * Add icons for iPad * Revert width adjustment for ipad * Fix overflowing balance * Fix overflowing balance * Fix PR issues * Remove unused icons [skip ci] --------- Co-authored-by: OmarHatem --- ios/Podfile.lock | 22 ++++---- ios/Runner.xcodeproj/project.pbxproj | 6 +-- .../AppIcon.appiconset/Contents.json | 13 +++++ .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 880 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 1997 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 3332 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 1399 bytes .../Icon-App-29x29@2x 1.png | Bin 0 -> 3203 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 3203 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 5030 bytes .../Icon-App-40x40@1x 1.png | Bin 0 -> 1997 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 1997 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 7194 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 4305 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 9427 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 10439 bytes lib/di.dart | 3 +- lib/entities/main_actions.dart | 1 + lib/main.dart | 5 +- lib/src/screens/dashboard/dashboard_page.dart | 2 +- .../dashboard/widgets/address_page.dart | 2 +- .../dashboard/widgets/balance_page.dart | 29 ++++++----- .../dashboard/widgets/transactions_page.dart | 2 +- lib/src/screens/exchange/exchange_page.dart | 4 +- .../screens/receive/anonpay_invoice_page.dart | 49 +++++++++--------- .../receive/widgets/currency_input_field.dart | 34 +++++++----- lib/src/screens/send/send_page.dart | 4 +- lib/src/screens/send/widgets/send_card.dart | 6 +-- .../settings/display_settings_page.dart | 25 +++++---- .../screens/wallet_list/wallet_list_page.dart | 4 +- lib/src/widgets/add_template_button.dart | 2 +- lib/src/widgets/address_text_field.dart | 4 +- lib/utils/exception_handler.dart | 21 ++++---- lib/utils/responsive_layout_util.dart | 16 +++--- 34 files changed, 144 insertions(+), 110 deletions(-) create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x 1.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x 1.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 62074faed..7640d53d3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -4,9 +4,9 @@ PODS: - MTBBarcodeScanner - SwiftProtobuf - BigInt (5.2.0) - - connectivity (0.0.1): + - connectivity_plus (0.0.1): - Flutter - - Reachability + - ReachabilitySwift - CryptoSwift (1.6.0) - cw_haven (0.0.1): - cw_haven/Boost (= 0.0.1) @@ -126,11 +126,11 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - permission_handler_apple (9.0.4): + - permission_handler_apple (9.1.0): - Flutter - platform_device_id (0.0.1): - Flutter - - Reachability (3.2) + - ReachabilitySwift (5.0.0) - SDWebImage (5.15.5): - SDWebImage/Core (= 5.15.5) - SDWebImage/Core (5.15.5) @@ -153,7 +153,7 @@ PODS: DEPENDENCIES: - barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`) - - connectivity (from `.symlinks/plugins/connectivity/ios`) + - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - CryptoSwift - cw_haven (from `.symlinks/plugins/cw_haven/ios`) - cw_monero (from `.symlinks/plugins/cw_monero/ios`) @@ -188,7 +188,7 @@ SPEC REPOS: - DKPhotoGallery - MTBBarcodeScanner - OrderedSet - - Reachability + - ReachabilitySwift - SDWebImage - SwiftProtobuf - SwiftyGif @@ -197,8 +197,8 @@ SPEC REPOS: EXTERNAL SOURCES: barcode_scan2: :path: ".symlinks/plugins/barcode_scan2/ios" - connectivity: - :path: ".symlinks/plugins/connectivity/ios" + connectivity_plus: + :path: ".symlinks/plugins/connectivity_plus/ios" cw_haven: :path: ".symlinks/plugins/cw_haven/ios" cw_monero: @@ -249,7 +249,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 BigInt: f668a80089607f521586bbe29513d708491ef2f7 - connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 + connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e CryptoSwift: 562f8eceb40e80796fffc668b0cad9313284cfa6 cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a cw_monero: 4cf3b96f2da8e95e2ef7d6703dd4d2c509127b7d @@ -271,9 +271,9 @@ SPEC CHECKSUMS: OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 - permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce + permission_handler_apple: 8f116445eff3c0e7c65ad60f5fef5490aa94b4e4 platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5 - Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 50b9da031..dc6c28225 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -390,7 +390,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = arm64; VERSIONING_SYSTEM = "apple-generic"; }; @@ -537,7 +537,7 @@ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = arm64; VERSIONING_SYSTEM = "apple-generic"; }; @@ -574,7 +574,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = arm64; VERSIONING_SYSTEM = "apple-generic"; }; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index 6d834d4ee..df5cf1cc5 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,21 +1,25 @@ { "images" : [ { + "filename" : "Icon-App-40x40@1x.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "Icon-App-20x20@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "Icon-App-29x29@2x 1.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "Icon-App-29x29@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" @@ -26,6 +30,7 @@ "size" : "40x40" }, { + "filename" : "Icon-App-40x40@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" @@ -43,26 +48,31 @@ "size" : "60x60" }, { + "filename" : "Icon-App-20x20@1x.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { + "filename" : "Icon-App-20x20@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { + "filename" : "Icon-App-29x29@1x.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { + "filename" : "Icon-App-29x29@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { + "filename" : "Icon-App-40x40@1x 1.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" @@ -73,16 +83,19 @@ "size" : "40x40" }, { + "filename" : "Icon-App-76x76@1x.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { + "filename" : "Icon-App-76x76@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { + "filename" : "Icon-App-83.5x83.5@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..369d8d9a419ebc36e95c5cbfb488377456e99094 GIT binary patch literal 880 zcmV-$1CRWPP)dhAyFb9aYTs^9d7Gjo4)&b{Y;erL|(vhkmVO?x`oL5Rgc z>)<3>1S>uteOe7Z)zzWmVF_N|zK1?d|JZ<5ldKV*d>Ttbwu8wU>ND3DSQQq9j!zA^ zBt3|dYX$T`dpBpCB!8bMm_{4@M1egdS^2PYi9=RQ!pJ~dAs@24_rc>&9kSo2?LtRO z1I#9HVQFgz27_VPZ*TdC;w!nMM;MinF$C7xu7W)F5T4(<2^--Q^r+Qfo0wv=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@za?WJpTuLggp1MG$)q6U_ zZ&=k-Uwof=g>Rh5Y>XjyaNw_idzeZo+_a#&TnS}iAu5$k`WEWl2l%*DmA6pKqqn?n f`zHPbxBUMDPrkd7gh*1O00000NkvXXu0mjf{)@mP literal 0 HcmV?d00001 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..fb14bfc557bd6dbe135f1f9166839e8133a5cbb1 GIT binary patch literal 3332 zcmV+f4g2zmP)7XD{<0qF>WO4ERXfF?u~8)8E=LBNXoqEEpdlNeCZ7!|R`7SY6LEYE1721K!8 zixPbrdjru}K-7SMbe5&dzB4;WUv_o@ecyZezi(jn&fGKS-*fJ{=iIp~!v7gW?^=Pk zjlT&uIrN$Xh89LJY}pc;+By)b3s6!}g1nq8r2mzS%;W+T6*k%9o1U<_tsXkN^+zX{ zzG&yz6~-105UJ}yDg_vZskl!{4GbeiL0%I6dKiPaJ6CY~+&RRYzmD9@vc^)UX$b4+ z3(HOW^LU7=Z_|% z;TBa4h7sUHH$QxL)f0ObPQ~FL4$I;JPc)3MT{jyn42^)1seOawr~*xGV@%s{2==`~ zux|2P6y?9>(@k~4J-xeQ{?Cz6Z)T{njD~|j?~(p!^_~qD5A#7*O1`2Fsu6Y?=!|*0 zPZ3#tmHIa}Oxrob#L|KYKT>q7@`O9}wnxyRlTg?A?;tD5d4-^%Zg_NEAz2p65jM3p zqA`1%$i7QAt^`YVv9}xUU%tn;3xC4Rv;wcPF-&09B4pI~sW+D0MO}u>a1lein zlt`4InT|G$&CJL(?a{*QeJ}!bg_3eJlE|{|`19HWWfb5~c+$!MSbgB8jPMG)F3rcS zv%lc%uHCqM;i}wJQ6MBQYO4!pFHd+(nhG-;SJXAt<)kO#Yma`Ee#R-Q3O~Z_9oyie zDNE{nczuvc%Wy4nJN7II!qb>kh4+`y%#s){M&gEjIJ{{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cassets/AppIcon.appiconset/Icon-App-29x29@2x 1.png new file mode 100644 index 0000000000000000000000000000000000000000..07acd0a82816d11e8ce99ae5896deadf6083da1d GIT binary patch literal 3203 zcmV-}41Dv6P)D$Rcqq^ z1e*V81>O|?B&v33=>Q$O8pEo)JpTc+H&-?}ZoXd6*OQ*A6i^aTcvTMX_lsyY~+ zCI;S2q7``nLQhpJAri-R@R#+*jizYJDchN>{J?19zM-{ENJ5**)ph|Ahl zjcD(Iy%Bo$A`H#!R2r`iXlUwS&iVt;Gd94%kS`T=SDt9k{`S}ymp~+KR8ml#cwLZ# z>&MP>>8c!2D?2l+i#-qH4*v}#v$1ykNW6IXf=hSqM0NEwu;Ek;EN%O!teh0}3rbXX z)a$@Km=)z_VD-2WTuB1T5M8i61l^oRaPHq6V&pzg!o5pp@hIs#WTmB{Fpm#Wtq6KX z`mpI{2m8MLFkrYR-Wujh`=_Z~NvtK6B*}ssQKume7&Cv3GJ+)#iE5CN5Q*rWJ0u&u zsP>P2it+@=dG;7TTzQPxu;VbdSqkrf8JMtSC5$b4HtVaTyEcVlqHNB(@bhr+G<21c zob&81B9;Xb(bQ(w86IG2!GnplIdpWiP+nR}34IwV%BAgvIRZq59>AHsM-ULY8ea20 zrF(19gpj+ARoasEP)yWwrU!Zr@KQpi7|B^|(6yA(A-Y0$CgY=XsMoAB2O3*>r*u3=|54Vy-XKW48@r<`^b&V7AK;_BB< z+{Ep87gUzFseEglX#Wu|uycBkv$WJ3vDi7Uk>tSf?;!Y_XiE6GCKe2>O9w0okHNdX zClNX$0I&HKZ6(Q~b)ufLXM?LX1;sD1ZC)URl~R(!rnqC}kqeU2OL;I6V)aC+`N1_$`K=Kb1?W>uO+{F_3wtD1E*9Z*@*7W?_te}Ls&I-rp$<~ z1mqL#>FPjrWj9Vza$h7P{;L?tIs3>Y=-@w~qu-%Tnn}T+-|*@13%-bx+alW{NIucN zL*E5gxBd6QU8t^eS?~EiuzzcqjW%GeC2f9Q0aUbDWiAGQ0mZt^N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TOU``oVO_$A#2ESF z9KLZL(cDl$URuL>H+q=ba5%chQ9?OCp!lQ(C`*f^rOh zUUe=E?LQm7=_d?k`G-Mj)(cU~f}v?2eL64Plfq*u^g@za?WJpTuLggp1MG$)q6U_ zZ&=k-Uwof=g>Rh5Y>XjyaNw_idzeZo+_a#&TnS}iAu5$k`WEWl2l%*DmA6pKqqn?n f`zHPbxBUMDPrkd7gh*1O00000NkvXXu0mjf{)@mP literal 0 HcmV?d00001 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..65ed7f3db173ea8f307efd0be90e41a9405a9158 GIT binary patch literal 1997 zcmV;;2Qv7HP)yU(<&8d`%QI6*7R@CzG6K<;5k9e8DuaN^6?ur^ z#ulG6aHrg*kC@<6D8VxxO9Ky(9fq0zJOBSY6=nV~jI^E4=YIZwF6aL5cka38+;gr3 ze{hlf-T<9R_W+t(8e@>tDD)pb6utY%A?+!Js;LE4%5oIv-Nv13xwu!}^xFc;@hZ4_EJ9r93LM#) z^yGjNBN0|aZN&6tAz&Dh!EkNG#LNnBes&0>CQe4=@*p%fv>FB|mM{oC5Qhmby-I&E z-2(Se7)*ZU4cxw(jnv3E0|1F9I3|+d7Iib&ePMAdE*fdkI^j6!7|=6#38pRx(sMEm zD$DXvT5tyqHML|yQ}lIkgq7WJ+7@D+a9{6=z_!3OU|GSB3Ih%t{WKPB_#B;?wXv=o z8L`ng8NU~Ie=G*8dH6quhT0G61I0pL{M~;w%w+Zt;L>9{h3gn_d3Xfxal*pl;^BB~ z4P1rFl4`!k-q8k*W1T2)%g|6)hkxhZK;exd>|Gy)w9jJTAHErGzJUZ6PH^vZ1}6+S z*3AiH+~#%&cWBER#D_(2uW*?)5x(ofFldb8F)wFPoPUKJ;3FK3`w|~7U5U)ZgUCLS zr4O7i;GDOD(UECSB}5^99k;?F1aAKr(-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zZ&=k-Uwof=g>Rh5Y>XjyaNw_idzeZo+_a#&TnS}iAu5$k`WEWl2l%*DmA6pKqqn?n f`zHPbxBUMDPrkd7gh*1O00000NkvXXu0mjf{)@mP literal 0 HcmV?d00001 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..80e78be415a375258c3aef7d46658f5906bf1f2b GIT binary patch literal 7194 zcmV+#9OdJQP)iHQkBS_aTJ(u6=y2qud`eqKH@ z(=(Bim4c+iw@8kPLBgvTq{QbTIUabIr|NG~AyqHHhSq?!jV7EvZULvp?a1%eFfwln zQyV9;SFi9GhI|B!fcz-qA`FA#-2&tzBlRWH-#)~PklP5keiN@kZ{c-h1`;Bb^rb4N zst>q9a}k`{w}PwtXQ=1W6*l$Tk*x+Oi=Y5y?s|WK;J@7rG@)Evo8M5yk zl4C;=9ex2f&YVN|mCJY(oQ?ckPQMmcs+xfH&4Kp)T+nmW7&K_%32i-F$fm}X1O&Pk zOl;f=KTSIOK%Ae3m*IyIv||g-?G8dxB%_3M$gQdaSRewNTj`$XP|l4Y0xzwc3CaKvPlz; zu46ENpEtroc4F(o1qeA6fr0|1Cqz8~JGf}WbKYch=rtQ!x|XU=P9>y)hAq9}yMGA& zy}1!P{QMAnHeR_2P$%h-mQ452?J&~!9~c-lLe(j;vLzJhpmB$3_;KGboZs~=HqYCN z)I_D+T73Z5ZLEhWzb!$Fu2ac>B2_1c7isHRpy$}laOwO7)_pw@_s_lJ+ia@`;Jy=@ zV(gN=&^2~abyAcd0qh#|!jeM|aN^I=SU2|&-tpIlRxMyXV_^J}3HW^MFT{))sx&Ri zmVh*`dQIOC`xa}k^2=F>d6C1%ZBz%?)Le);yVjyC^KrnV*AdQHW#&Et`m z#>pj>2iUHW2^JncN6b+RrQNe?i9y)aeOTu8C0B5%lmpndp)Qu3Is^-w8o2CY@QA=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Dc9rXoVtk;in@W;fpIJIsax{vw-pL)%LzG)MvCuq6?A{GxX{D~v$*CF`yTU9S# zQGdY2dUme>&t~qxku^Kfxo)}U&b@@~CP9E>?aneREm?`GnxarjWw7mDtJ1adn1KBPZ0gtPcya(ZJjWLZLYX0z>HNYQxxC16e5rNKeTl7&D01n~c27I3z?z zKDPb&6_E`XJ;G z?^Z{v=p4E&BN6Hlz>F(ZPr&6Vq0~Y@ZU=DGO8=jL|BqAyxSFd5a5YyA;A*ZKz|~we cfUCLw2Qr_Ii_@%07*qoM6N<$f(zy0?*IS* literal 0 HcmV?d00001 diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..e06998b675c1d3c62e7006480a526c509e28a92d GIT binary patch literal 4305 zcmV;?5H9bDP)n^3PT1BNGRdG@3 zw#5PBKm-*P3$piypH(3J z#dX{~dmIsgM{)m3B1FOlX@27oW?-y=N%LGVYSv=3?9d;tQ=mFDVcL2y#(qq%b$EI& z9H#=l$JzbiC@oTBHH|@-fr$p3J!fIO#|olNR!}cdHGzlr-A7~ImQk3xGzv$5@J0BZ z<0vUsi|~dcj5=_~nS=4kx?M0fr)JmCL@BfYrfqF8|A$aG&pQu)uLXzy zPsLw>SJ?_s4`I~m=KZ(`6FfHKjZ&*xpu=y4rN2bLtgRakZwzJgRn-ZjWO-~{PRLq| z{{mUBprNIW7M48;1)+2prz}(?jPNse^FmDe?7u}8%@$4v_+jS~Up8b>s7Bb7#m<=M z@jd=)WS#oi4?7n5K*&B=awn|+nC|#^?Qg`{zgY=<-H>S3c5Y-*aO-RfOI!8fr1JI$78*7nZ{ zS(Tg{$eu8&P>X-sNJ#6>xmJ0IkohtS5x)lDT4)HK#-^jBp8QXrj9NPPZHs{})8Obj z2YlmBsGB@O7SXI7s*y#(p0L3a`oVVeJe6vdK!o(?H*j>*3WWa_K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y7Xo%;gDu#P?_`R} with SingleTickerProviderStateMixin { AppState() : yatStore = getIt.get() { SystemChrome.setPreferredOrientations( - [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); + ResponsiveLayoutUtil.instance.isIpad ? + [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight] : + [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); } YatStore yatStore; diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 47a62f53a..94717f93f 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -43,7 +43,7 @@ class DashboardPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ResponsiveLayoutUtil.instance.isMobile(context) + body: ResponsiveLayoutUtil.instance.isMobile ? _DashboardPageView( balancePage: balancePage, dashboardViewModel: dashboardViewModel, diff --git a/lib/src/screens/dashboard/widgets/address_page.dart b/lib/src/screens/dashboard/widgets/address_page.dart index 82a867058..a047e9f29 100644 --- a/lib/src/screens/dashboard/widgets/address_page.dart +++ b/lib/src/screens/dashboard/widgets/address_page.dart @@ -73,7 +73,7 @@ class AddressPage extends BasePage { ? closeButtonImageDarkTheme : closeButtonImage; - bool isMobileView = ResponsiveLayoutUtil.instance.isMobile(context); + bool isMobileView = ResponsiveLayoutUtil.instance.isMobile; return MergeSemantics( child: SizedBox( diff --git a/lib/src/screens/dashboard/widgets/balance_page.dart b/lib/src/screens/dashboard/widgets/balance_page.dart index 6e2893429..85d0fb0a1 100644 --- a/lib/src/screens/dashboard/widgets/balance_page.dart +++ b/lib/src/screens/dashboard/widgets/balance_page.dart @@ -120,19 +120,22 @@ class BalancePage extends StatelessWidget { .backgroundColor!, height: 1)), SizedBox(height: 5), - Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - AutoSizeText(availableBalance, - style: TextStyle( - fontSize: 24, - fontFamily: 'Lato', - fontWeight: FontWeight.w900, - color: Theme.of(context) - .accentTextTheme! - .displayMedium! - .backgroundColor!, - height: 1), - maxLines: 1, - textAlign: TextAlign.center), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Expanded( + child: AutoSizeText(availableBalance, + style: TextStyle( + fontSize: 24, + fontFamily: 'Lato', + fontWeight: FontWeight.w900, + color: Theme.of(context) + .accentTextTheme! + .displayMedium! + .backgroundColor!, + height: 1), + maxLines: 1, + textAlign: TextAlign.start), + ), Text(currency, style: TextStyle( fontSize: 28, diff --git a/lib/src/screens/dashboard/widgets/transactions_page.dart b/lib/src/screens/dashboard/widgets/transactions_page.dart index 61ab84265..e92e97f04 100644 --- a/lib/src/screens/dashboard/widgets/transactions_page.dart +++ b/lib/src/screens/dashboard/widgets/transactions_page.dart @@ -31,7 +31,7 @@ class TransactionsPage extends StatelessWidget { onLongPressUp: () => dashboardViewModel.balanceViewModel.isReversing = !dashboardViewModel.balanceViewModel.isReversing, child: Container( - color: ResponsiveLayoutUtil.instance.isMobile(context) + color: ResponsiveLayoutUtil.instance.isMobile ? null : Theme.of(context).colorScheme.background, padding: EdgeInsets.only(top: 24, bottom: 24), diff --git a/lib/src/screens/exchange/exchange_page.dart b/lib/src/screens/exchange/exchange_page.dart index 6eea29b42..91097ead3 100644 --- a/lib/src/screens/exchange/exchange_page.dart +++ b/lib/src/screens/exchange/exchange_page.dart @@ -117,7 +117,7 @@ class ExchangePage extends BasePage { final _closeButton = currentTheme.type == ThemeType.dark ? closeButtonImageDarkTheme : closeButtonImage; - bool isMobileView = ResponsiveLayoutUtil.instance.isMobile(context); + bool isMobileView = ResponsiveLayoutUtil.instance.isMobile; return MergeSemantics( child: SizedBox( @@ -731,7 +731,7 @@ class ExchangePage extends BasePage { }, )); - if (ResponsiveLayoutUtil.instance.isMobile(context)) { + if (ResponsiveLayoutUtil.instance.isMobile) { return MobileExchangeCardsSection( firstExchangeCard: firstExchangeCard, secondExchangeCard: secondExchangeCard, diff --git a/lib/src/screens/receive/anonpay_invoice_page.dart b/lib/src/screens/receive/anonpay_invoice_page.dart index 41bd5f6fd..f8df3eeb3 100644 --- a/lib/src/screens/receive/anonpay_invoice_page.dart +++ b/lib/src/screens/receive/anonpay_invoice_page.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/src/screens/receive/widgets/anonpay_input_form.dart' import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/src/widgets/keyboard_done_button.dart'; import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/view_model/anon_invoice_page_view_model.dart'; import 'package:cake_wallet/view_model/dashboard/receive_option_view_model.dart'; import 'package:flutter/material.dart'; @@ -88,32 +89,30 @@ class AnonPayInvoicePage extends BasePage { .accentTextTheme! .bodyLarge! .backgroundColor!, - nextFocus: false, - actions: [ - KeyboardActionsItem( - focusNode: _amountFocusNode, - toolbarButtons: [(_) => KeyboardDoneButton()], + nextFocus: false, + actions: [ + KeyboardActionsItem( + focusNode: _amountFocusNode, + toolbarButtons: [(_) => KeyboardDoneButton()], + ), + ]), + child: Container( + color: Theme.of(context).colorScheme.background, + child: ScrollableWithBottomSection( + contentPadding: EdgeInsets.only(bottom: 24), + content: Container( + decoration: ResponsiveLayoutUtil.instance.isMobile ? BoxDecoration( + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), + gradient: LinearGradient( + colors: [ + Theme.of(context).primaryTextTheme!.titleSmall!.color!, + Theme.of(context).primaryTextTheme!.titleSmall!.decorationColor!, + ], + begin: Alignment.topLeft, + end: Alignment.bottomRight, ), - ]), - child: Container( - color: Theme.of(context).colorScheme.background, - child: ScrollableWithBottomSection( - contentPadding: EdgeInsets.only(bottom: 24), - content: Container( - decoration: DeviceInfo.instance.isMobile - ? BoxDecoration( - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), - gradient: LinearGradient( - colors: [ - Theme.of(context).primaryTextTheme!.titleSmall!.color!, - Theme.of(context).primaryTextTheme!.titleSmall!.decorationColor!, - ], - begin: Alignment.topLeft, - end: Alignment.bottomRight, - ), - ) - : null, + ) : null, child: Observer(builder: (_) { return Padding( padding: EdgeInsets.fromLTRB(24, 120, 24, 0), diff --git a/lib/src/screens/receive/widgets/currency_input_field.dart b/lib/src/screens/receive/widgets/currency_input_field.dart index f1ce170f7..85e2cdbe2 100644 --- a/lib/src/screens/receive/widgets/currency_input_field.dart +++ b/lib/src/screens/receive/widgets/currency_input_field.dart @@ -1,4 +1,5 @@ import 'package:cake_wallet/src/widgets/base_text_form_field.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cw_core/currency.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -9,7 +10,8 @@ class CurrencyInputField extends StatelessWidget { required this.onTapPicker, required this.selectedCurrency, this.focusNode, - required this.controller, required this.isLight, + required this.controller, + required this.isLight, }); final Function() onTapPicker; @@ -22,13 +24,12 @@ class CurrencyInputField extends StatelessWidget { Widget build(BuildContext context) { final arrowBottomPurple = Image.asset( 'assets/images/arrow_bottom_purple_icon.png', - color: Theme.of(context) - .accentTextTheme! - .displayMedium! - .backgroundColor!, + color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, height: 8, ); - final _width = MediaQuery.of(context).size.width; + // This magic number for wider screen sets the text input focus at center of the inputfield + final _width = + ResponsiveLayoutUtil.instance.isMobile ? MediaQuery.of(context).size.width : 500; return Column( children: [ @@ -42,10 +43,12 @@ class CurrencyInputField extends StatelessWidget { keyboardType: TextInputType.numberWithOptions(signed: false, decimal: true), inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'^\d+(\.|\,)?\d{0,8}'))], hintText: '0.000', - placeholderTextStyle: isLight ? null : TextStyle( - color: Theme.of(context).primaryTextTheme!.headlineSmall!.color!, - fontWeight: FontWeight.w600, - ), + placeholderTextStyle: isLight + ? null + : TextStyle( + color: Theme.of(context).primaryTextTheme!.headlineSmall!.color!, + fontWeight: FontWeight.w600, + ), borderColor: Theme.of(context).accentTextTheme!.titleLarge!.backgroundColor!, textColor: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, textStyle: TextStyle( @@ -72,7 +75,10 @@ class CurrencyInputField extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, - color: Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, + color: Theme.of(context) + .accentTextTheme! + .displayMedium! + .backgroundColor!, ), ), if (selectedCurrency.tag != null) @@ -107,8 +113,10 @@ class CurrencyInputField extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 20, - color: - Theme.of(context).accentTextTheme!.displayMedium!.backgroundColor!, + color: Theme.of(context) + .accentTextTheme! + .displayMedium! + .backgroundColor!, ), ), ), diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index 6fffffa42..4ad1ad8ca 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -62,7 +62,7 @@ class SendPage extends BasePage { final _closeButton = currentTheme.type == ThemeType.dark ? closeButtonImageDarkTheme : closeButtonImage; - bool isMobileView = ResponsiveLayoutUtil.instance.isMobile(context); + bool isMobileView = ResponsiveLayoutUtil.instance.isMobile; return MergeSemantics( child: SizedBox( @@ -92,7 +92,7 @@ class SendPage extends BasePage { double _sendCardHeight(BuildContext context) { final double initialHeight = sendViewModel.isElectrumWallet ? 490 : 465; - if (!ResponsiveLayoutUtil.instance.isMobile(context)) { + if (!ResponsiveLayoutUtil.instance.isMobile) { return initialHeight - 66; } return initialHeight; diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 96045b1bd..2b4b40fa3 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -122,7 +122,7 @@ class SendCardState extends State color: Colors.transparent, )), Container( - decoration: ResponsiveLayoutUtil.instance.isMobile(context) ? BoxDecoration( + decoration: ResponsiveLayoutUtil.instance.isMobile ? BoxDecoration( borderRadius: BorderRadius.only( bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)), @@ -137,9 +137,9 @@ class SendCardState extends State child: Padding( padding: EdgeInsets.fromLTRB( 24, - ResponsiveLayoutUtil.instance.isMobile(context) ? 100 : 55, + ResponsiveLayoutUtil.instance.isMobile ? 100 : 55, 24, - ResponsiveLayoutUtil.instance.isMobile(context) ? 32 : 0, + ResponsiveLayoutUtil.instance.isMobile ? 32 : 0, ), child: SingleChildScrollView( child: Observer(builder: (_) => Column( diff --git a/lib/src/screens/settings/display_settings_page.dart b/lib/src/screens/settings/display_settings_page.dart index c7baa9b6a..04fd134e6 100644 --- a/lib/src/screens/settings/display_settings_page.dart +++ b/lib/src/screens/settings/display_settings_page.dart @@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell. import 'package:cake_wallet/themes/theme_base.dart'; import 'package:cake_wallet/themes/theme_list.dart'; import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/view_model/settings/choices_list_item.dart'; import 'package:cake_wallet/view_model/settings/display_settings_view_model.dart'; import 'package:flutter/material.dart'; @@ -29,11 +30,11 @@ class DisplaySettingsPage extends BasePage { child: Column( children: [ SettingsSwitcherCell( - title: S.current.settings_display_balance, - value: _displaySettingsViewModel.shouldDisplayBalance, - onValueChange: (_, bool value) { - _displaySettingsViewModel.setShouldDisplayBalance(value); - }), + title: S.current.settings_display_balance, + value: _displaySettingsViewModel.shouldDisplayBalance, + onValueChange: (_, bool value) { + _displaySettingsViewModel.setShouldDisplayBalance(value); + }), SettingsSwitcherCell( title: S.current.show_market_place, value: _displaySettingsViewModel.shouldShowMarketPlaceInDashboard, @@ -42,14 +43,17 @@ class DisplaySettingsPage extends BasePage { }, ), //if (!isHaven) it does not work correctly - if(!_displaySettingsViewModel.disabledFiatApiMode) + if (!_displaySettingsViewModel.disabledFiatApiMode) SettingsPickerCell( title: S.current.settings_currency, searchHintText: S.current.search_currency, items: FiatCurrency.all, selectedItem: _displaySettingsViewModel.fiatCurrency, - onItemSelected: (FiatCurrency currency) => _displaySettingsViewModel.setFiatCurrency(currency), - images: FiatCurrency.all.map((e) => Image.asset("assets/images/flags/${e.countryCode}.png")).toList(), + onItemSelected: (FiatCurrency currency) => + _displaySettingsViewModel.setFiatCurrency(currency), + images: FiatCurrency.all + .map((e) => Image.asset("assets/images/flags/${e.countryCode}.png")) + .toList(), isGridView: true, matchingCriteria: (FiatCurrency currency, String searchText) { return currency.title.toLowerCase().contains(searchText) || @@ -66,13 +70,14 @@ class DisplaySettingsPage extends BasePage { selectedItem: _displaySettingsViewModel.languageCode, onItemSelected: _displaySettingsViewModel.onLanguageSelected, images: LanguageService.list.keys - .map((e) => Image.asset("assets/images/flags/${LanguageService.localeCountryCode[e]}.png")) + .map((e) => Image.asset( + "assets/images/flags/${LanguageService.localeCountryCode[e]}.png")) .toList(), matchingCriteria: (String code, String searchText) { return LanguageService.list[code]?.toLowerCase().contains(searchText) ?? false; }, ), - if (DeviceInfo.instance.isMobile) + if (ResponsiveLayoutUtil.instance.isMobile && DeviceInfo.instance.isMobile) SettingsChoicesCell( ChoicesListItem( title: S.current.color_theme, diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index 3f33ebc7a..a9a4b894f 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -1,6 +1,6 @@ import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart'; -import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_bar.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart'; @@ -229,7 +229,7 @@ class WalletListBodyState extends State { await hideProgressText(); // only pop the wallets route in mobile as it will go back to dashboard page // in desktop platforms the navigation tree is different - if (DeviceInfo.instance.isMobile) { + if (ResponsiveLayoutUtil.instance.isMobile) { WidgetsBinding.instance.addPostFrameCallback((_) { Navigator.of(context).pop(); }); diff --git a/lib/src/widgets/add_template_button.dart b/lib/src/widgets/add_template_button.dart index 87951e044..c88b72e7f 100644 --- a/lib/src/widgets/add_template_button.dart +++ b/lib/src/widgets/add_template_button.dart @@ -26,7 +26,7 @@ class AddTemplateButton extends StatelessWidget { child: Container( height: 34, padding: EdgeInsets.symmetric( - horizontal: ResponsiveLayoutUtil.instance.isMobile(context) ? 10 : 30), + horizontal: ResponsiveLayoutUtil.instance.isMobile ? 10 : 30), alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20)), diff --git a/lib/src/widgets/address_text_field.dart b/lib/src/widgets/address_text_field.dart index 415d40c6d..daa2e0a60 100644 --- a/lib/src/widgets/address_text_field.dart +++ b/lib/src/widgets/address_text_field.dart @@ -1,6 +1,6 @@ -import 'dart:io'; import 'package:cake_wallet/utils/device_info.dart'; +import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:flutter/services.dart'; import 'package:flutter/material.dart'; import 'package:cake_wallet/routes.dart'; @@ -105,7 +105,7 @@ class AddressTextField extends StatelessWidget { width: prefixIconWidth * options.length + (spaceBetweenPrefixIcons * options.length), child: Row( - mainAxisAlignment: DeviceInfo.instance.isMobile + mainAxisAlignment: ResponsiveLayoutUtil.instance.isMobile ? MainAxisAlignment.spaceBetween : MainAxisAlignment.end, children: [ SizedBox(width: 5), diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 4b156ade1..aeb81fb66 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -130,17 +130,16 @@ class ExceptionHandler { _ignoredErrors.any((element) => error.contains(element)); static const List _ignoredErrors = const [ - "errno = 9", // SocketException: Bad file descriptor - "errno = 28", // OS Error: No space left on device - "errno = 32", // SocketException: Write failed (OS Error: Broken pipe) - "errno = 49", // SocketException: Can't assign requested address - "errno = 54", // SocketException: Connection reset by peer - "errno = 57", // SocketException: Read failed (OS Error: Socket is not connected) - "errno = 60", // SocketException: Operation timed out - "errno = 65", // SocketException: No route to host - "errno = 103", // SocketException: Software caused connection abort - "errno = 104", // SocketException: Connection reset by peer - "errno = 110", // SocketException: Connection timed out + "Bad file descriptor", + "No space left on device", + "Write failed (OS Error: Broken pipe)", + "Can't assign requested address", + "Read failed (OS Error: Socket is not connected)", + "Operation timed out", + "No route to host", + "Software caused connection abort", + "Connection reset by peer", + "Connection timed out", "Connection reset by peer", "Connection closed before full header was received", "Connection terminated during handshake", diff --git a/lib/utils/responsive_layout_util.dart b/lib/utils/responsive_layout_util.dart index 8ae76ca21..d0f029a54 100644 --- a/lib/utils/responsive_layout_util.dart +++ b/lib/utils/responsive_layout_util.dart @@ -1,33 +1,35 @@ import 'package:flutter/material.dart'; class ResponsiveLayoutUtil { - static const double _kMobileThreshold = 900; + static const double _kMobileThreshold = 768; static const double kDesktopMaxWidthConstraint = 400; static const double kPopupWidth = 400; static const double kPopupSpaceHeight = 100; - + static const _kIpadMaxWidth = 2560.0; const ResponsiveLayoutUtil._(); static final instance = ResponsiveLayoutUtil._(); - bool isMobile(BuildContext context) { - final MediaQueryData mediaQueryData = MediaQuery.of(context); - return mediaQueryData.size.width < _kMobileThreshold; + bool get isMobile => + WidgetsBinding.instance.platformDispatcher.views.first.physicalSize.width < _kMobileThreshold; + + bool get isIpad { + final width = WidgetsBinding.instance.platformDispatcher.views.first.physicalSize.width; + return width >= _kMobileThreshold && !(width > _kIpadMaxWidth); } /// Returns dynamic size. /// /// If screen size is mobile, it returns 66% ([scale]) of the [originalValue]. double getDynamicSize( - BuildContext context, double originalValue, { double? mobileSize, double? scale, }) { scale ??= 2 / 3; mobileSize ??= originalValue * scale; - final value = isMobile(context) ? mobileSize : originalValue; + final value = isMobile ? mobileSize : originalValue; return value.roundToDouble(); } From a7ba4a84e83d04a1562fe95ca229d6f607b15fe8 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 14 Jun 2023 02:15:10 +0300 Subject: [PATCH 10/16] CW-398-MoonPay-offramp-(Sell)-improvements (#964) * Implement MoonPay offramp widget * Add Litecoin to strings * improve webview page * Rename route string --------- Co-authored-by: Justin Ehrenhofer Co-authored-by: Omar Hatem --- lib/buy/moonpay/moonpay_buy_provider.dart | 31 +++++++++++++++++-- lib/di.dart | 5 +-- lib/entities/main_actions.dart | 15 +++++++-- lib/router.dart | 13 ++++++-- lib/routes.dart | 2 +- .../{onramper_page.dart => webview_page.dart} | 25 +++++++-------- .../dashboard/dashboard_view_model.dart | 3 +- res/values/strings_ar.arb | 2 +- res/values/strings_bg.arb | 2 +- res/values/strings_cs.arb | 2 +- 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_ha.arb | 2 +- res/values/strings_hi.arb | 2 +- res/values/strings_hr.arb | 2 +- res/values/strings_id.arb | 2 +- res/values/strings_it.arb | 2 +- res/values/strings_ja.arb | 2 +- res/values/strings_ko.arb | 2 +- res/values/strings_my.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_th.arb | 2 +- res/values/strings_tr.arb | 2 +- res/values/strings_uk.arb | 2 +- res/values/strings_ur.arb | 2 +- res/values/strings_yo.arb | 2 +- res/values/strings_zh.arb | 2 +- 32 files changed, 92 insertions(+), 52 deletions(-) rename lib/src/screens/buy/{onramper_page.dart => webview_page.dart} (68%) diff --git a/lib/buy/moonpay/moonpay_buy_provider.dart b/lib/buy/moonpay/moonpay_buy_provider.dart index 372b6d6cc..0736edeb7 100644 --- a/lib/buy/moonpay/moonpay_buy_provider.dart +++ b/lib/buy/moonpay/moonpay_buy_provider.dart @@ -1,4 +1,7 @@ import 'dart:convert'; +import 'package:cake_wallet/palette.dart'; +import 'package:cake_wallet/store/settings_store.dart'; +import 'package:cake_wallet/themes/theme_base.dart'; import 'package:crypto/crypto.dart'; import 'package:cake_wallet/buy/buy_exception.dart'; import 'package:http/http.dart'; @@ -16,20 +19,42 @@ class MoonPaySellProvider { MoonPaySellProvider({this.isTest = false}) : baseUrl = isTest ? _baseTestUrl : _baseProductUrl; - static const _baseTestUrl = 'sell-staging.moonpay.com'; + static const _baseTestUrl = 'sell-sandbox.moonpay.com'; static const _baseProductUrl = 'sell.moonpay.com'; + static String themeToMoonPayTheme(ThemeBase theme) { + switch (theme.type) { + case ThemeType.bright: + return 'light'; + case ThemeType.light: + return 'light'; + case ThemeType.dark: + return 'dark'; + } + } static String get _apiKey => secrets.moonPayApiKey; static String get _secretKey => secrets.moonPaySecretKey; final bool isTest; final String baseUrl; - Future requestUrl({required CryptoCurrency currency, required String refundWalletAddress}) async { + Future requestUrl( + {required CryptoCurrency currency, + required String refundWalletAddress, + required SettingsStore settingsStore}) async { + + final customParams = { + 'theme': themeToMoonPayTheme(settingsStore.currentTheme), + 'language': settingsStore.languageCode, + 'colorCode': settingsStore.currentTheme.type == ThemeType.dark + ? '#${Palette.blueCraiola.value.toRadixString(16).substring(2, 8)}' + : '#${Palette.moderateSlateBlue.value.toRadixString(16).substring(2, 8)}', + }; + final originalUri = Uri.https( baseUrl, '', { 'apiKey': _apiKey, 'defaultBaseCurrencyCode': currency.toString().toLowerCase(), 'refundWalletAddress': refundWalletAddress - }); + }..addAll(customParams)); final messageBytes = utf8.encode('?${originalUri.query}'); final key = utf8.encode(_secretKey); final hmac = Hmac(sha256, key); diff --git a/lib/di.dart b/lib/di.dart index f6fb693a4..0e4eb2a1a 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -1,6 +1,7 @@ import 'package:cake_wallet/anonpay/anonpay_api.dart'; import 'package:cake_wallet/anonpay/anonpay_info_base.dart'; import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart'; +import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart'; import 'package:cake_wallet/buy/onramper/onramper_buy_provider.dart'; import 'package:cake_wallet/buy/payfura/payfura_buy_provider.dart'; import 'package:cake_wallet/core/yat_service.dart'; @@ -12,7 +13,7 @@ import 'package:cake_wallet/ionia/ionia_gift_card.dart'; import 'package:cake_wallet/ionia/ionia_tip.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dart'; -import 'package:cake_wallet/src/screens/buy/onramper_page.dart'; +import 'package:cake_wallet/src/screens/buy/webview_page.dart'; import 'package:cake_wallet/src/screens/buy/payfura_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_dashboard_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart'; @@ -677,7 +678,7 @@ Future setup({ wallet: getIt.get().wallet!, )); - getIt.registerFactory(() => OnRamperPage(getIt.get())); + getIt.registerFactoryParam((title, uri) => WebViewPage(title, uri)); getIt.registerFactory(() => PayfuraBuyProvider( settingsStore: getIt.get().settingsStore, diff --git a/lib/entities/main_actions.dart b/lib/entities/main_actions.dart index d42c15dc8..5fb46d1d8 100644 --- a/lib/entities/main_actions.dart +++ b/lib/entities/main_actions.dart @@ -49,10 +49,11 @@ class MainActions { case WalletType.bitcoin: case WalletType.litecoin: if (viewModel.isEnabledBuyAction) { + final uri = getIt.get().requestUrl(); if (DeviceInfo.instance.isMobile) { - Navigator.of(context).pushNamed(Routes.onramperPage); + Navigator.of(context) + .pushNamed(Routes.webViewPage, arguments: [S.of(context).buy, uri]); } else { - final uri = getIt.get().requestUrl(); await launchUrl(uri); } } @@ -119,14 +120,22 @@ class MainActions { switch (walletType) { case WalletType.bitcoin: + case WalletType.litecoin: if (viewModel.isEnabledSellAction) { final moonPaySellProvider = MoonPaySellProvider(); final uri = await moonPaySellProvider.requestUrl( currency: viewModel.wallet.currency, refundWalletAddress: viewModel.wallet.walletAddresses.address, + settingsStore: viewModel.settingsStore, ); - await launchUrl(uri); + if (DeviceInfo.instance.isMobile) { + Navigator.of(context).pushNamed(Routes.webViewPage, + arguments: [S.of(context).sell, uri]); + } else { + await launchUrl(uri); + } } + break; default: await showPopUp( diff --git a/lib/router.dart b/lib/router.dart index 902af61dc..ecb4f72c4 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -8,7 +8,7 @@ import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dar import 'package:cake_wallet/src/screens/backup/backup_page.dart'; import 'package:cake_wallet/src/screens/backup/edit_backup_password_page.dart'; import 'package:cake_wallet/src/screens/buy/buy_webview_page.dart'; -import 'package:cake_wallet/src/screens/buy/onramper_page.dart'; +import 'package:cake_wallet/src/screens/buy/webview_page.dart'; import 'package:cake_wallet/src/screens/buy/payfura_page.dart'; import 'package:cake_wallet/src/screens/buy/pre_order_page.dart'; import 'package:cake_wallet/src/screens/restore/sweeping_wallet_page.dart'; @@ -97,6 +97,8 @@ import 'package:cake_wallet/ionia/ionia_any_pay_payment_info.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/node.dart'; +import 'buy/moonpay/moonpay_buy_provider.dart'; + late RouteSettings currentRouteSettings; Route createRoute(RouteSettings settings) { @@ -518,8 +520,13 @@ Route createRoute(RouteSettings settings) { param1: paymentInfo, param2: commitedInfo)); - case Routes.onramperPage: - return CupertinoPageRoute(builder: (_) => getIt.get()); + case Routes.webViewPage: + final args = settings.arguments as List; + final title = args.first as String; + final url = args[1] as Uri; + return CupertinoPageRoute(builder: (_) => getIt.get( + param1: title, + param2: url)); case Routes.payfuraPage: return CupertinoPageRoute(builder: (_) => getIt.get()); diff --git a/lib/routes.dart b/lib/routes.dart index 8c235a46d..10c2fef57 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -70,7 +70,7 @@ class Routes { static const ioniaPaymentStatusPage = '/ionia_payment_status_page'; static const ioniaMoreOptionsPage = '/ionia_more_options_page'; static const ioniaCustomRedeemPage = '/ionia_custom_redeem_page'; - static const onramperPage = '/onramper'; + static const webViewPage = '/web_view_page'; static const connectionSync = '/connection_sync_page'; static const securityBackupPage = '/security_and_backup_page'; static const privacyPage = '/privacy_page'; diff --git a/lib/src/screens/buy/onramper_page.dart b/lib/src/screens/buy/webview_page.dart similarity index 68% rename from lib/src/screens/buy/onramper_page.dart rename to lib/src/screens/buy/webview_page.dart index cbdf9e1b1..205b87c47 100644 --- a/lib/src/screens/buy/onramper_page.dart +++ b/lib/src/screens/buy/webview_page.dart @@ -5,33 +5,32 @@ import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:permission_handler/permission_handler.dart'; -class OnRamperPage extends BasePage { - OnRamperPage(this._onRamperBuyProvider); +class WebViewPage extends BasePage { + WebViewPage(this._title, this._url); - final OnRamperBuyProvider _onRamperBuyProvider; + final String _title; + final Uri _url; @override - String get title => S.current.buy; + String get title => _title; @override Widget body(BuildContext context) { - return OnRamperPageBody(_onRamperBuyProvider); + return WebViewPageBody(_url); } } -class OnRamperPageBody extends StatefulWidget { - OnRamperPageBody(this.onRamperBuyProvider); +class WebViewPageBody extends StatefulWidget { + WebViewPageBody(this.uri); - final OnRamperBuyProvider onRamperBuyProvider; - - Uri get uri => onRamperBuyProvider.requestUrl(); + final Uri uri; @override - OnRamperPageBodyState createState() => OnRamperPageBodyState(); + WebViewPageBodyState createState() => WebViewPageBodyState(); } -class OnRamperPageBodyState extends State { - OnRamperPageBodyState(); +class WebViewPageBodyState extends State { + WebViewPageBodyState(); @override Widget build(BuildContext context) { diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index cfb72cb9e..ac43c20d9 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -296,8 +296,7 @@ abstract class DashboardViewModelBase with Store { bool get isEnabledSellAction => !settingsStore.disableSell && wallet.type != WalletType.haven && - wallet.type != WalletType.monero && - wallet.type != WalletType.litecoin; + wallet.type != WalletType.monero; @observable bool hasSellAction; diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 15a91ba82..8145374e3 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -486,7 +486,7 @@ "submit_request":"تقديم طلب", "buy_alert_content":"لا ندعم حاليًا سوى شراء Bitcoin و Litecoin و Monero. يرجى إنشاء محفظة Bitcoin أو Litecoin أو Monero أو التبديل إليها.", - "sell_alert_content":"نحن ندعم حاليًا بيع البيتكوين فقط. لبيع Bitcoin ، يرجى إنشاء أو التبديل إلى محفظة Bitcoin الخاصة بك.", + "sell_alert_content":"نحن ندعم حاليًا فقط بيع Bitcoin و Litecoin. يرجى إنشاء أو التبديل إلى محفظة Bitcoin أو Litecoin الخاصة بك.", "outdated_electrum_wallet_description":"محافظ Bitcoin الجديدة التي تم إنشاؤها في Cake الآن سييد مكونة من 24 كلمة. من الضروري أن تقوم بإنشاء محفظة Bitcoin جديدة وتحويل جميع أموالك إلى المحفظة الجديدة المكونة من 24 كلمة ، والتوقف عن استخدام محافظ سييد مكونة من 12 كلمة. يرجى القيام بذلك على الفور لتأمين أموالك.", "understand":"لقد فهمت", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index d9934aed7..f78159548 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -486,7 +486,7 @@ "submit_request" : "изпращане на заявка", "buy_alert_content" : "Понастоящем поддържаме само закупуване на Bitcoin, Litecoin и Monero. Моля, създайте или преминете към своя портфейл Bitcoin, Litecoin или Monero.", - "sell_alert_content": "В момента поддържаме само продажбата на Bitcoin. За да продавате Bitcoin, създайте или изберете своя Bitcoin портфейл.", + "sell_alert_content": "В момента поддържаме само продажбата на Bitcoin и Litecoin. Моля, създайте или превключете към своя биткойн или лайткойн портфейл.", "outdated_electrum_wallet_description" : "Нови Bitcoin портфейли, създадени в Cake, сега имат seed от 24 думи. Трябва да създадете нов Bitcoin адрес и да прехвърлите всичките си средства в него и веднага да спрете използването на стари портфейли. Моля, напревете това незабавно, за да подсигурите средствата си.", "understand" : "Разбирам", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index bf8916d64..5de87671d 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -486,7 +486,7 @@ "submit_request" : "odeslat požadavek", "buy_alert_content" : "V současné době podporujeme pouze nákup Bitcoinů, Litecoinů a Monero. Vytvořte nebo přepněte na svou peněženku Bitcoinů, Litecoinů nebo Monero.", - "sell_alert_content": "V současné době podporujeme pouze prodej Bitcoinu. Pro prodej Bitcoinu si prosím vytvořte Bitcoinovou peněženku, nebo se do ní přepněte.", + "sell_alert_content": "V současné době podporujeme pouze prodej bitcoinů a litecoinů. Vytvořte nebo přepněte na svou bitcoinovou nebo litecoinovou peněženku.", "outdated_electrum_wallet_description" : "Nové Bitcoinové peněženky vytvořené v Cake mají nyní seed se 24 slovy. Je třeba si vytvořit novou Bitcoinovou peněženku se 24 slovy, převést na ni všechny prostředky a přestat používat seed se 12 slovy. Prosím udělejte to hned pro zabezpečení svých prostředků.", "understand" : "Rozumím", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 43be0ca0a..5267f4e96 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -486,7 +486,7 @@ "submit_request" : "Eine Anfrage stellen", "buy_alert_content" : "Derzeit unterstützen wir nur den Kauf von Bitcoin, Litecoin und Monero. Bitte erstellen oder wechseln Sie zu Ihrer Bitcoin-, Litecoin- oder Monero-Wallet.", - "sell_alert_content": "Wir unterstützen derzeit nur den Verkauf von Bitcoin. Um Bitcoin zu verkaufen, erstellen Sie bitte Ihre Bitcoin-Wallet oder wechseln Sie zu ihr.", + "sell_alert_content": "Wir unterstützen derzeit nur den Verkauf von Bitcoin und Litecoin. Bitte erstellen Sie Ihr Bitcoin- oder Litecoin-Wallet oder wechseln Sie zu diesem.", "outdated_electrum_wallet_description" : "Neue Bitcoin-Wallets, die in Cake erstellt wurden, haben jetzt einen 24-Wort-Seed. Sie müssen eine neue Bitcoin-Wallet erstellen, Ihr gesamtes Geld in die neue 24-Wort-Wallet überweisen und keine Wallet mit einem 12-Wort-Seed mehr verwenden. Bitte tun Sie dies sofort, um Ihr Geld zu sichern.", "understand" : "Ich verstehe", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 9d88d6125..687fe5bb4 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -486,7 +486,7 @@ "submit_request" : "submit a request", "buy_alert_content" : "Currently we only support the purchase of Bitcoin, Litecoin, and Monero. Please create or switch to your Bitcoin, Litecoin, or Monero wallet.", - "sell_alert_content": "We currently only support the sale of Bitcoin. To sell Bitcoin, please create or switch to your Bitcoin wallet.", + "sell_alert_content": "We currently only support the sale of Bitcoin and Litecoin. Please create or switch to your Bitcoin or Litecoin wallet.", "outdated_electrum_wallet_description" : "New Bitcoin wallets created in Cake now have a 24-word seed. It is mandatory that you create a new Bitcoin wallet and transfer all of your funds to the new 24-word wallet, and stop using wallets with a 12-word seed. Please do this immediately to secure your funds.", "understand" : "I understand", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 55f491efe..e4b5f4da7 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -486,7 +486,7 @@ "submit_request" : "presentar una solicitud", "buy_alert_content" : "Actualmente solo admitimos la compra de Bitcoin, Litecoin y Monero. Cree o cambie a su billetera Bitcoin, Litecoin o Monero.", - "sell_alert_content": "Actualmente solo admitimos la venta de Bitcoin. Para vender Bitcoin, cree o cambie a su billetera Bitcoin.", + "sell_alert_content": "Actualmente solo admitimos la venta de Bitcoin y Litecoin. Cree o cambie a su billetera Bitcoin o Litecoin.", "outdated_electrum_wallet_description" : "Las nuevas carteras de Bitcoin creadas en Cake ahora tienen una semilla de 24 palabras. Es obligatorio que cree una nueva billetera de Bitcoin y transfiera todos sus fondos a la nueva billetera de 24 palabras, y deje de usar billeteras con una semilla de 12 palabras. Haga esto de inmediato para asegurar sus fondos.", "understand" : "Entiendo", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index edceb9386..4eee4f18e 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -486,7 +486,7 @@ "submit_request" : "soumettre une requête", "buy_alert_content" : "Actuellement, nous ne prenons en charge que l'achat de Bitcoin, Litecoin et Monero. Veuillez créer ou basculer vers votre portefeuille (wallet) Bitcoin, Litecoin ou Monero.", - "sell_alert_content": "Pour le moment nous ne supportons que la vente de Bitcoin. Pour vendre du Bitcoin, merci de créer ou de sélectionner votre portefeuille (wallet) Bitcoin.", + "sell_alert_content": "Actuellement, nous ne prenons en charge que la vente de Bitcoin et Litecoin. Veuillez créer ou basculer vers votre portefeuille (wallet) Bitcoin ou Litecoin.", "outdated_electrum_wallet_description" : "Les nouveaux portefeuilles (wallets) Bitcoin créés dans Cake ont dorénavant une phrase secrète (seed) de 24 mots. Il est impératif que vous créiez un nouveau portefeuille Bitcoin, que vous y transfériez tous vos fonds puis que vous cessiez d'utiliser le portefeuille avec une phrase secrète de 12 mots. Merci de faire cela immédiatement pour assurer la sécurité de vos avoirs.", "understand" : "J'ai compris", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index 0e2c136ee..14493fced 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -487,7 +487,7 @@ "submit_request": "gabatar da bukata", "buy_alert_content": "A halin yanzu muna tallafawa kawai siyan Bitcoin da Litecoin. Don siyan Bitcoin ko Litecoin, da fatan za a ƙirƙira ko canza zuwa walat ɗin ku na Bitcoin ko Litecoin.", - "sell_alert_content": "A halin yanzu muna tallafawa siyar da Bitcoin kawai. Don sayar da Bitcoin, da fatan za a ƙirƙira ko canza zuwa walat ɗin ku na Bitcoin.", + "sell_alert_content": "A halin yanzu muna tallafawa siyar da Bitcoin da Litecoin kawai. Da fatan za a ƙirƙira ko canza zuwa walat ɗin ku na Bitcoin ko Litecoin.", "outdated_electrum_wallet_description": "Sabbin walat ɗin Bitcoin da aka kirkira a cikin Cake yanzu suna da nau'in kalma 24. Ya zama dole ka ƙirƙiri sabon walat ɗin Bitcoin kuma canza duk kuɗin ku zuwa sabon walat ɗin kalmomi 24, kuma ku daina amfani da walat tare da iri mai kalma 12. Da fatan za a yi haka nan take don samun kuɗin ku.", "understand": "na gane", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 21d9e3b5a..9fa4d4f5e 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -486,7 +486,7 @@ "submit_request" : "एक अनुरोध सबमिट करें", "buy_alert_content" : "वर्तमान में हम केवल बिटकॉइन, लाइटकॉइन और मोनेरो की खरीद का समर्थन करते हैं। कृपया अपना बिटकॉइन, लाइटकॉइन, या मोनेरो वॉलेट बनाएं या स्विच करें।", - "sell_alert_content": "हम वर्तमान में केवल बिटकॉइन की बिक्री का समर्थन करते हैं। बिटकॉइन बेचने के लिए, कृपया अपना बिटकॉइन वॉलेट बनाएं या उसमें स्विच करें।", + "sell_alert_content": "वर्तमान में हम केवल बिटकॉइन और लाइटकॉइन की बिक्री का समर्थन करते हैं। कृपया अपना बिटकॉइन या लाइटकॉइन वॉलेट बनाएं या स्विच करें।", "outdated_electrum_wallet_description" : "केक में बनाए गए नए बिटकॉइन वॉलेट में अब 24-शब्द का बीज है। यह अनिवार्य है कि आप एक नया बिटकॉइन वॉलेट बनाएं और अपने सभी फंड को नए 24-शब्द वाले वॉलेट में स्थानांतरित करें, और 12-शब्द बीज वाले वॉलेट का उपयोग करना बंद करें। कृपया अपने धन को सुरक्षित करने के लिए इसे तुरंत करें।", "understand" : "मुझे समझ", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 4f2b85524..141d911f8 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -486,7 +486,7 @@ "submit_request" : "podnesi zahtjev", "buy_alert_content" : "Trenutno podržavamo samo kupnju Bitcoina, Litecoina i Monera. Izradite ili prijeđite na svoj Bitcoin, Litecoin ili Monero novčanik.", - "sell_alert_content": "Trenutno podržavamo samo prodaju Bitcoina. Da biste prodali Bitcoin, stvorite ili prijeđite na svoj Bitcoin novčanik.", + "sell_alert_content": "Trenutno podržavamo samo prodaju Bitcoina i Litecoina. Izradite ili prijeđite na svoj Bitcoin ili Litecoin novčanik.", "outdated_electrum_wallet_description" : "Novi Bitcoin novčanici stvoreni u Cakeu sada imaju sjeme od 24 riječi. Obavezno je stvoriti novi Bitcoin novčanik i prenijeti sva svoja sredstva u novi novčanik od 24 riječi te prestati koristiti novčanike s sjemenkom od 12 riječi. Učinite to odmah kako biste osigurali svoja sredstva.", "understand" : "Razumijem", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index 932bca5d9..00b954cd7 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -473,7 +473,7 @@ "submit_request" : "kirim permintaan", "buy_alert_content" : "Saat ini kami hanya mendukung pembelian Bitcoin, Litecoin, dan Monero. Harap buat atau alihkan ke dompet Bitcoin, Litecoin, atau Monero Anda.", - "sell_alert_content": "Saat ini kami hanya mendukung penjualan Bitcoin. Untuk menjual Bitcoin, silakan buat atau beralih ke dompet Bitcoin Anda.", + "sell_alert_content": "Saat ini kami hanya mendukung penjualan Bitcoin dan Litecoin. Harap buat atau alihkan ke dompet Bitcoin atau Litecoin Anda.", "outdated_electrum_wallet_description" : "Dompet Bitcoin baru yang dibuat di Cake sekarang memiliki biji semai 24 kata. Wajib bagi Anda untuk membuat dompet Bitcoin baru dan mentransfer semua dana Anda ke dompet 24 kata baru, dan berhenti menggunakan dompet dengan biji semai 12 kata. Silakan lakukan ini segera untuk mengamankan dana Anda.", "understand" : "Saya mengerti", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 1ec0c93ad..1fc10a4c4 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -486,7 +486,7 @@ "submit_request" : "invia una richiesta", "buy_alert_content" : "Attualmente supportiamo solo l'acquisto di Bitcoin, Litecoin e Monero. Crea o passa al tuo portafoglio Bitcoin, Litecoin o Monero.", - "sell_alert_content": "Al momento supportiamo solo la vendita di Bitcoin. Per vendere Bitcoin, crea o passa al tuo portafoglio Bitcoin.", + "sell_alert_content": "Al momento supportiamo solo la vendita di Bitcoin e Litecoin. Crea o passa al tuo portafoglio Bitcoin o Litecoin.", "outdated_electrum_wallet_description" : "I nuovi portafogli Bitcoin creati in Cake ora hanno un seme di 24 parole. È obbligatorio creare un nuovo portafoglio Bitcoin e trasferire tutti i fondi nel nuovo portafoglio di 24 parole e smettere di usare portafogli con un seme di 12 parole. Ti preghiamo di farlo immediatamente per proteggere i tuoi fondi.", "understand" : "Capisco", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 44e5c443c..9f85a3a15 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -486,7 +486,7 @@ "submit_request" : "リクエストを送信する", "buy_alert_content" : "現在、ビットコイン、ライトコイン、モネロの購入のみをサポートしています。 Bitcoin、Litecoin、または Monero ウォレットを作成するか、切り替えてください。", - "sell_alert_content": "現在、ビットコインの販売のみをサポートしています。ビットコインを販売するには、ビットコインウォレットを作成するか切り替えてください。", + "sell_alert_content": "現在、ビットコインとライトコインの販売のみをサポートしています。 ビットコインまたはライトコインウォレットを作成するか、ウォレットに切り替えてください。", "outdated_electrum_wallet_description" : "Cakeで作成された新しいビットコインウォレットには、24ワードのシードがあります。 新しいビットコインウォレットを作成し、すべての資金を新しい24ワードのウォレットに転送し、12ワードのシードを持つウォレットの使用を停止することが必須です。 あなたの資金を確保するためにこれをすぐに行ってください。", "understand" : "わかります", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 91acfd7ae..eb4792a75 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -486,7 +486,7 @@ "submit_request" : "요청을 제출", "buy_alert_content" : "현재 우리는 Bitcoin, Litecoin 및 Monero 구매만 지원합니다. Bitcoin, Litecoin 또는 Monero 지갑을 생성하거나 전환하십시오.", - "sell_alert_content": "현재 비트코인 ​​판매만 지원합니다. 비트코인을 판매하려면 비트코인 ​​지갑을 생성하거나 전환하세요.", + "sell_alert_content": "현재 Bitcoin 및 Litecoin 판매만 지원합니다. Bitcoin 또는 Litecoin 지갑을 생성하거나 전환하십시오.", "outdated_electrum_wallet_description" : "Cake에서 생성 된 새로운 비트 코인 지갑에는 이제 24 단어 시드가 있습니다. 새로운 비트 코인 지갑을 생성하고 모든 자금을 새로운 24 단어 지갑으로 이체하고 12 단어 시드가있는 지갑 사용을 중지해야합니다. 자금을 확보하려면 즉시이 작업을 수행하십시오.", "understand" : "이해 했어요", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 796210d6a..a402644e0 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -486,7 +486,7 @@ "submit_request" : "တောင်းဆိုချက်တစ်ခုတင်ပြပါ။", "buy_alert_content" : "လောလောဆယ်တွင် ကျွန်ုပ်တို့သည် Bitcoin၊ Litecoin နှင့် Monero တို့ကိုသာ ဝယ်ယူမှုကို ပံ့ပိုးပေးပါသည်။ သင်၏ Bitcoin၊ Litecoin သို့မဟုတ် Monero ပိုက်ဆံအိတ်ကို ဖန်တီးပါ သို့မဟုတ် ပြောင်းပါ။", - "sell_alert_content" : "ကျွန်ုပ်တို့သည် လက်ရှိတွင် Bitcoin ရောင်းချခြင်းကိုသာ ပံ့ပိုးပေးပါသည်။ Bitcoin ရောင်းချရန်၊ သင်၏ Bitcoin ပိုက်ဆံအိတ်ကို ဖန်တီးပါ သို့မဟုတ် ပြောင်းပါ။", + "sell_alert_content" : "ကျွန်ုပ်တို့သည် လက်ရှိတွင် Bitcoin နှင့် Litecoin ရောင်းချခြင်းကိုသာ ထောက်ခံပါသည်။ သင်၏ Bitcoin သို့မဟုတ် Litecoin ပိုက်ဆံအိတ်ကို ဖန်တီးပါ သို့မဟုတ် ပြောင်းပါ။", "outdated_electrum_wallet_description" : "ယခု Cake တွင်ဖန်တီးထားသော Bitcoin ပိုက်ဆံအိတ်အသစ်တွင် စကားလုံး 24 မျိုးရှိသည်။ Bitcoin ပိုက်ဆံအိတ်အသစ်တစ်ခုကို ဖန်တီးပြီး သင့်ငွေအားလုံးကို 24 စကားလုံးပိုက်ဆံအိတ်အသစ်သို့ လွှဲပြောင်းပြီး 12 စကားလုံးမျိုးစေ့ဖြင့် ပိုက်ဆံအိတ်များကို အသုံးပြုခြင်းကို ရပ်တန့်ရန် မဖြစ်မနေလိုအပ်ပါသည်။ သင့်ရန်ပုံငွေများကို လုံခြုံစေရန်အတွက် ၎င်းကိုချက်ချင်းလုပ်ဆောင်ပါ။", "understand" : "ကျွန်တော်နားလည်ပါတယ်", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index a04fd4caf..9068e4f8d 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -486,7 +486,7 @@ "submit_request" : "een verzoek indienen", "buy_alert_content" : "Momenteel ondersteunen we alleen de aankoop van Bitcoin, Litecoin en Monero. Maak of schakel over naar uw Bitcoin-, Litecoin- of Monero-portemonnee.", - "sell_alert_content": "We ondersteunen momenteel alleen de verkoop van Bitcoin. Om Bitcoin te verkopen, maakt u uw Bitcoin-portemonnee aan of schakelt u over naar deze.", + "sell_alert_content": "We ondersteunen momenteel alleen de verkoop van Bitcoin en Litecoin. Maak of schakel over naar uw Bitcoin- of Litecoin-portemonnee.", "outdated_electrum_wallet_description" : "Nieuwe Bitcoin-portefeuilles die in Cake zijn gemaakt, hebben nu een zaadje van 24 woorden. Het is verplicht dat u een nieuwe Bitcoin-portemonnee maakt en al uw geld overmaakt naar de nieuwe portemonnee van 24 woorden, en stopt met het gebruik van wallets met een seed van 12 woorden. Doe dit onmiddellijk om uw geld veilig te stellen.", "understand" : "Ik begrijp het", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index c9656dcda..cc0507083 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -486,7 +486,7 @@ "submit_request" : "Złóż wniosek", "buy_alert_content" : "Obecnie obsługujemy tylko zakup Bitcoin, Litecoin i Monero. Utwórz lub przełącz się na swój portfel Bitcoin, Litecoin lub Monero.", - "sell_alert_content": "Obecnie obsługujemy tylko sprzedaż Bitcoina. Aby sprzedać Bitcoin, utwórz lub przełącz się na swój portfel Bitcoin.", + "sell_alert_content": "Obecnie obsługujemy tylko sprzedaż Bitcoin i Litecoin. Utwórz lub przełącz się na swój portfel Bitcoin lub Litecoin.", "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", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index c265508b4..a4272fc2c 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -486,7 +486,7 @@ "submit_request" : "enviar um pedido", "buy_alert_content" : "Atualmente, oferecemos suporte apenas à compra de Bitcoin, Litecoin e Monero. Crie ou troque para sua carteira Bitcoin, Litecoin ou Monero.", - "sell_alert_content": "Atualmente, apoiamos apenas a venda de Bitcoin. Para vender Bitcoin, crie ou mude para sua carteira Bitcoin.", + "sell_alert_content": "Atualmente, oferecemos suporte apenas à venda de Bitcoin e Litecoin. Por favor, crie ou mude para sua carteira Bitcoin ou Litecoin.", "outdated_electrum_wallet_description" : "As novas carteiras Bitcoin criadas no Cake agora têm uma semente de 24 palavras. É obrigatório que você crie uma nova carteira Bitcoin e transfira todos os seus fundos para a nova carteira de 24 palavras, e pare de usar carteiras com semente de 12 palavras. Faça isso imediatamente para garantir seus fundos.", "understand" : "Entendo", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index b38168bbc..bcb4778c8 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -486,7 +486,7 @@ "submit_request" : "отправить запрос", "buy_alert_content" : "В настоящее время мы поддерживаем только покупку Bitcoin, Litecoin и Monero. Пожалуйста, создайте или переключитесь на свой кошелек Bitcoin, Litecoin или Monero.", - "sell_alert_content": "В настоящее время мы поддерживаем только продажу биткойнов. Чтобы продать биткойны, создайте или переключитесь на свой биткойн-кошелек.", + "sell_alert_content": "В настоящее время мы поддерживаем только продажу биткойнов и лайткойнов. Пожалуйста, создайте или переключитесь на свой биткойн- или лайткойн-кошелек.", "outdated_electrum_wallet_description" : "Новые биткойн-кошельки, созданные в Cake, теперь содержат мнемоническую фразу из 24 слов. Вы обязательно должны создать новый биткойн-кошелек и перевести все свои средства в новый кошелек из 24 слов, а также прекратить использование кошельков с мнемонической фразой из 12 слов. Пожалуйста, сделайте это немедленно, чтобы обезопасить свои средства.", "understand" : "Понятно", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 0e384b890..509bbad1f 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -484,7 +484,7 @@ "submit_request" : "ส่งคำขอ", "buy_alert_content" : "ขณะนี้เรารองรับการซื้อ Bitcoin, Litecoin และ Monero เท่านั้น โปรดสร้างหรือเปลี่ยนเป็นกระเป๋าเงิน Bitcoin, Litecoin หรือ Monero ของคุณ", - "sell_alert_content" : "ในปัจจุบันเรารองรับการขาย Bitcoin เท่านั้น หากต้องการขาย Bitcoin โปรดสร้างหรือเปลี่ยนเป็นกระเป๋า Bitcoin ของคุณ", + "sell_alert_content" : "ขณะนี้เราสนับสนุนการขาย Bitcoin และ Litecoin เท่านั้น โปรดสร้างหรือเปลี่ยนเป็นกระเป๋าเงิน Bitcoin หรือ Litecoin ของคุณ", "outdated_electrum_wallet_description" : "กระเป๋า Bitcoin ใหม่ที่สร้างใน Cake มี seed ขนาด 24 คำ ซึ่งจำเป็นต้องสร้างกระเป๋า Bitcoin ใหม่และโอนทุกเงินของคุณไปยังกระเป๋าใหม่ขนาด 24 คำ และหยุดใช้กระเป๋าที่มี seed ขนาด 12 คำ กรุณาทำด่วนเพื่อรักษาเงินของคุณ", "understand" : "ฉันเข้าใจ", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 50bd3ec4b..4f7b58393 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -486,7 +486,7 @@ "submit_request" : "talep gönder", "buy_alert_content" : "Şu anda yalnızca Bitcoin, Litecoin ve Monero satın alımını destekliyoruz. Lütfen Bitcoin, Litecoin veya Monero cüzdanınızı oluşturun veya cüzdanınıza geçiş yapın.", - "sell_alert_content": "Şu anda sadece Bitcoin satışını destekliyoruz. Bitcoin satmak için lütfen Bitcoin cüzdanınızı oluşturun veya Bitcoin cüzdanınıza geçiş yapın.", + "sell_alert_content": "Şu anda yalnızca Bitcoin ve Litecoin satışını destekliyoruz. Lütfen Bitcoin veya Litecoin cüzdanınızı oluşturun veya cüzdanınıza geçiş yapın.", "outdated_electrum_wallet_description" : "Cake'te oluşturulan yeni Bitcoin cüzdanları artık 24 kelimelik bir tohuma sahip. Yeni bir Bitcoin cüzdanı oluşturmanız ve tüm paranızı 24 kelimelik yeni cüzdana aktarmanız ve 12 kelimelik tohuma sahip cüzdanları kullanmayı bırakmanız zorunludur. Lütfen paranızı güvence altına almak için bunu hemen yapın.", "understand" : "Anladım", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 5bcffd8f7..9117247d7 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -485,7 +485,7 @@ "submit_request" : "надіслати запит", "buy_alert_content" : "Наразі ми підтримуємо лише придбання Bitcoin, Litecoin і Monero. Створіть або перейдіть на свій гаманець Bitcoin, Litecoin або Monero.", - "sell_alert_content": "Наразі ми підтримуємо лише продаж біткойнів. Щоб продати біткойн, створіть або перейдіть на свій біткойн-гаманець.", + "sell_alert_content": "Зараз ми підтримуємо лише продаж біткойнів і лайткоінів. Будь ласка, створіть або перейдіть на свій гаманець Bitcoin або Litecoin.", "outdated_electrum_wallet_description" : "Нові біткойн-гаманці, створені в Cake, тепер містять мнемонічну фразу з 24 слів. Обов’язково стовріть новий біткойн-гаманець, переведіть всі кошти на новий гаманець із 24 слів і припиніть використання гаманців із мнемонічною фразою з 12 слів. Зробіть це негайно, щоб убезпечити свої кошти.", "understand" : "Зрозуміло", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index 1bb6e56b4..ba2003b91 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -488,7 +488,7 @@ "submit_request" : "درخواست بھیج دو", "buy_alert_content" : "فی الحال ہم صرف Bitcoin، Litecoin، اور Monero کی خریداری کی حمایت کرتے ہیں۔ براہ کرم اپنا Bitcoin، Litecoin، یا Monero والیٹ بنائیں یا اس پر سوئچ کریں۔", - "sell_alert_content" : "ہم فی الحال صرف Bitcoin کی فروخت کی حمایت کرتے ہیں۔ Bitcoin فروخت کرنے کے لیے، براہ کرم اپنا Bitcoin والیٹ بنائیں یا اس میں سوئچ کریں۔", + "sell_alert_content" : "ہم فی الحال صرف Bitcoin اور Litecoin کی فروخت کی حمایت کرتے ہیں۔ براہ کرم اپنا Bitcoin یا Litecoin والیٹ بنائیں یا اس پر سوئچ کریں۔", "outdated_electrum_wallet_description" : "Cake میں بنائے گئے نئے Bitcoin بٹوے میں اب 24 الفاظ کا بیج ہے۔ یہ لازمی ہے کہ آپ ایک نیا Bitcoin والیٹ بنائیں اور اپنے تمام فنڈز کو نئے 24 الفاظ والے والیٹ میں منتقل کریں، اور 12 الفاظ کے بیج والے بٹوے کا استعمال بند کریں۔ براہ کرم اپنے فنڈز کو محفوظ بنانے کے لیے فوری طور پر ایسا کریں۔", "understand" : "میں سمجھتا ہوں۔", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 57ed51d24..cb38a09df 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -483,7 +483,7 @@ "submit_request" : "Ṣé ìbéèrè", "buy_alert_content" : "A jẹ́ kí ríra Bitcoin àti Litecoin nìkan. Ẹ jọ̀wọ́ dá tàbí sún àpamọ́wọ́ ti Bitcoin yín tàbí àpamọ́wọ́ ti Litecoin yín mọ́, t'ẹ́ bá fẹ́ ra Bitcoin tàbí Litecoin.", - "sell_alert_content": "A jẹ́ kí títa Bitcoin nìkan. Ẹ jọ̀wọ́ dá tàbí sún àpamọ́wọ́ ti Bitcoin yín mọ́, t'ẹ́ bá fẹ́ ta Bitcoin.", + "sell_alert_content": "Lọwọlọwọ a ṣe atilẹyin tita Bitcoin ati Litecoin nikan. Jọwọ ṣẹda tabi yipada si Bitcoin tabi apamọwọ Litecoin rẹ.", "outdated_electrum_wallet_description" : "Àwọn àpamọ́wọ́ títun Bitcoin ti a ti dá nínú Cake Wallet lọ́wọ́lọ́wọ́. Àwọn àpamọ́wọ́ títun t'á dá nínú Cake Wallet ni hóró tó ní ọ̀rọ̀ mẹ́rinlélógún. Ẹ gbọ́dọ̀ dá àpamọ́wọ́. Ẹ sì sún gbogbo owó yín sí àpamọ́wọ́ títun náà tó dá lórí ọ̀rọ̀ mẹ́rinlélógún. Ẹ sì gbọ́dọ̀ yé lo àwọn àpamọ́wọ́ tó dá lórí hóró tó ní ọ̀rọ̀ méjìlá. Ẹ jọ̀wọ́ ṣe èyí láìpẹ́ kí ẹ ba owó yín.", "understand" : "Ó ye mi", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 14300a732..8c1608f6c 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -485,7 +485,7 @@ "submit_request" : "提交请求", "buy_alert_content" : "目前我们只支持购买比特币、莱特币和门罗币。 请创建或切换到您的比特币、莱特币或门罗币钱包。", - "sell_alert_content" : "我们目前只支持比特币的销售。 要出售比特币,请创建或切换到您的比特币钱包。", + "sell_alert_content" : "我们目前只支持比特币和莱特币的销售。 请创建或切换到您的比特币或莱特币钱包。", "outdated_electrum_wallet_description" : "在Cake创建的新比特币钱包现在有一个24字的种子。你必须创建一个新的比特币钱包,并将你所有的资金转移到新的24字钱包,并停止使用12字种子的钱包。请立即这样做以保证你的资金安全。", "understand" : "我已知晓", From f88e150cd18d4d89ed135c79f59e7c3988185756 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 14 Jun 2023 23:53:58 +0300 Subject: [PATCH 11/16] fix Electrum transaction updates (#953) --- .../lib/electrum_transaction_history.dart | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart index 9174fb3f8..209c35140 100644 --- a/cw_bitcoin/lib/electrum_transaction_history.dart +++ b/cw_bitcoin/lib/electrum_transaction_history.dart @@ -35,7 +35,7 @@ abstract class ElectrumTransactionHistoryBase @override void addMany(Map transactions) => - transactions.forEach((_, tx) => _updateOrInsert(tx)); + transactions.forEach((_, tx) => _update(tx)); @override Future save() async { @@ -74,7 +74,7 @@ abstract class ElectrumTransactionHistoryBase if (val is Map) { final tx = ElectrumTransactionInfo.fromJson(val, walletInfo.type); - _updateOrInsert(tx); + _update(tx); } }); @@ -84,18 +84,6 @@ abstract class ElectrumTransactionHistoryBase } } - void _updateOrInsert(ElectrumTransactionInfo transaction) { - - if (transactions[transaction.id] == null) { + void _update(ElectrumTransactionInfo transaction) => transactions[transaction.id] = transaction; - } else { - final originalTx = transactions[transaction.id]; - originalTx?.confirmations = transaction.confirmations; - originalTx?.amount = transaction.amount; - originalTx?.height = transaction.height; - originalTx?.date ??= transaction.date; - originalTx?.isPending = transaction.isPending; - originalTx?.direction = transaction.direction; - } - } } From f1904077d2fe96ff061c214d69af1e19a6942673 Mon Sep 17 00:00:00 2001 From: Serhii Date: Wed, 14 Jun 2023 23:55:49 +0300 Subject: [PATCH 12/16] CW-395-Trade-ID-status-not-updating-in-trade-details-screen (#957) * fix ChangeNow trade status * formatting * fix hive saving * Revert SideShift changes This reverts commit --- .../changenow/changenow_exchange_provider.dart | 8 ++++---- lib/view_model/trade_details_view_model.dart | 15 +++++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/exchange/changenow/changenow_exchange_provider.dart b/lib/exchange/changenow/changenow_exchange_provider.dart index 89d32fa09..b37a513ac 100644 --- a/lib/exchange/changenow/changenow_exchange_provider.dart +++ b/lib/exchange/changenow/changenow_exchange_provider.dart @@ -192,11 +192,11 @@ class ChangeNowExchangeProvider extends ExchangeProvider { final expectedSendAmount = responseJSON['expectedAmountFrom'].toString(); final status = responseJSON['status'] as String; final state = TradeState.deserialize(raw: status); - final extraId = responseJSON['payinExtraId'] as String; - final outputTransaction = responseJSON['payoutHash'] as String; - final expiredAtRaw = responseJSON['validUntil'] as String; + final extraId = responseJSON['payinExtraId'] as String?; + final outputTransaction = responseJSON['payoutHash'] as String?; + final expiredAtRaw = responseJSON['validUntil'] as String?; final payoutAddress = responseJSON['payoutAddress'] as String; - final expiredAt = DateTime.tryParse(expiredAtRaw)?.toLocal(); + final expiredAt = DateTime.tryParse(expiredAtRaw ?? '')?.toLocal(); return Trade( id: id, diff --git a/lib/view_model/trade_details_view_model.dart b/lib/view_model/trade_details_view_model.dart index e32e36887..1e8a90c6f 100644 --- a/lib/view_model/trade_details_view_model.dart +++ b/lib/view_model/trade_details_view_model.dart @@ -21,6 +21,7 @@ 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'; import 'package:url_launcher/url_launcher.dart'; +import 'package:collection/collection.dart'; part 'trade_details_view_model.g.dart'; @@ -32,7 +33,8 @@ abstract class TradeDetailsViewModelBase with Store { required this.trades, required this.settingsStore, }) : items = ObservableList(), - trade = tradeForDetails { + trade = trades.values.firstWhereOrNull((element) => element.id == tradeForDetails.id) ?? + tradeForDetails { switch (trade.provider) { case ExchangeProviderDescription.xmrto: _provider = XMRTOExchangeProvider(); @@ -54,8 +56,6 @@ abstract class TradeDetailsViewModelBase with Store { break; } - items = ObservableList(); - _updateItems(); _updateTrade(); @@ -85,6 +85,12 @@ abstract class TradeDetailsViewModelBase with Store { if (updatedTrade.createdAt == null && trade.createdAt != null) { updatedTrade.createdAt = trade.createdAt; } + Trade? foundElement = trades.values.firstWhereOrNull((element) => element.id == trade.id); + if (foundElement != null) { + final editedTrade = trades.get(foundElement.key); + editedTrade?.stateRaw = updatedTrade.stateRaw; + editedTrade?.save(); + } trade = updatedTrade; @@ -154,8 +160,9 @@ abstract class TradeDetailsViewModelBase with Store { } void _launchUrl(String url) { + final uri = Uri.parse(url); try { - launch(url); + launchUrl(uri); } catch (e) {} } } From c4926ae63ac4d28179b96965835585210b2bab05 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Fri, 16 Jun 2023 04:14:01 +0300 Subject: [PATCH 13/16] V4.6.6 fixes (#970) * Fix popping wrong context in exchange page * Pass exception handler to wallets code * Fix mobile UI with iPad view * Set iPhone deployment target to 11 [skip ci] * Update Macos deployment target [skip ci] --- cw_bitcoin/lib/electrum_wallet.dart | 16 ++++-- cw_core/lib/wallet_base.dart | 2 + ios/Podfile | 1 + ios/Podfile.lock | 18 +++---- ios/Runner.xcodeproj/project.pbxproj | 54 ++++++++++----------- lib/src/screens/exchange/exchange_page.dart | 4 +- lib/store/app_store.dart | 2 + lib/utils/responsive_layout_util.dart | 4 +- macos/Podfile | 4 ++ macos/Podfile.lock | 20 ++++---- macos/Runner.xcodeproj/project.pbxproj | 2 - 11 files changed, 71 insertions(+), 56 deletions(-) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index eac05378f..3f953b8e1 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'dart:convert'; import 'dart:math'; -import 'dart:typed_data'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:hive/hive.dart'; import 'package:cw_bitcoin/electrum_wallet_addresses.dart'; @@ -14,7 +13,6 @@ import 'package:cw_core/pathForWallet.dart'; import 'package:cw_bitcoin/address_to_output_script.dart'; import 'package:cw_bitcoin/bitcoin_address_record.dart'; import 'package:cw_bitcoin/electrum_balance.dart'; -import 'package:cw_bitcoin/bitcoin_mnemonic.dart'; import 'package:cw_bitcoin/bitcoin_transaction_credentials.dart'; import 'package:cw_bitcoin/electrum_transaction_history.dart'; import 'package:cw_bitcoin/bitcoin_transaction_no_inputs_exception.dart'; @@ -120,6 +118,8 @@ abstract class ElectrumWalletBase extends WalletBase?> _scripthashesUpdateSubject; bool _isTransactionUpdating; + void Function(FlutterErrorDetails)? _onError; + Future init() async { await walletAddresses.init(); await transactionHistory.init(); @@ -322,7 +322,7 @@ abstract class ElectrumWalletBase extends WalletBase minAmount) { @@ -641,8 +641,13 @@ abstract class ElectrumWalletBase extends WalletBase _onError = onError; } diff --git a/cw_core/lib/wallet_base.dart b/cw_core/lib/wallet_base.dart index 93821448c..e5f84f467 100644 --- a/cw_core/lib/wallet_base.dart +++ b/cw_core/lib/wallet_base.dart @@ -73,4 +73,6 @@ abstract class WalletBase< Future changePassword(String password); Future? updateBalance(); + + void setExceptionHandler(void Function(FlutterErrorDetails) onError) => null; } diff --git a/ios/Podfile b/ios/Podfile index b29d40484..027d48ceb 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -44,6 +44,7 @@ post_install do |installer| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [ '$(inherited)', diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7640d53d3..d5453bd06 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -7,7 +7,7 @@ PODS: - connectivity_plus (0.0.1): - Flutter - ReachabilitySwift - - CryptoSwift (1.6.0) + - CryptoSwift (1.7.1) - cw_haven (0.0.1): - cw_haven/Boost (= 0.0.1) - cw_haven/Haven (= 0.0.1) @@ -131,15 +131,15 @@ PODS: - platform_device_id (0.0.1): - Flutter - ReachabilitySwift (5.0.0) - - SDWebImage (5.15.5): - - SDWebImage/Core (= 5.15.5) - - SDWebImage/Core (5.15.5) + - SDWebImage (5.16.0): + - SDWebImage/Core (= 5.16.0) + - SDWebImage/Core (5.16.0) - share_plus (0.0.1): - Flutter - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - SwiftProtobuf (1.21.0) + - SwiftProtobuf (1.22.0) - SwiftyGif (5.4.4) - uni_links (0.0.1): - Flutter @@ -250,7 +250,7 @@ SPEC CHECKSUMS: barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0 BigInt: f668a80089607f521586bbe29513d708491ef2f7 connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e - CryptoSwift: 562f8eceb40e80796fffc668b0cad9313284cfa6 + CryptoSwift: d3d18dc357932f7e6d580689e065cf1f176007c1 cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a cw_monero: 4cf3b96f2da8e95e2ef7d6703dd4d2c509127b7d cw_shared_external: 2972d872b8917603478117c9957dfca611845a92 @@ -274,16 +274,16 @@ SPEC CHECKSUMS: permission_handler_apple: 8f116445eff3c0e7c65ad60f5fef5490aa94b4e4 platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 - SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe + SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c - SwiftProtobuf: afced68785854575756db965e9da52bbf3dc45e7 + SwiftProtobuf: 40bd808372cb8706108f22d28f8ab4a6b9bc6989 SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f uni_links: d97da20c7701486ba192624d99bffaaffcfc298a UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841 url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f -PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f +PODFILE CHECKSUM: 09df1114e7c360f55770d35a79356bf5446e0100 COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index dc6c28225..05cf659e8 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -10,8 +10,8 @@ 0C44A71A2518EF8000B570ED /* decrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C44A7192518EF8000B570ED /* decrypt.swift */; }; 0C9D68C9264854B60011B691 /* secRandom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C9D68C8264854B60011B691 /* secRandom.swift */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 20ED0868E1BD7E12278C0CB3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B26E3F56D69167FBB1DC160A /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 4DFD1BB54A3A50573E19A583 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C663361C56EBB242598F609 /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; @@ -23,13 +23,13 @@ 0C44A7192518EF8000B570ED /* decrypt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = decrypt.swift; sourceTree = ""; }; 0C9986A3251A932F00D566FD /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0C9D68C8264854B60011B691 /* secRandom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = secRandom.swift; sourceTree = ""; }; + 11F9FC13F9EE2A705B213FA9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 20F67A1B2C2FCB2A3BB048C1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 1F083F2041D1F553F2AF8B62 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 501EA9286675DC8636978EA4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 3C663361C56EBB242598F609 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 5AFFEBFC279AD49C00F906A4 /* wakeLock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = wakeLock.swift; sourceTree = ""; }; - 61CAA8652B54F23356F7592A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -40,7 +40,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B26E3F56D69167FBB1DC160A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AD0937B0140D5A4C24E73BEA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -48,7 +48,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 20ED0868E1BD7E12278C0CB3 /* Pods_Runner.framework in Frameworks */, + 4DFD1BB54A3A50573E19A583 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -59,7 +59,7 @@ isa = PBXGroup; children = ( 0C9986A3251A932F00D566FD /* CryptoSwift.framework */, - B26E3F56D69167FBB1DC160A /* Pods_Runner.framework */, + 3C663361C56EBB242598F609 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -77,9 +77,9 @@ 84389F1A05D5860790D82820 /* Pods */ = { isa = PBXGroup; children = ( - 20F67A1B2C2FCB2A3BB048C1 /* Pods-Runner.debug.xcconfig */, - 501EA9286675DC8636978EA4 /* Pods-Runner.release.xcconfig */, - 61CAA8652B54F23356F7592A /* Pods-Runner.profile.xcconfig */, + 11F9FC13F9EE2A705B213FA9 /* Pods-Runner.debug.xcconfig */, + 1F083F2041D1F553F2AF8B62 /* Pods-Runner.release.xcconfig */, + AD0937B0140D5A4C24E73BEA /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -138,13 +138,13 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 0843B0813AFBAF53935AD24E /* [CP] Check Pods Manifest.lock */, + B91154210ADCED81FBF06A85 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - DD8DB3179CA4E511F9954A6F /* [CP] Embed Pods Frameworks */, + 32D0076A9969C0C38D68AF62 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -203,26 +203,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0843B0813AFBAF53935AD24E /* [CP] Check Pods Manifest.lock */ = { + 32D0076A9969C0C38D68AF62 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { @@ -255,21 +250,26 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; - DD8DB3179CA4E511F9954A6F /* [CP] Embed Pods Frameworks */ = { + B91154210ADCED81FBF06A85 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/lib/src/screens/exchange/exchange_page.dart b/lib/src/screens/exchange/exchange_page.dart index 91097ead3..04d7d1201 100644 --- a/lib/src/screens/exchange/exchange_page.dart +++ b/lib/src/screens/exchange/exchange_page.dart @@ -599,8 +599,8 @@ class ExchangePage extends BasePage { alertContent: S.of(context).low_fee_alert, leftButtonText: S.of(context).ignor, rightButtonText: S.of(context).use_suggested, - actionLeftButton: () => Navigator.of(context).pop(false), - actionRightButton: () => Navigator.of(context).pop(true)); + actionLeftButton: () => Navigator.of(dialogContext).pop(false), + actionRightButton: () => Navigator.of(dialogContext).pop(true)); }) ?? false; if (confirmed) { exchangeViewModel.setDefaultTransactionPriority(); diff --git a/lib/store/app_store.dart b/lib/store/app_store.dart index 196cc48a8..639efacb6 100644 --- a/lib/store/app_store.dart +++ b/lib/store/app_store.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/utils/exception_handler.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/balance.dart'; @@ -38,5 +39,6 @@ abstract class AppStoreBase with Store { wallet) { this.wallet?.close(); this.wallet = wallet; + this.wallet!.setExceptionHandler(ExceptionHandler.onError); } } diff --git a/lib/utils/responsive_layout_util.dart b/lib/utils/responsive_layout_util.dart index d0f029a54..99c722887 100644 --- a/lib/utils/responsive_layout_util.dart +++ b/lib/utils/responsive_layout_util.dart @@ -12,10 +12,10 @@ class ResponsiveLayoutUtil { static final instance = ResponsiveLayoutUtil._(); bool get isMobile => - WidgetsBinding.instance.platformDispatcher.views.first.physicalSize.width < _kMobileThreshold; + MediaQueryData.fromWindow(WidgetsBinding.instance.window).size.width < _kMobileThreshold; bool get isIpad { - final width = WidgetsBinding.instance.platformDispatcher.views.first.physicalSize.width; + final width = MediaQueryData.fromWindow(WidgetsBinding.instance.window).size.width; return width >= _kMobileThreshold && !(width > _kIpadMaxWidth); } diff --git a/macos/Podfile b/macos/Podfile index 0c76ccf54..fe5678c70 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -36,5 +36,9 @@ end post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_macos_build_settings(target) + + target.build_configurations.each do |config| + config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '12.0' + end end end diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 3564ab712..9c79281a1 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -1,7 +1,7 @@ PODS: - - connectivity_macos (0.0.1): + - connectivity_plus_macos (0.0.1): - FlutterMacOS - - Reachability + - ReachabilitySwift - cw_monero (0.0.1): - cw_monero/Boost (= 0.0.1) - cw_monero/Monero (= 0.0.1) @@ -37,7 +37,7 @@ PODS: - FlutterMacOS - platform_device_id_macos (0.0.1): - FlutterMacOS - - Reachability (3.2) + - ReachabilitySwift (5.0.0) - share_plus_macos (0.0.1): - FlutterMacOS - shared_preferences_foundation (0.0.1): @@ -49,7 +49,7 @@ PODS: - FlutterMacOS DEPENDENCIES: - - connectivity_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos`) + - connectivity_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos`) - cw_monero (from `Flutter/ephemeral/.symlinks/plugins/cw_monero/macos`) - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - devicelocale (from `Flutter/ephemeral/.symlinks/plugins/devicelocale/macos`) @@ -67,11 +67,11 @@ DEPENDENCIES: SPEC REPOS: trunk: - - Reachability + - ReachabilitySwift EXTERNAL SOURCES: - connectivity_macos: - :path: Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos + connectivity_plus_macos: + :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus_macos/macos cw_monero: :path: Flutter/ephemeral/.symlinks/plugins/cw_monero/macos device_info_plus: @@ -102,7 +102,7 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos SPEC CHECKSUMS: - connectivity_macos: 5dae6ee11d320fac7c05f0d08bd08fc32b5514d9 + connectivity_plus_macos: f6e86fd000e971d361e54b5afcadc8c8fa773308 cw_monero: ec03de55a19c4a2b174ea687e0f4202edc716fa4 device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 @@ -113,12 +113,12 @@ SPEC CHECKSUMS: path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8 platform_device_id: 3e414428f45df149bbbfb623e2c0ca27c545b763 platform_device_id_macos: f763bb55f088be804d61b96eb4710b8ab6598e94 - Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 + ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4 shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451 wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9 -PODFILE CHECKSUM: 505596d150d38022472859d890f709281982e016 +PODFILE CHECKSUM: 5107934592df7813b33d744aebc8ddc6b5a5445f COCOAPODS: 1.11.3 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index a7d9e2807..911fa9fcc 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -75,7 +75,6 @@ 9646C67C7114830A5ACFF5DF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; 9F565D5729954F53009A75FB /* secRandom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = secRandom.swift; path = CakeWallet/secRandom.swift; sourceTree = ""; }; - 9F565D5829954F53009A75FB /* decrypt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = decrypt.swift; path = CakeWallet/decrypt.swift; sourceTree = ""; }; B38D1DBC56DBD386923BC063 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -105,7 +104,6 @@ 33CC10E42044A3C60003C045 = { isa = PBXGroup; children = ( - 9F565D5829954F53009A75FB /* decrypt.swift */, 9F565D5729954F53009A75FB /* secRandom.swift */, 33FAB671232836740065AC1E /* Runner */, 33CEB47122A05771004F2AC0 /* Flutter */, From 337bfd052784c082c5481a7eae980b3d657d8f8b Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 16 Jun 2023 17:05:00 +0300 Subject: [PATCH 14/16] - Replace payfura widget with direct browser link - Remove Payfura widget class as it is duplicate for the web view page --- lib/di.dart | 4 -- lib/entities/main_actions.dart | 11 ++--- lib/router.dart | 6 --- lib/routes.dart | 1 - lib/src/screens/buy/payfura_page.dart | 58 --------------------------- 5 files changed, 3 insertions(+), 77 deletions(-) delete mode 100644 lib/src/screens/buy/payfura_page.dart diff --git a/lib/di.dart b/lib/di.dart index 0e4eb2a1a..76813f475 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -1,7 +1,6 @@ import 'package:cake_wallet/anonpay/anonpay_api.dart'; import 'package:cake_wallet/anonpay/anonpay_info_base.dart'; import 'package:cake_wallet/anonpay/anonpay_invoice_info.dart'; -import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart'; import 'package:cake_wallet/buy/onramper/onramper_buy_provider.dart'; import 'package:cake_wallet/buy/payfura/payfura_buy_provider.dart'; import 'package:cake_wallet/core/yat_service.dart'; @@ -14,7 +13,6 @@ import 'package:cake_wallet/ionia/ionia_tip.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/screens/anonpay_details/anonpay_details_page.dart'; import 'package:cake_wallet/src/screens/buy/webview_page.dart'; -import 'package:cake_wallet/src/screens/buy/payfura_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_dashboard_page.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart'; import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart'; @@ -685,8 +683,6 @@ Future setup({ wallet: getIt.get().wallet!, )); - getIt.registerFactory(() => PayFuraPage(getIt.get())); - getIt.registerFactory(() => ExchangeViewModel( getIt.get().wallet!, _tradesSource, diff --git a/lib/entities/main_actions.dart b/lib/entities/main_actions.dart index 5fb46d1d8..0cf3cead4 100644 --- a/lib/entities/main_actions.dart +++ b/lib/entities/main_actions.dart @@ -1,12 +1,10 @@ import 'package:cake_wallet/buy/moonpay/moonpay_buy_provider.dart'; import 'package:cake_wallet/buy/onramper/onramper_buy_provider.dart'; -import 'package:cake_wallet/buy/payfura/payfura_buy_provider.dart'; import 'package:cake_wallet/di.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; import 'package:cake_wallet/utils/device_info.dart'; -import 'package:cake_wallet/utils/responsive_layout_util.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart'; import 'package:cw_core/wallet_type.dart'; @@ -60,12 +58,9 @@ class MainActions { break; case WalletType.monero: if (viewModel.isEnabledBuyAction) { - if (DeviceInfo.instance.isMobile) { - Navigator.of(context).pushNamed(Routes.payfuraPage); - } else { - final uri = getIt.get().requestUrl(); - await launchUrl(uri); - } + // final uri = getIt.get().requestUrl(); + final uri = Uri.parse("https://monero.com/trade"); + await launchUrl(uri); } break; default: diff --git a/lib/router.dart b/lib/router.dart index ecb4f72c4..39dd75628 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -9,7 +9,6 @@ import 'package:cake_wallet/src/screens/backup/backup_page.dart'; import 'package:cake_wallet/src/screens/backup/edit_backup_password_page.dart'; import 'package:cake_wallet/src/screens/buy/buy_webview_page.dart'; import 'package:cake_wallet/src/screens/buy/webview_page.dart'; -import 'package:cake_wallet/src/screens/buy/payfura_page.dart'; import 'package:cake_wallet/src/screens/buy/pre_order_page.dart'; import 'package:cake_wallet/src/screens/restore/sweeping_wallet_page.dart'; import 'package:cake_wallet/src/screens/receive/anonpay_invoice_page.dart'; @@ -97,8 +96,6 @@ import 'package:cake_wallet/ionia/ionia_any_pay_payment_info.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/node.dart'; -import 'buy/moonpay/moonpay_buy_provider.dart'; - late RouteSettings currentRouteSettings; Route createRoute(RouteSettings settings) { @@ -528,9 +525,6 @@ Route createRoute(RouteSettings settings) { param1: title, param2: url)); - case Routes.payfuraPage: - return CupertinoPageRoute(builder: (_) => getIt.get()); - case Routes.advancedPrivacySettings: final type = settings.arguments as WalletType; diff --git a/lib/routes.dart b/lib/routes.dart index 10c2fef57..a7a50c433 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -81,7 +81,6 @@ class Routes { static const anonPayInvoicePage = '/anon_pay_invoice_page'; static const anonPayReceivePage = '/anon_pay_receive_page'; static const anonPayDetailsPage = '/anon_pay_details_page'; - static const payfuraPage = '/pay_fura_page'; static const desktop_actions = '/desktop_actions'; static const transactionsPage = '/transactions_page'; static const setup_2faPage = '/setup_2fa_page'; diff --git a/lib/src/screens/buy/payfura_page.dart b/lib/src/screens/buy/payfura_page.dart deleted file mode 100644 index a974aec25..000000000 --- a/lib/src/screens/buy/payfura_page.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'package:cake_wallet/buy/payfura/payfura_buy_provider.dart'; -import 'package:cake_wallet/generated/i18n.dart'; -import 'package:cake_wallet/src/screens/base_page.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_inappwebview/flutter_inappwebview.dart'; -import 'package:permission_handler/permission_handler.dart'; - -class PayFuraPage extends BasePage { - PayFuraPage(this._PayfuraBuyProvider); - - final PayfuraBuyProvider _PayfuraBuyProvider; - - @override - String get title => S.current.buy; - - @override - Widget body(BuildContext context) { - return PayFuraPageBody(_PayfuraBuyProvider); - } -} - -class PayFuraPageBody extends StatefulWidget { - PayFuraPageBody(this._PayfuraBuyProvider); - - final PayfuraBuyProvider _PayfuraBuyProvider; - - Uri get uri => _PayfuraBuyProvider.requestUrl(); - - @override - PayFuraPageBodyState createState() => PayFuraPageBodyState(); -} - -class PayFuraPageBodyState extends State { - PayFuraPageBodyState(); - - @override - Widget build(BuildContext context) { - return InAppWebView( - initialOptions: InAppWebViewGroupOptions( - crossPlatform: InAppWebViewOptions(transparentBackground: true), - ), - initialUrlRequest: URLRequest(url: widget.uri), - androidOnPermissionRequest: (_, __, resources) async { - bool permissionGranted = await Permission.camera.status == PermissionStatus.granted; - if (!permissionGranted) { - permissionGranted = await Permission.camera.request().isGranted; - } - - return PermissionRequestResponse( - resources: resources, - action: permissionGranted - ? PermissionRequestResponseAction.GRANT - : PermissionRequestResponseAction.DENY, - ); - }, - ); - } -} From 8ffad4bf80858d675f419b759d56bc7e76fb5124 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 16 Jun 2023 19:54:34 +0300 Subject: [PATCH 15/16] Revert removing swipe to delete wallet feature --- .../screens/wallet_list/wallet_list_page.dart | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index a9a4b894f..1a5433a2b 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -149,26 +149,12 @@ class WalletListBodyState extends State { return wallet.isCurrent ? row - : Row(children: [ - Expanded(child: row), - GestureDetector( - onTap: () => _removeWallet(wallet), - child: Container( - height: 40, - width: 44, - padding: EdgeInsets.only(right: 20), - child: Center( - child: Image.asset('assets/images/trash.png', - height: 16, - width: 16, - color: Theme.of(context) - .primaryTextTheme - .titleLarge! - .color), - ), - ), - ) - ]); + : Slidable( + key: Key('${wallet.key}'), + startActionPane: _actionPane(wallet), + endActionPane: _actionPane(wallet), + child: row, + ); }), ), ), @@ -291,4 +277,18 @@ class WalletListBodyState extends State { _progressBar = null; }); } + + 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, + ), + ], + ); } From 3f2af1334d9bfb8bff2920be1deac823f2c091f6 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Fri, 16 Jun 2023 21:43:33 +0300 Subject: [PATCH 16/16] Pump app versions and update release notes --- assets/text/Monerocom_Release_Notes.txt | 9 +++------ assets/text/Release_Notes.txt | 10 ++++------ scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- scripts/macos/app_env.sh | 4 ++-- 5 files changed, 17 insertions(+), 22 deletions(-) diff --git a/assets/text/Monerocom_Release_Notes.txt b/assets/text/Monerocom_Release_Notes.txt index 178fa45ea..d95478116 100644 --- a/assets/text/Monerocom_Release_Notes.txt +++ b/assets/text/Monerocom_Release_Notes.txt @@ -1,6 +1,3 @@ -Opt-in to Cake 2FA for security. More info: https://guides.cakewallet.com/docs/advanced-features/authentication/#cake-2fa -Auto generate restore height for Monero restore QR codes -Hausa and Yoruba languages -Additional privacy settings -Update Monero to 0.18.2.2 -Refactoring and bug fixes \ No newline at end of file +Enable iPad/Tablet separate layout from mobile UI +SideShift update and fixes +Bug Fixes \ No newline at end of file diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt index 178fa45ea..38e3e21df 100644 --- a/assets/text/Release_Notes.txt +++ b/assets/text/Release_Notes.txt @@ -1,6 +1,4 @@ -Opt-in to Cake 2FA for security. More info: https://guides.cakewallet.com/docs/advanced-features/authentication/#cake-2fa -Auto generate restore height for Monero restore QR codes -Hausa and Yoruba languages -Additional privacy settings -Update Monero to 0.18.2.2 -Refactoring and bug fixes \ No newline at end of file +Enable iPad/Tablet separate layout from mobile UI +SideShift update and fixes +Add MoonPay sell +Bug Fixes \ No newline at end of file diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 119ddb56c..8e4a338ab 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.3.7" -MONERO_COM_BUILD_NUMBER=50 +MONERO_COM_VERSION="1.3.8" +MONERO_COM_BUILD_NUMBER=51 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.6.6" -CAKEWALLET_BUILD_NUMBER=160 +CAKEWALLET_VERSION="4.6.7" +CAKEWALLET_BUILD_NUMBER=161 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 360b64770..114c9191f 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.3.7" -MONERO_COM_BUILD_NUMBER=48 +MONERO_COM_VERSION="1.3.8" +MONERO_COM_BUILD_NUMBER=49 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.6.6" -CAKEWALLET_BUILD_NUMBER=155 +CAKEWALLET_VERSION="4.6.7" +CAKEWALLET_BUILD_NUMBER=159 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" diff --git a/scripts/macos/app_env.sh b/scripts/macos/app_env.sh index 8f328465e..e05172bad 100755 --- a/scripts/macos/app_env.sh +++ b/scripts/macos/app_env.sh @@ -15,8 +15,8 @@ if [ -n "$1" ]; then fi CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="1.0.5" -CAKEWALLET_BUILD_NUMBER=24 +CAKEWALLET_VERSION="1.0.6" +CAKEWALLET_BUILD_NUMBER=25 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then