From 30bac3cb6c4348038e3add58eb55b9d034c0013c Mon Sep 17 00:00:00 2001 From: Justin Ehrenhofer Date: Thu, 3 Nov 2022 15:53:33 -0500 Subject: [PATCH 01/22] Add Anypay token (#518) * Add AnyPay token for interacting with the AnyPay API for Cake Pay payments * Add missing commas Co-authored-by: mkyq <53115730+mkyq@users.noreply.github.com> --- lib/anypay/anypay_api.dart | 10 ++++++++-- tool/utils/secret_key.dart | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/anypay/anypay_api.dart b/lib/anypay/anypay_api.dart index b53a3ebd1..5eb9e460b 100644 --- a/lib/anypay/anypay_api.dart +++ b/lib/anypay/anypay_api.dart @@ -5,11 +5,13 @@ import 'package:http/http.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cake_wallet/anypay/any_pay_payment.dart'; import 'package:cake_wallet/anypay/any_pay_trasnaction.dart'; +import 'package:cake_wallet/.secrets.g.dart' as secrets; class AnyPayApi { static const contentTypePaymentRequest = 'application/payment-request'; static const contentTypePayment = 'application/payment'; static const xPayproVersion = '2'; + static const anypayToken = secrets.anypayToken; static String chainByScheme(String scheme) { switch (scheme.toLowerCase()) { @@ -44,7 +46,9 @@ class AnyPayApi { final headers = { 'Content-Type': contentTypePaymentRequest, 'X-Paypro-Version': xPayproVersion, - 'Accept': '*/*',}; + 'Accept': '*/*', + 'x-wallet': 'cake', + 'x-wallet-token': anypayToken,}; final body = { 'chain': chainByScheme(scheme), 'currency': currencyByScheme(scheme).title}; @@ -66,7 +70,9 @@ class AnyPayApi { final headers = { 'Content-Type': contentTypePayment, 'X-Paypro-Version': xPayproVersion, - 'Accept': '*/*',}; + 'Accept': '*/*', + 'x-wallet': 'cake', + 'x-wallet-token': anypayToken,}; final body = { 'chain': chain, 'currency': currency, diff --git a/tool/utils/secret_key.dart b/tool/utils/secret_key.dart index 4502bca74..64c7beefd 100644 --- a/tool/utils/secret_key.dart +++ b/tool/utils/secret_key.dart @@ -26,6 +26,7 @@ class SecretKey { SecretKey('sideShiftAffiliateId', () => ''), SecretKey('sideShiftApiKey', () => ''), SecretKey('simpleSwapApiKey', () => ''), + SecretKey('anypayToken', () => ''), SecretKey('onramperApiKey', () => ''), ]; From c9450aa0175413d9914f6459c43bf472574e2d98 Mon Sep 17 00:00:00 2001 From: Justin Ehrenhofer Date: Thu, 3 Nov 2022 16:10:05 -0500 Subject: [PATCH 02/22] Switch DE and NL strings (#591) * Switch DE and NL strings Replaces https://github.com/cake-tech/cake_wallet/pull/530, which deleted NL strings. Co-Authored-By: Edwin den Boer <22837744+ProkhorZ@users.noreply.github.com> * Fix 2 strings Co-Authored-By: Edwin den Boer <22837744+ProkhorZ@users.noreply.github.com> Co-authored-by: Edwin den Boer <22837744+ProkhorZ@users.noreply.github.com> --- res/values/strings_de.arb | 94 +++++++++++++++++++-------------------- res/values/strings_nl.arb | 94 +++++++++++++++++++-------------------- 2 files changed, 94 insertions(+), 94 deletions(-) diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index a580ab90a..685d817d5 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -579,55 +579,55 @@ "add_value": "Wert hinzufügen", "activate": "aktivieren", "get_a": "Hole ein", - "digital_and_physical_card": "digitale en fysieke prepaid debetkaart", - "get_card_note": " die u kunt herladen met digitale valuta. Geen aanvullende informatie nodig!", - "signup_for_card_accept_terms": "Meld je aan voor de kaart en accepteer de voorwaarden.", - "add_fund_to_card": "Voeg prepaid tegoed toe aan de kaarten (tot ${value})", - "use_card_info_two": "Tegoeden worden omgezet naar USD wanneer ze op de prepaid-rekening staan, niet in digitale valuta.", - "use_card_info_three": "Gebruik de digitale kaart online of met contactloze betaalmethoden.", - "optionally_order_card": "Optioneel een fysieke kaart bestellen.", - "hide_details" : "Details verbergen", - "show_details" : "Toon details", - "upto": "tot ${value}", - "discount": "Bespaar ${value}%", - "gift_card_amount": "Bedrag cadeaubon", - "bill_amount": "Bill bedrag", - "you_pay": "U betaalt", - "tip": "Tip:", - "custom": "aangepast", - "by_cake_pay": "door Cake Pay", - "expires": "Verloopt", + "digital_and_physical_card": "digitale und physische Prepaid-Debitkarte", + "get_card_note": " die Sie mit digitaler Währung aufladen können. Keine zusätzlichen Informationen erforderlich!", + "signup_for_card_accept_terms": "Melden Sie sich für die Karte an und akzeptieren Sie die Bedingungen.", + "add_fund_to_card": "Prepaid-Guthaben zu den Karten hinzufügen (bis zu ${value})", + "use_card_info_two": "Guthaben werden auf dem Prepaid-Konto in USD umgerechnet, nicht in digitale Währung.", + "use_card_info_three": "Verwenden Sie die digitale Karte online oder mit kontaktlosen Zahlungsmethoden.", + "optionally_order_card": "Optional eine physische Karte bestellen.", + "hide_details": "Details ausblenden", + "show_details": "Details anzeigen", + "upto": "bis zu ${value}", + "discount": "${value} % sparen", + "gift_card_amount": "Gutscheinbetrag", + "bill_amount": "Rechnungsbetrag", + "you_pay": "Sie bezahlen", + "tip": "Hinweis:", + "custom": "benutzerdefiniert", + "by_cake_pay": "von Cake Pay", + "expires": "Läuft ab", "mm": "MM", - "yy": "JJ", + "yy": "YY", "online": "online", - "offline": "Offline", - "gift_card_number": "Cadeaukaartnummer", - "pin_number": "PIN-nummer", - "total_saving": "Totale besparingen", - "last_30_days": "Laatste 30 dagen", - "avg_savings": "Gem. besparingen", - "view_all": "Alles bekijken", - "active_cards": "Actieve kaarten", - "delete_account": "Account verwijderen", - "cards": "Kaarten", - "active": "Actief", - "redeemed": "Verzilverd", - "gift_card_balance_note": "Cadeaukaarten met een resterend saldo verschijnen hier", - "gift_card_redeemed_note": "Cadeaubonnen die je hebt ingewisseld, verschijnen hier", - "logout": "Uitloggen", - "add_tip": "Tip toevoegen", - "percentageOf": "van ${amount}", - "is_percentage": "is", - "search_category": "Zoek categorie", - "mark_as_redeemed": "Markeer als ingewisseld", - "more_options": "Meer opties", - "waiting_payment_confirmation": "In afwachting van betalingsbevestiging", - "transaction_sent_notice": "Als het scherm na 1 minuut niet verder gaat, controleer dan een blokverkenner en je e-mail.", - "agree": "mee eens", - "in_store": "In winkel", - "generating_gift_card": "Cadeaubon genereren", - "payment_was_received": "Uw betaling is ontvangen.", - "proceed_after_one_minute": "Als het scherm na 1 minuut niet verder gaat, controleer dan uw e-mail.", + "offline": "offline", + "gift_card_number": "Geschenkkartennummer", + "pin_number": "PIN-Nummer", + "total_saving": "Gesamteinsparungen", + "last_30_days": "Letzte 30 Tage", + "avg_savings": "Durchschn. Einsparungen", + "view_all": "Alle anzeigen", + "active_cards": "Aktive Karten", + "delete_account": "Konto löschen", + "cards": "Karten", + "active": "Aktiv", + "redeemed": "Versilbert", + "gift_card_balance_note": "Geschenkkarten mit Restguthaben erscheinen hier", + "gift_card_redeemed_note": "Gutscheine, die Sie eingelöst haben, werden hier angezeigt", + "logout": "Abmelden", + "add_tip": "Tipp hinzufügen", + "percentageOf": "von ${amount}", + "is_percentage": "ist", + "search_category": "Suchkategorie", + "mark_as_redeemed": "Als eingelöst markieren", + "more_options": "Weitere Optionen", + "waiting_payment_confirmation": "Warte auf Zahlungsbestätigung", + "transaction_sent_notice": "Wenn der Bildschirm nach 1 Minute nicht weitergeht, überprüfen Sie einen Block-Explorer und Ihre E-Mail.", + "agree": "stimme zu", + "in_store": "Im Geschäft", + "generating_gift_card": "Geschenkkarte wird erstellt", + "payment_was_received": "Ihre Zahlung ist eingegangen.", + "proceed_after_one_minute": "Wenn der Bildschirm nach 1 Minute nicht weitergeht, überprüfen Sie bitte Ihre E-Mail.", "order_id": "Bestell-ID", "gift_card_is_generated": "Geschenkkarte wird generiert", "open_gift_card": "Geschenkkarte öffnen", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index bc53337a8..fa748b552 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -579,55 +579,55 @@ "add_value": "Waarde toevoegen", "activate": "Activeren", "get_a": "Krijg een ", - "digital_and_physical_card": "digitale und physische Prepaid-Debitkarte", - "get_card_note": " die Sie mit digitaler Währung aufladen können. Keine zusätzlichen Informationen erforderlich!", - "signup_for_card_accept_terms": "Melden Sie sich für die Karte an und akzeptieren Sie die Bedingungen.", - "add_fund_to_card": "Prepaid-Guthaben zu den Karten hinzufügen (bis zu ${value})", - "use_card_info_two": "Guthaben werden auf dem Prepaid-Konto in USD umgerechnet, nicht in digitale Währung.", - "use_card_info_three": "Verwenden Sie die digitale Karte online oder mit kontaktlosen Zahlungsmethoden.", - "optional_order_card": "Optional eine physische Karte bestellen.", - "hide_details": "Details ausblenden", - "show_details": "Details anzeigen", - "upto": "bis zu ${value}", - "discount": "${value} % sparen", - "gift_card_amount": "Gutscheinbetrag", - "bill_amount": "Rechnungsbetrag", - "you_pay": "Sie bezahlen", - "tip": "Hinweis:", - "custom": "benutzerdefiniert", - "by_cake_pay": "von Cake Pay", - "expires": "Läuft ab", + "digital_and_physical_card": "digitale en fysieke prepaid debetkaart", + "get_card_note": " die u kunt herladen met digitale valuta. Geen aanvullende informatie nodig!", + "signup_for_card_accept_terms": "Meld je aan voor de kaart en accepteer de voorwaarden.", + "add_fund_to_card": "Voeg prepaid tegoed toe aan de kaarten (tot ${value})", + "use_card_info_two": "Tegoeden worden omgezet naar USD wanneer ze op de prepaid-rekening staan, niet in digitale valuta.", + "use_card_info_three": "Gebruik de digitale kaart online of met contactloze betaalmethoden.", + "optionally_order_card": "Optioneel een fysieke kaart bestellen.", + "hide_details" : "Details verbergen", + "show_details" : "Toon details", + "upto": "tot ${value}", + "discount": "Bespaar ${value}%", + "gift_card_amount": "Bedrag cadeaubon", + "bill_amount": "Bill bedrag", + "you_pay": "U betaalt", + "tip": "Tip:", + "custom": "aangepast", + "by_cake_pay": "door Cake Pay", + "expires": "Verloopt", "mm": "MM", - "yy": "YY", + "yy": "JJ", "online": "online", - "offline": "offline", - "gift_card_number": "Geschenkkartennummer", - "pin_number": "PIN-Nummer", - "total_saving": "Gesamteinsparungen", - "last_30_days": "Letzte 30 Tage", - "avg_savings": "Durchschn. Einsparungen", - "view_all": "Alle anzeigen", - "active_cards": "Aktive Karten", - "delete_account": "Konto löschen", - "cards": "Karten", - "active": "Aktiv", - "redeemed": "Versilbert", - "gift_card_balance_note": "Geschenkkarten mit Restguthaben erscheinen hier", - "gift_card_redeemed_note": "Gutscheine, die Sie eingelöst haben, werden hier angezeigt", - "abmelden": "Abmelden", - "add_tip": "Tipp hinzufügen", - "percentageOf": "von ${amount}", - "is_percentage": "ist", - "search_category": "Suchkategorie", - "mark_as_redeemed": "Als eingelöst markieren", - "more_options": "Weitere Optionen", - "waiting_payment_confirmation": "Warte auf Zahlungsbestätigung", - "transaction_sent_notice": "Wenn der Bildschirm nach 1 Minute nicht weitergeht, überprüfen Sie einen Block-Explorer und Ihre E-Mail.", - "agree": "stimme zu", - "in_store": "Im Geschäft", - "generating_gift_card": "Geschenkkarte wird erstellt", - "payment_was_received": "Ihre Zahlung ist eingegangen.", - "proceed_after_one_minute": "Wenn der Bildschirm nach 1 Minute nicht weitergeht, überprüfen Sie bitte Ihre E-Mail.", + "offline": "Offline", + "gift_card_number": "Cadeaukaartnummer", + "pin_number": "PIN-nummer", + "total_saving": "Totale besparingen", + "last_30_days": "Laatste 30 dagen", + "avg_savings": "Gem. besparingen", + "view_all": "Alles bekijken", + "active_cards": "Actieve kaarten", + "delete_account": "Account verwijderen", + "cards": "Kaarten", + "active": "Actief", + "redeemed": "Verzilverd", + "gift_card_balance_note": "Cadeaukaarten met een resterend saldo verschijnen hier", + "gift_card_redeemed_note": "Cadeaubonnen die je hebt ingewisseld, verschijnen hier", + "logout": "Uitloggen", + "add_tip": "Tip toevoegen", + "percentageOf": "van ${amount}", + "is_percentage": "is", + "search_category": "Zoek categorie", + "mark_as_redeemed": "Markeer als ingewisseld", + "more_options": "Meer opties", + "waiting_payment_confirmation": "In afwachting van betalingsbevestiging", + "transaction_sent_notice": "Als het scherm na 1 minuut niet verder gaat, controleer dan een blokverkenner en je e-mail.", + "agree": "mee eens", + "in_store": "In winkel", + "generating_gift_card": "Cadeaubon genereren", + "payment_was_received": "Uw betaling is ontvangen.", + "proceed_after_one_minute": "Als het scherm na 1 minuut niet verder gaat, controleer dan uw e-mail.", "order_id": "Order-ID", "gift_card_is_generated": "Cadeaukaart is gegenereerd", "open_gift_card": "Geschenkkaart openen", From 8683b0f435e2344dffecd573b231140179e773e6 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Thu, 3 Nov 2022 18:16:58 -0400 Subject: [PATCH 03/22] Update version for cake wallet to 4.5.0 and monero.com to 1.2.0 (#592) --- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 48fd9c196..c0b934dae 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.1.2" -MONERO_COM_BUILD_NUMBER=21 +MONERO_COM_VERSION="1.2.0" +MONERO_COM_BUILD_NUMBER=24 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.4.8" -CAKEWALLET_BUILD_NUMBER=122 +CAKEWALLET_VERSION="4.5.0" +CAKEWALLET_BUILD_NUMBER=127 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 d20e921a0..e5bed6a1a 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.1.2" -MONERO_COM_BUILD_NUMBER=23 +MONERO_COM_VERSION="1.2.0" +MONERO_COM_BUILD_NUMBER=24 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.4.8" -CAKEWALLET_BUILD_NUMBER=121 +CAKEWALLET_VERSION="4.5.0" +CAKEWALLET_BUILD_NUMBER=127 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From 3ec414ae666c6a78f5219e967b5596c3d2b91335 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Thu, 3 Nov 2022 19:13:13 -0400 Subject: [PATCH 04/22] Add adapters for some of bitcoin, litecoin and monero transactions priorities. Replace direct calls of transaction priorities for exchange_view_model. (#593) --- lib/bitcoin/cw_bitcoin.dart | 16 ++++++++++++++++ lib/monero/cw_monero.dart | 8 ++++++++ lib/view_model/exchange/exchange_view_model.dart | 15 +++++++-------- tool/configure.dart | 6 ++++++ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/lib/bitcoin/cw_bitcoin.dart b/lib/bitcoin/cw_bitcoin.dart index ff6fd7531..f224efde6 100644 --- a/lib/bitcoin/cw_bitcoin.dart +++ b/lib/bitcoin/cw_bitcoin.dart @@ -140,4 +140,20 @@ class CWBitcoin extends Bitcoin { WalletService createLitecoinWalletService(Box walletInfoSource, Box unspentCoinSource) { return LitecoinWalletService(walletInfoSource, unspentCoinSource); } + + @override + TransactionPriority getBitcoinTransactionPriorityMedium() + => BitcoinTransactionPriority.medium; + + @override + TransactionPriority getLitecoinTransactionPriorityMedium() + => LitecoinTransactionPriority.medium; + + @override + TransactionPriority getBitcoinTransactionPrioritySlow() + => BitcoinTransactionPriority.slow; + + @override + TransactionPriority getLitecoinTransactionPrioritySlow() + => LitecoinTransactionPriority.slow; } \ No newline at end of file diff --git a/lib/monero/cw_monero.dart b/lib/monero/cw_monero.dart index 9b10a12c9..48c0c51a4 100644 --- a/lib/monero/cw_monero.dart +++ b/lib/monero/cw_monero.dart @@ -170,6 +170,14 @@ class CWMonero extends Monero { return MoneroTransactionPriority.automatic; } + @override + TransactionPriority getMoneroTransactionPrioritySlow() + => MoneroTransactionPriority.slow; + + @override + TransactionPriority getMoneroTransactionPriorityAutomatic() + => MoneroTransactionPriority.automatic; + @override TransactionPriority deserializeMoneroTransactionPriority({required int raw}) { return MoneroTransactionPriority.deserialize(raw: raw); diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 9ff690b70..e7e73855b 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -7,8 +7,6 @@ import 'package:cake_wallet/exchange/sideshift/sideshift_exchange_provider.dart' import 'package:cake_wallet/exchange/sideshift/sideshift_request.dart'; import 'package:cake_wallet/exchange/simpleswap/simpleswap_exchange_provider.dart'; import 'package:cake_wallet/view_model/settings/settings_view_model.dart'; -import 'package:cw_bitcoin/bitcoin_transaction_priority.dart'; -import 'package:cw_core/monero_transaction_priority.dart'; import 'package:cw_core/transaction_priority.dart'; import 'package:cake_wallet/exchange/simpleswap/simpleswap_request.dart'; import 'package:cw_core/wallet_base.dart'; @@ -16,6 +14,7 @@ import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/sync_status.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/exchange/exchange_provider.dart'; import 'package:cake_wallet/exchange/limits.dart'; import 'package:cake_wallet/exchange/trade.dart'; @@ -200,11 +199,11 @@ abstract class ExchangeViewModelBase with Store { switch (wallet.type) { case WalletType.monero: case WalletType.haven: - return _settingsViewModel.transactionPriority == MoneroTransactionPriority.slow; + return _settingsViewModel.transactionPriority == monero!.getMoneroTransactionPrioritySlow(); case WalletType.bitcoin: - return _settingsViewModel.transactionPriority == BitcoinTransactionPriority.slow; + return _settingsViewModel.transactionPriority == bitcoin!.getBitcoinTransactionPrioritySlow(); case WalletType.litecoin: - return _settingsViewModel.transactionPriority == LitecoinTransactionPriority.slow; + return _settingsViewModel.transactionPriority == bitcoin!.getLitecoinTransactionPrioritySlow(); default: return false; } @@ -637,13 +636,13 @@ abstract class ExchangeViewModelBase with Store { switch (wallet.type) { case WalletType.monero: case WalletType.haven: - _settingsStore.priority[wallet.type] = MoneroTransactionPriority.automatic; + _settingsStore.priority[wallet.type] = monero!.getMoneroTransactionPriorityAutomatic(); break; case WalletType.bitcoin: - _settingsStore.priority[wallet.type] = BitcoinTransactionPriority.medium; + _settingsStore.priority[wallet.type] = bitcoin!.getBitcoinTransactionPriorityMedium(); break; case WalletType.litecoin: - _settingsStore.priority[wallet.type] = LitecoinTransactionPriority.medium; + _settingsStore.priority[wallet.type] = bitcoin!.getLitecoinTransactionPriorityMedium(); break; default: break; diff --git a/tool/configure.dart b/tool/configure.dart index ca8d3c9fb..0d3d175c4 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -92,6 +92,10 @@ abstract class Bitcoin { void updateUnspents(Object wallet); WalletService createBitcoinWalletService(Box walletInfoSource, Box unspentCoinSource); WalletService createLitecoinWalletService(Box walletInfoSource, Box unspentCoinSource); + TransactionPriority getBitcoinTransactionPriorityMedium(); + TransactionPriority getLitecoinTransactionPriorityMedium(); + TransactionPriority getBitcoinTransactionPrioritySlow(); + TransactionPriority getLitecoinTransactionPrioritySlow(); } """; @@ -218,6 +222,8 @@ abstract class Monero { int getHeigthByDate({required DateTime date}); TransactionPriority getDefaultTransactionPriority(); + TransactionPriority getMoneroTransactionPrioritySlow(); + TransactionPriority getMoneroTransactionPriorityAutomatic(); TransactionPriority deserializeMoneroTransactionPriority({required int raw}); List getTransactionPriorities(); List getMoneroWordList(String language); From d40cd3ebadc3135b9041f8893f61f13e349d599a Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Thu, 3 Nov 2022 19:14:48 -0400 Subject: [PATCH 05/22] Update build version for cake wallet to 128 (#594) --- scripts/android/app_env.sh | 2 +- scripts/ios/app_env.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index c0b934dae..929d2b444 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -21,7 +21,7 @@ MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=127 +CAKEWALLET_BUILD_NUMBER=128 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 e5bed6a1a..43ec68c31 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -19,7 +19,7 @@ MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=127 +CAKEWALLET_BUILD_NUMBER=128 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From 5d741b183f5ef0a25852f568ee93e085abea4dfd Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Fri, 4 Nov 2022 15:55:21 -0400 Subject: [PATCH 06/22] =?UTF-8?q?Add=20default=20values=20for=20hive=20fie?= =?UTF-8?q?lds=20for=20Node,=20UnspentCoinsInfo,=20Wallet=E2=80=A6=20(#598?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add default values for hive fields for Node, UnspentCoinsInfo, WalletInfo, Order, Contact, TransactionDescription, Trade --- cw_core/lib/node.dart | 4 ++-- cw_core/lib/unspent_coins_info.dart | 8 ++++---- cw_core/lib/wallet_info.dart | 16 ++++++++-------- lib/buy/order.dart | 14 +++++++------- lib/entities/contact.dart | 6 +++--- lib/entities/transaction_description.dart | 2 +- lib/exchange/trade.dart | 12 ++++++------ 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index 1f2cfe7d2..886add3cd 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -36,7 +36,7 @@ class Node extends HiveObject with Keyable { static const typeId = 1; static const boxName = 'Nodes'; - @HiveField(0) + @HiveField(0, defaultValue: '') late String uriRaw; @HiveField(1) @@ -45,7 +45,7 @@ class Node extends HiveObject with Keyable { @HiveField(2) String? password; - @HiveField(3) + @HiveField(3, defaultValue: 0) late int typeRaw; @HiveField(4) diff --git a/cw_core/lib/unspent_coins_info.dart b/cw_core/lib/unspent_coins_info.dart index 420517939..d825db279 100644 --- a/cw_core/lib/unspent_coins_info.dart +++ b/cw_core/lib/unspent_coins_info.dart @@ -15,16 +15,16 @@ class UnspentCoinsInfo extends HiveObject { static const boxName = 'Unspent'; static const boxKey = 'unspentBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String walletId; - @HiveField(1) + @HiveField(1, defaultValue: '') String hash; - @HiveField(2) + @HiveField(2, defaultValue: false) bool isFrozen; - @HiveField(3) + @HiveField(3, defaultValue: false) bool isSending; @HiveField(4) diff --git a/cw_core/lib/wallet_info.dart b/cw_core/lib/wallet_info.dart index 66ed1e932..a25702cf7 100644 --- a/cw_core/lib/wallet_info.dart +++ b/cw_core/lib/wallet_info.dart @@ -33,31 +33,31 @@ class WalletInfo extends HiveObject { static const typeId = 4; static const boxName = 'WalletInfo'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; - @HiveField(1) + @HiveField(1, defaultValue: '') String name; @HiveField(2) WalletType type; - @HiveField(3) + @HiveField(3, defaultValue: false) bool isRecovery; - @HiveField(4) + @HiveField(4, defaultValue: 0) int restoreHeight; - @HiveField(5) + @HiveField(5, defaultValue: 0) int timestamp; - @HiveField(6) + @HiveField(6, defaultValue: '') String dirPath; - @HiveField(7) + @HiveField(7, defaultValue: '') String path; - @HiveField(8) + @HiveField(8, defaultValue: '') String address; @HiveField(10) diff --git a/lib/buy/order.dart b/lib/buy/order.dart index 16dfbb4e0..387fbcd34 100644 --- a/lib/buy/order.dart +++ b/lib/buy/order.dart @@ -30,10 +30,10 @@ class Order extends HiveObject { static const boxName = 'Orders'; static const boxKey = 'ordersBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; - @HiveField(1) + @HiveField(1, defaultValue: '') String transferId; @HiveField(2) @@ -42,7 +42,7 @@ class Order extends HiveObject { @HiveField(3) String? to; - @HiveField(4) + @HiveField(4, defaultValue: '') late String stateRaw; TradeState get state => TradeState.deserialize(raw: stateRaw); @@ -50,16 +50,16 @@ class Order extends HiveObject { @HiveField(5) DateTime createdAt; - @HiveField(6) + @HiveField(6, defaultValue: '') String amount; - @HiveField(7) + @HiveField(7, defaultValue: '') String receiveAddress; - @HiveField(8) + @HiveField(8, defaultValue: '') String walletId; - @HiveField(9) + @HiveField(9, defaultValue: 0) late int providerRaw; BuyProviderDescription get provider => diff --git a/lib/entities/contact.dart b/lib/entities/contact.dart index b76e4de43..e111429ca 100644 --- a/lib/entities/contact.dart +++ b/lib/entities/contact.dart @@ -17,13 +17,13 @@ class Contact extends HiveObject with Keyable { static const typeId = 0; static const boxName = 'Contacts'; - @HiveField(0) + @HiveField(0, defaultValue: '') String name; - @HiveField(1) + @HiveField(1, defaultValue: '') String address; - @HiveField(2) + @HiveField(2, defaultValue: 0) late int raw; CryptoCurrency get type => CryptoCurrency.deserialize(raw: raw); diff --git a/lib/entities/transaction_description.dart b/lib/entities/transaction_description.dart index 868077733..86d6b043a 100644 --- a/lib/entities/transaction_description.dart +++ b/lib/entities/transaction_description.dart @@ -10,7 +10,7 @@ class TransactionDescription extends HiveObject { static const boxName = 'TransactionDescriptions'; static const boxKey = 'transactionDescriptionsBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; @HiveField(1) diff --git a/lib/exchange/trade.dart b/lib/exchange/trade.dart index 0f6425ecc..99b73e789 100644 --- a/lib/exchange/trade.dart +++ b/lib/exchange/trade.dart @@ -40,26 +40,26 @@ class Trade extends HiveObject { static const boxName = 'Trades'; static const boxKey = 'tradesBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; - @HiveField(1) + @HiveField(1, defaultValue: 0) late int providerRaw; ExchangeProviderDescription get provider => ExchangeProviderDescription.deserialize(raw: providerRaw); - @HiveField(2) + @HiveField(2, defaultValue: 0) late int fromRaw; CryptoCurrency get from => CryptoCurrency.deserialize(raw: fromRaw); - @HiveField(3) + @HiveField(3, defaultValue: 0) late int toRaw; CryptoCurrency get to => CryptoCurrency.deserialize(raw: toRaw); - @HiveField(4) + @HiveField(4, defaultValue: '') late String stateRaw; TradeState get state => TradeState.deserialize(raw: stateRaw); @@ -70,7 +70,7 @@ class Trade extends HiveObject { @HiveField(6) DateTime? expiredAt; - @HiveField(7) + @HiveField(7, defaultValue: '') String amount; @HiveField(8) From 0a0f9e80fd01909c6a8044e6a1ad290dcb953fca Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:51:27 -0400 Subject: [PATCH 07/22] Update build version for cakewallet to 129; monero.com to 25 (#600) --- scripts/android/app_env.sh | 4 ++-- scripts/ios/app_env.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 929d2b444..ea9ae40c7 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,13 +15,13 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=24 +MONERO_COM_BUILD_NUMBER=25 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=128 +CAKEWALLET_BUILD_NUMBER=129 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 43ec68c31..81f7ba668 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -14,12 +14,12 @@ APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=24 +MONERO_COM_BUILD_NUMBER=25 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=128 +CAKEWALLET_BUILD_NUMBER=129 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From 8981ebad566ecbe62ecb2ec766d86501663444b7 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Mon, 7 Nov 2022 13:16:09 -0500 Subject: [PATCH 08/22] Fix parsing of json to Map for ionia api. Update sing in and verify email methods for ionia api. (#604) --- lib/ionia/ionia_api.dart | 30 +++++++++++++----------------- lib/ionia/ionia_service.dart | 6 ++---- lib/ionia/ionia_virtual_card.dart | 2 +- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/lib/ionia/ionia_api.dart b/lib/ionia/ionia_api.dart index e9526a47e..274e557c7 100644 --- a/lib/ionia/ionia_api.dart +++ b/lib/ionia/ionia_api.dart @@ -36,8 +36,8 @@ class IoniaApi { throw Exception('Unexpected http status: ${response.statusCode}'); } - final bodyJson = json.decode(response.body) as Map; - final data = bodyJson['Data'] as Map; + final bodyJson = json.decode(response.body) as Map; + final data = bodyJson['Data'] as Map; final isSuccessful = bodyJson['Successful'] as bool; if (!isSuccessful) { @@ -50,13 +50,11 @@ class IoniaApi { // Verify email Future verifyEmail({ - required String username, required String email, required String code, required String clientId}) async { final headers = { 'clientId': clientId, - 'username': username, 'EmailAddress': email}; final query = {'verificationCode': code}; final uri = verifyEmailUri.replace(queryParameters: query); @@ -66,8 +64,8 @@ class IoniaApi { throw Exception('Unexpected http status: ${response.statusCode}'); } - final bodyJson = json.decode(response.body) as Map; - final data = bodyJson['Data'] as Map; + final bodyJson = json.decode(response.body) as Map; + final data = bodyJson['Data'] as Map; final isSuccessful = bodyJson['Successful'] as bool; if (!isSuccessful) { @@ -75,13 +73,13 @@ class IoniaApi { } final password = data['password'] as String; - username = data['username'] as String; + final username = data['username'] as String; return IoniaUserCredentials(username, password); } // Sign In - Future signIn(String email, {required String clientId}) async { + Future signIn(String email, {required String clientId}) async { final headers = {'clientId': clientId}; final query = {'emailAddress': email}; final uri = signInUri.replace(queryParameters: query); @@ -91,15 +89,13 @@ class IoniaApi { throw Exception('Unexpected http status: ${response.statusCode}'); } - final bodyJson = json.decode(response.body) as Map; - final data = bodyJson['Data'] as Map; + final bodyJson = json.decode(response.body) as Map; + final data = bodyJson['Data'] as Map; final isSuccessful = bodyJson['Successful'] as bool; if (!isSuccessful) { throw Exception(data['ErrorMessage'] as String); } - - return data['username'] as String; } // Get virtual card @@ -118,15 +114,15 @@ class IoniaApi { throw Exception('Unexpected http status: ${response.statusCode}'); } - final bodyJson = json.decode(response.body) as Map; - final data = bodyJson['Data'] as Map; + final bodyJson = json.decode(response.body) as Map; + final data = bodyJson['Data'] as Map; final isSuccessful = bodyJson['Successful'] as bool; if (!isSuccessful) { throw Exception(data['message'] as String); } - final virtualCard = data['VirtualCard'] as Map; + final virtualCard = data['VirtualCard'] as Map; return IoniaVirtualCard.fromMap(virtualCard); } @@ -146,8 +142,8 @@ class IoniaApi { throw Exception('Unexpected http status: ${response.statusCode}'); } - final bodyJson = json.decode(response.body) as Map; - final data = bodyJson['Data'] as Map; + final bodyJson = json.decode(response.body) as Map; + final data = bodyJson['Data'] as Map; final isSuccessful = bodyJson['Successful'] as bool? ?? false; if (!isSuccessful) { diff --git a/lib/ionia/ionia_service.dart b/lib/ionia/ionia_service.dart index a18cac5cb..942bc25b5 100644 --- a/lib/ionia/ionia_service.dart +++ b/lib/ionia/ionia_service.dart @@ -31,9 +31,8 @@ class IoniaService { // Verify email Future verifyEmail(String code) async { - final username = (await secureStorage.read(key: ioniaUsernameStorageKey))!; final email = (await secureStorage.read(key: ioniaEmailStorageKey))!; - final credentials = await ioniaApi.verifyEmail(email: email, username: username, code: code, clientId: clientId); + final credentials = await ioniaApi.verifyEmail(email: email, code: code, clientId: clientId); await secureStorage.write(key: ioniaPasswordStorageKey, value: credentials.password); await secureStorage.write(key: ioniaUsernameStorageKey, value: credentials.username); } @@ -41,9 +40,8 @@ class IoniaService { // Sign In Future signIn(String email) async { - final username = await ioniaApi.signIn(email, clientId: clientId); + await ioniaApi.signIn(email, clientId: clientId); await secureStorage.write(key: ioniaEmailStorageKey, value: email); - await secureStorage.write(key: ioniaUsernameStorageKey, value: username); } Future getUserEmail() async { diff --git a/lib/ionia/ionia_virtual_card.dart b/lib/ionia/ionia_virtual_card.dart index 29736c22f..ca3e35dbc 100644 --- a/lib/ionia/ionia_virtual_card.dart +++ b/lib/ionia/ionia_virtual_card.dart @@ -11,7 +11,7 @@ class IoniaVirtualCard { required this.fundsLimit, required this.spendLimit}); - factory IoniaVirtualCard.fromMap(Map source) { + factory IoniaVirtualCard.fromMap(Map source) { final created = source['created'] as String; final createdAt = DateTime.tryParse(created); From 2696c242a917793f19657e39a5d28215832473da Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Mon, 7 Nov 2022 13:36:57 -0500 Subject: [PATCH 09/22] Removed force white background color for CupertinoDatePicker. (#605) --- lib/utils/date_picker.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/utils/date_picker.dart b/lib/utils/date_picker.dart index f774142bf..99274d8e0 100644 --- a/lib/utils/date_picker.dart +++ b/lib/utils/date_picker.dart @@ -45,7 +45,6 @@ Future _buildCupertinoDataPicker( initialDateTime: initialDate, minimumDate: firstDate, maximumDate: lastDate, - backgroundColor: Colors.white, ), ); } From 71444219bea2c32d0095b831ac23cbbb1a33e559 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Mon, 7 Nov 2022 22:35:34 +0200 Subject: [PATCH 10/22] Cw 218 fix change pin using bio auth (#599) * - push change pin page as a replacement for auth page to avoid closing it once its opened - Add cool-down duration after popping flushbars and pushing new routes --- ios/Podfile.lock | 2 +- lib/src/screens/auth/auth_page.dart | 24 +++++++++---------- .../settings/settings_view_model.dart | 12 +++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index f8f120bd6..3a810430d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -252,4 +252,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/lib/src/screens/auth/auth_page.dart b/lib/src/screens/auth/auth_page.dart index 0b3b8511a..7a1bd8420 100644 --- a/lib/src/screens/auth/auth_page.dart +++ b/lib/src/screens/auth/auth_page.dart @@ -106,22 +106,22 @@ class AuthPageState extends State { _progressBar = null; } - Future close({String? route}) async { + Future close({String? route, dynamic arguments}) async { if (_key.currentContext == null) { throw Exception('Key context is null. Should be not happened'); } - WidgetsBinding.instance.addPostFrameCallback((_) { - dismissFlushBar(_authBar); - dismissFlushBar(_progressBar); - WidgetsBinding.instance.addPostFrameCallback((_) { - if (route != null) { - Navigator.of(_key.currentContext!).pushReplacementNamed(route); - } else { - Navigator.of(_key.currentContext!).pop(); - } - }); - }); + /// not the best scenario, but WidgetsBinding is not behaving correctly on Android + await Future.delayed(Duration(milliseconds: 50)); + await _authBar?.dismiss(); + await Future.delayed(Duration(milliseconds: 50)); + await _progressBar?.dismiss(); + await Future.delayed(Duration(milliseconds: 50)); + if (route != null) { + Navigator.of(_key.currentContext!).pushReplacementNamed(route, arguments: arguments); + } else { + Navigator.of(_key.currentContext!).pop(); + } } @override diff --git a/lib/view_model/settings/settings_view_model.dart b/lib/view_model/settings/settings_view_model.dart index 96b2e7bdd..aabe51ef1 100644 --- a/lib/view_model/settings/settings_view_model.dart +++ b/lib/view_model/settings/settings_view_model.dart @@ -156,13 +156,13 @@ abstract class SettingsViewModelBase with Store { handler: (BuildContext context) { Navigator.of(context).pushNamed(Routes.auth, arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { - auth.close(); - if (isAuthenticatedSuccessfully) { - Navigator.of(context).pushNamed(Routes.setupPin, arguments: - (PinCodeState setupPinContext, String _) { + auth.close( + route: isAuthenticatedSuccessfully ? Routes.setupPin : null, + arguments: (PinCodeState setupPinContext, + String _) { setupPinContext.close(); - }); - } + }, + ); }); }), PickerListItem( From b6a6bf88bad58afdea501bc543fda80076ed999a Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:54:50 -0500 Subject: [PATCH 11/22] Update build number for cakewallet to 130; monero.com to 26 (#606) --- scripts/android/app_env.sh | 4 ++-- scripts/ios/app_env.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index ea9ae40c7..b9ca9f98b 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,13 +15,13 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=25 +MONERO_COM_BUILD_NUMBER=26 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=129 +CAKEWALLET_BUILD_NUMBER=130 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 81f7ba668..bab932345 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -14,12 +14,12 @@ APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=25 +MONERO_COM_BUILD_NUMBER=26 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=129 +CAKEWALLET_BUILD_NUMBER=130 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From d99aac9d98085d1c449c3ab1844755a3fac12c38 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:57:33 -0500 Subject: [PATCH 12/22] Cast rateId as optional String for calculateAmount for ChangeNow api. (#612) --- lib/exchange/changenow/changenow_exchange_provider.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exchange/changenow/changenow_exchange_provider.dart b/lib/exchange/changenow/changenow_exchange_provider.dart index b663b697c..20f529733 100644 --- a/lib/exchange/changenow/changenow_exchange_provider.dart +++ b/lib/exchange/changenow/changenow_exchange_provider.dart @@ -232,7 +232,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider { final responseJSON = json.decode(response.body) as Map; final fromAmount = double.parse(responseJSON['fromAmount'].toString()); final toAmount = double.parse(responseJSON['toAmount'].toString()); - final rateId = responseJSON['rateId'] as String ?? ''; + final rateId = responseJSON['rateId'] as String? ?? ''; if (rateId.isNotEmpty) { _lastUsedRateId = rateId; From 7d49dc47616559b8e94f72c54abd50a6eb9ea341 Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 10 Nov 2022 20:08:52 +0200 Subject: [PATCH 13/22] rework confirm sending screen for cake pay (#603) * rework confirm sending allert * remove confirm_modal.dart * fix text color and buttons size --- lib/di.dart | 1 + .../cards/ionia_buy_card_detail_page.dart | 84 +++------- .../screens/ionia/widgets/confirm_modal.dart | 149 ------------------ .../send/widgets/confirm_sending_alert.dart | 86 +++++++++- lib/src/widgets/base_alert_dialog.dart | 98 +++++++----- .../ionia_purchase_merch_view_model.dart | 4 + 6 files changed, 169 insertions(+), 253 deletions(-) delete mode 100644 lib/src/screens/ionia/widgets/confirm_modal.dart diff --git a/lib/di.dart b/lib/di.dart index 7ce2ff6d9..90549cf6f 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -701,6 +701,7 @@ Future setup( ioniaAnyPayService: getIt.get(), amount: amount, ioniaMerchant: merchant, + sendViewModel: getIt.get() ); }); diff --git a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart index f3b12e65b..4b9f0a220 100644 --- a/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart +++ b/lib/src/screens/ionia/cards/ionia_buy_card_detail_page.dart @@ -3,7 +3,6 @@ import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/ionia/ionia_tip.dart'; import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/routes.dart'; -import 'package:cake_wallet/src/screens/ionia/widgets/confirm_modal.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/ionia_alert_model.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/text_icon_button.dart'; import 'package:cake_wallet/src/widgets/alert_with_one_action.dart'; @@ -18,6 +17,7 @@ import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter_mobx/flutter_mobx.dart'; import 'package:mobx/mobx.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; +import 'package:cake_wallet/src/screens/send/widgets/confirm_sending_alert.dart'; class IoniaBuyGiftCardDetailPage extends BasePage { IoniaBuyGiftCardDetailPage(this.ioniaPurchaseViewModel); @@ -295,73 +295,35 @@ class IoniaBuyGiftCardDetailPage extends BasePage { final amount = ioniaPurchaseViewModel.invoice!.totalAmount; final addresses = ioniaPurchaseViewModel.invoice!.outAddresses; + ioniaPurchaseViewModel.sendViewModel.outputs.first.setCryptoAmount(amount); + ioniaPurchaseViewModel.sendViewModel.outputs.first.address = addresses.first; await showPopUp( context: context, builder: (_) { - return IoniaConfirmModal( + return ConfirmSendingAlert( alertTitle: S.of(context).confirm_sending, - alertContent: Container( - height: 200, - padding: EdgeInsets.all(15), - child: Column(children: [ - Row(children: [ - Text(S.of(context).payment_id, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: PaletteDark.pigeonBlue, - decoration: TextDecoration.none)), - Text(ioniaPurchaseViewModel.invoice!.paymentId, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: PaletteDark.pigeonBlue, - decoration: TextDecoration.none)) - ], mainAxisAlignment: MainAxisAlignment.spaceBetween), - SizedBox(height: 10), - Row(children: [ - Text(S.of(context).amount, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: PaletteDark.pigeonBlue, - decoration: TextDecoration.none)), - Text('$amount ${ioniaPurchaseViewModel.invoice!.chain}', - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: PaletteDark.pigeonBlue, - decoration: TextDecoration.none)) - ], mainAxisAlignment: MainAxisAlignment.spaceBetween), - SizedBox(height: 25), - Row(children: [ - Text(S.of(context).recipient_address, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w400, - color: PaletteDark.pigeonBlue, - decoration: TextDecoration.none)) - ], mainAxisAlignment: MainAxisAlignment.center), - Expanded( - child: ListView.builder( - itemBuilder: (_, int index) { - return Text(addresses[index], - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w400, - color: PaletteDark.pigeonBlue, - decoration: TextDecoration.none)); - }, - itemCount: addresses.length, - physics: NeverScrollableScrollPhysics())) - ])), + paymentId: S.of(context).payment_id, + paymentIdValue: ioniaPurchaseViewModel.invoice!.paymentId, + amount: S.of(context).send_amount, + amountValue: '$amount ${ioniaPurchaseViewModel.invoice!.chain}', + fiatAmountValue: + '~ ${ioniaPurchaseViewModel.sendViewModel.outputs.first.fiatAmount} ' + '${ioniaPurchaseViewModel.sendViewModel.fiat.title}', + fee: S.of(context).send_fee, + feeValue: + '${ioniaPurchaseViewModel.sendViewModel.outputs.first.estimatedFee} ' + '${ioniaPurchaseViewModel.invoice!.chain}', + feeFiatAmount: + '${ioniaPurchaseViewModel.sendViewModel.outputs.first.estimatedFeeFiatAmount} ' + '${ioniaPurchaseViewModel.sendViewModel.fiat.title}', + outputs: ioniaPurchaseViewModel.sendViewModel.outputs, rightButtonText: S.of(context).ok, leftButtonText: S.of(context).cancel, - leftActionColor: Color(0xffFF6600), - rightActionColor: Theme.of(context).accentTextTheme!.bodyText1!.color!, + alertLeftActionButtonTextColor: Colors.white, + alertRightActionButtonTextColor: Colors.white, + alertLeftActionButtonColor: Palette.brightOrange, + alertRightActionButtonColor: Theme.of(context).textTheme!.subtitle2!.color, actionRightButton: () async { Navigator.of(context).pop(); await ioniaPurchaseViewModel.commitPaymentInvoice(); diff --git a/lib/src/screens/ionia/widgets/confirm_modal.dart b/lib/src/screens/ionia/widgets/confirm_modal.dart deleted file mode 100644 index cfc9a1cf1..000000000 --- a/lib/src/screens/ionia/widgets/confirm_modal.dart +++ /dev/null @@ -1,149 +0,0 @@ -import 'dart:ui'; - -import 'package:cake_wallet/palette.dart'; -import 'package:flutter/material.dart'; - -class IoniaConfirmModal extends StatelessWidget { - IoniaConfirmModal({ - required this.alertTitle, - required this.alertContent, - required this.leftButtonText, - required this.rightButtonText, - required this.actionLeftButton, - required this.actionRightButton, - required this.leftActionColor, - required this.rightActionColor, - this.hideActions = false, - }); - - final String alertTitle; - final Widget alertContent; - final String leftButtonText; - final String rightButtonText; - final VoidCallback actionLeftButton; - final VoidCallback actionRightButton; - final Color leftActionColor; - final Color rightActionColor; - final bool hideActions; - - Widget actionButtons(BuildContext context) { - return Row( - mainAxisSize: MainAxisSize.max, - children: [ - IoniaActionButton( - buttonText: leftButtonText, - action: actionLeftButton, - backgoundColor: leftActionColor, - ), - Container( - width: 1, - height: 52, - color: Theme.of(context).dividerColor, - ), - IoniaActionButton( - buttonText: rightButtonText, - action: actionRightButton, - backgoundColor: rightActionColor, - ), - ], - ); - } - - Widget title(BuildContext context) { - return Text( - alertTitle, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20, - fontFamily: 'Lato', - fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme!.headline6!.color!, - decoration: TextDecoration.none, - ), - ); - } - - @override - Widget build(BuildContext context) { - return Container( - color: Colors.transparent, - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0), - child: Container( - decoration: BoxDecoration(color: PaletteDark.darkNightBlue.withOpacity(0.75)), - child: Center( - child: GestureDetector( - onTap: () => null, - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(30)), - child: Container( - width: 327, - color: Theme.of(context).accentTextTheme!.headline6!.decorationColor!, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: EdgeInsets.fromLTRB(24, 20, 24, 0), - child: title(context), - ), - Padding( - padding: EdgeInsets.only(top: 16, bottom: 8), - child: Container( - height: 1, - color: Theme.of(context).dividerColor, - ), - ), - alertContent, - actionButtons(context), - ], - ), - ), - ), - ), - ), - ), - ), - ); - } -} - -class IoniaActionButton extends StatelessWidget { - const IoniaActionButton({ - required this.buttonText, - required this.action, - required this.backgoundColor, - }); - - final String buttonText; - final VoidCallback action; - final Color backgoundColor; - - @override - Widget build(BuildContext context) { - return Flexible( - child: Container( - height: 52, - padding: EdgeInsets.only(left: 6, right: 6), - color: backgoundColor, - child: ButtonTheme( - minWidth: double.infinity, - child: TextButton( - onPressed: action, - // FIX-ME: ignored highlightColor and splashColor - //highlightColor: Colors.transparent, - //splashColor: Colors.transparent, - child: Text( - buttonText, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 15, - fontFamily: 'Lato', - fontWeight: FontWeight.w600, - color: backgoundColor != null ? Colors.white : Theme.of(context).primaryTextTheme!.bodyText2!.backgroundColor!, - decoration: TextDecoration.none, - ), - )), - ), - )); - } -} diff --git a/lib/src/screens/send/widgets/confirm_sending_alert.dart b/lib/src/screens/send/widgets/confirm_sending_alert.dart index 317303442..a034d801e 100644 --- a/lib/src/screens/send/widgets/confirm_sending_alert.dart +++ b/lib/src/screens/send/widgets/confirm_sending_alert.dart @@ -4,10 +4,13 @@ import 'package:flutter/material.dart'; import 'package:cake_wallet/src/widgets/base_alert_dialog.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/widgets/cake_scrollbar.dart'; +import 'package:flutter/scheduler.dart'; class ConfirmSendingAlert extends BaseAlertDialog { ConfirmSendingAlert({ required this.alertTitle, + this.paymentId, + this.paymentIdValue, required this.amount, required this.amountValue, required this.fiatAmountValue, @@ -19,9 +22,15 @@ class ConfirmSendingAlert extends BaseAlertDialog { required this.rightButtonText, required this.actionLeftButton, required this.actionRightButton, - this.alertBarrierDismissible = true}); + this.alertBarrierDismissible = true, + this.alertLeftActionButtonTextColor, + this.alertRightActionButtonTextColor, + this.alertLeftActionButtonColor, + this.alertRightActionButtonColor}); final String alertTitle; + final String? paymentId; + final String? paymentIdValue; final String amount; final String amountValue; final String fiatAmountValue; @@ -34,6 +43,10 @@ class ConfirmSendingAlert extends BaseAlertDialog { final VoidCallback actionLeftButton; final VoidCallback actionRightButton; final bool alertBarrierDismissible; + final Color? alertLeftActionButtonTextColor; + final Color? alertRightActionButtonTextColor; + final Color? alertLeftActionButtonColor; + final Color? alertRightActionButtonColor; @override String get titleText => alertTitle; @@ -56,8 +69,22 @@ class ConfirmSendingAlert extends BaseAlertDialog { @override bool get barrierDismissible => alertBarrierDismissible; + @override + Color? get leftActionButtonTextColor => alertLeftActionButtonTextColor; + + @override + Color? get rightActionButtonTextColor => alertRightActionButtonTextColor; + + @override + Color? get leftActionButtonColor => alertLeftActionButtonColor; + + @override + Color? get rightActionButtonColor => alertRightActionButtonColor; + @override Widget content(BuildContext context) => ConfirmSendingAlertContent( + paymentId: paymentId, + paymentIdValue: paymentIdValue, amount: amount, amountValue: amountValue, fiatAmountValue: fiatAmountValue, @@ -70,6 +97,8 @@ class ConfirmSendingAlert extends BaseAlertDialog { class ConfirmSendingAlertContent extends StatefulWidget { ConfirmSendingAlertContent({ + this.paymentId, + this.paymentIdValue, required this.amount, required this.amountValue, required this.fiatAmountValue, @@ -78,6 +107,8 @@ class ConfirmSendingAlertContent extends StatefulWidget { required this.feeFiatAmount, required this.outputs}); + final String? paymentId; + final String? paymentIdValue; final String amount; final String amountValue; final String fiatAmountValue; @@ -88,6 +119,8 @@ class ConfirmSendingAlertContent extends StatefulWidget { @override ConfirmSendingAlertContentState createState() => ConfirmSendingAlertContentState( + paymentId: paymentId, + paymentIdValue: paymentIdValue, amount: amount, amountValue: amountValue, fiatAmountValue: fiatAmountValue, @@ -100,6 +133,8 @@ class ConfirmSendingAlertContent extends StatefulWidget { class ConfirmSendingAlertContentState extends State { ConfirmSendingAlertContentState({ + this.paymentId, + this.paymentIdValue, required this.amount, required this.amountValue, required this.fiatAmountValue, @@ -115,6 +150,8 @@ class ConfirmSendingAlertContentState extends State : S.current.recipient_address; } + final String? paymentId; + final String? paymentIdValue; final String amount; final String amountValue; final String fiatAmountValue; @@ -129,6 +166,7 @@ class ConfirmSendingAlertContentState extends State double fromTop = 0; String recipientTitle; int itemCount; + bool showScrollbar = false; @override Widget build(BuildContext context) { @@ -140,6 +178,12 @@ class ConfirmSendingAlertContentState extends State setState(() {}); }); + SchedulerBinding.instance.addPostFrameCallback((_) { + setState(() { + showScrollbar = controller.position.maxScrollExtent > 0; + }); + }); + return Stack( alignment: Alignment.center, clipBehavior: Clip.none, @@ -150,6 +194,44 @@ class ConfirmSendingAlertContentState extends State controller: controller, child: Column( children: [ + if (paymentIdValue != null && paymentId != null) + Padding( + padding: EdgeInsets.only(bottom: 32), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + paymentId!, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.normal, + fontFamily: 'Lato', + color: Theme.of(context).primaryTextTheme! + .headline6!.color!, + decoration: TextDecoration.none, + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text( + paymentIdValue!, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + fontFamily: 'Lato', + color: Theme.of(context).primaryTextTheme! + .headline6!.color!, + decoration: TextDecoration.none, + ), + ), + ], + ) + ], + ), + ), Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -365,7 +447,7 @@ class ConfirmSendingAlertContentState extends State ) ) ), - if (itemCount > 1) CakeScrollbar( + if (showScrollbar) CakeScrollbar( backgroundHeight: backgroundHeight, thumbHeight: thumbHeight, fromTop: fromTop, diff --git a/lib/src/widgets/base_alert_dialog.dart b/lib/src/widgets/base_alert_dialog.dart index 7713284f2..70370e227 100644 --- a/lib/src/widgets/base_alert_dialog.dart +++ b/lib/src/widgets/base_alert_dialog.dart @@ -11,6 +11,10 @@ class BaseAlertDialog extends StatelessWidget { VoidCallback get actionLeft => () {}; VoidCallback get actionRight => () {}; bool get barrierDismissible => true; + Color? get leftActionButtonTextColor => null; + Color? get rightActionButtonTextColor => null; + Color? get leftActionButtonColor => null; + Color? get rightActionButtonColor => null; Widget title(BuildContext context) { return Text( @@ -45,52 +49,64 @@ class BaseAlertDialog extends StatelessWidget { height: 52, child: Row( mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Flexible( - child: Container( - width: double.infinity, - color: Theme.of(context).accentTextTheme!.bodyText1!.decorationColor!, - child: TextButton( - onPressed: actionLeft, - child: Text( - leftActionButtonText, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 15, - fontFamily: 'Lato', - fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme!.bodyText1!.backgroundColor!, - decoration: TextDecoration.none, - ), - )), - ), - ), + Expanded( + child: TextButton( + onPressed: actionLeft, + style: TextButton.styleFrom( + backgroundColor: leftActionButtonColor ?? + Theme.of(context) + .accentTextTheme! + .bodyText1! + .decorationColor!, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.zero))), + child: Text( + leftActionButtonText, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 15, + fontFamily: 'Lato', + fontWeight: FontWeight.w600, + color: leftActionButtonTextColor ?? + Theme.of(context).primaryTextTheme! + .bodyText1!.backgroundColor!, + decoration: TextDecoration.none, + ), + )), + ), Container( width: 1, color: Theme.of(context).dividerColor, ), - Flexible( - child: Container( - width: double.infinity, - color: Theme.of(context).accentTextTheme!.bodyText2!.backgroundColor!, - child: TextButton( - onPressed: actionRight, - child: Text( - rightActionButtonText, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 15, - fontFamily: 'Lato', - fontWeight: FontWeight.w600, - color: Theme.of(context).primaryTextTheme!.bodyText2!.backgroundColor!, - decoration: TextDecoration.none, - ), - )), - ), - ), - ], - )); + Expanded( + child: TextButton( + onPressed: actionRight, + style: TextButton.styleFrom( + backgroundColor: rightActionButtonColor ?? + Theme.of(context).accentTextTheme! + .bodyText2!.backgroundColor!, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.zero))), + child: Text( + rightActionButtonText, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 15, + fontFamily: 'Lato', + fontWeight: FontWeight.w600, + color: rightActionButtonTextColor ?? + Theme.of(context) + .primaryTextTheme! + .bodyText2! + .backgroundColor!, + decoration: TextDecoration.none, + ), + )), + ), + ], + )); } @override diff --git a/lib/view_model/ionia/ionia_purchase_merch_view_model.dart b/lib/view_model/ionia/ionia_purchase_merch_view_model.dart index da71f31fa..df6a23718 100644 --- a/lib/view_model/ionia/ionia_purchase_merch_view_model.dart +++ b/lib/view_model/ionia/ionia_purchase_merch_view_model.dart @@ -7,6 +7,7 @@ import 'package:cake_wallet/ionia/ionia_anypay.dart'; import 'package:cake_wallet/ionia/ionia_merchant.dart'; import 'package:cake_wallet/ionia/ionia_tip.dart'; import 'package:cake_wallet/ionia/ionia_any_pay_payment_info.dart'; +import 'package:cake_wallet/view_model/send/send_view_model.dart'; part 'ionia_purchase_merch_view_model.g.dart'; @@ -17,6 +18,7 @@ abstract class IoniaMerchPurchaseViewModelBase with Store { required this.ioniaAnyPayService, required this.amount, required this.ioniaMerchant, + required this.sendViewModel, }) : tipAmount = 0.0, percentage = 0.0, invoiceCreationState = InitialExecutionState(), @@ -40,6 +42,8 @@ abstract class IoniaMerchPurchaseViewModelBase with Store { final IoniaMerchant ioniaMerchant; + final SendViewModel sendViewModel; + final IoniaAnyPay ioniaAnyPayService; IoniaAnyPayPaymentInfo? paymentInfo; From 1efced7607dea0679971ec95877cfdd7847121a4 Mon Sep 17 00:00:00 2001 From: M Date: Thu, 10 Nov 2022 13:11:10 -0500 Subject: [PATCH 14/22] Update build version for cake wallet to 132; monero.com 28 --- scripts/android/app_env.sh | 4 ++-- scripts/ios/app_env.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index b9ca9f98b..54ad0b4d4 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,13 +15,13 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=26 +MONERO_COM_BUILD_NUMBER=28 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=130 +CAKEWALLET_BUILD_NUMBER=132 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 bab932345..c7ecaa60b 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -14,12 +14,12 @@ APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=26 +MONERO_COM_BUILD_NUMBER=28 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=130 +CAKEWALLET_BUILD_NUMBER=132 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From ab305e22a23c9f2930a538a1110ca1c9eb3ee24a Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Wed, 16 Nov 2022 18:30:35 -0500 Subject: [PATCH 15/22] Remove duplication for qr codes. (#628) --- lib/src/screens/receive/widgets/qr_painter.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/src/screens/receive/widgets/qr_painter.dart b/lib/src/screens/receive/widgets/qr_painter.dart index 90dba73ac..e4af59f1a 100644 --- a/lib/src/screens/receive/widgets/qr_painter.dart +++ b/lib/src/screens/receive/widgets/qr_painter.dart @@ -9,7 +9,6 @@ class QrPainter extends CustomPainter { this.errorCorrectionLevel, ) : this._qr = QrCode(version, errorCorrectionLevel)..addData(data) { _p.color = this.color; - _qr.addData(data); _qrImage = QrImage(_qr); } From 35007fcf3ecc3dbac44ae8b2e9e3bb904bef653e Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Wed, 16 Nov 2022 18:33:12 -0500 Subject: [PATCH 16/22] Update version to 4.5.1 for cakewallet; 1.2.1 for monero.com. (#629) --- scripts/android/app_env.sh | 8 ++++---- scripts/ios/app_env.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 54ad0b4d4..e57d3a97c 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -14,14 +14,14 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=28 +MONERO_COM_VERSION="1.2.1" +MONERO_COM_BUILD_NUMBER=29 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=132 +CAKEWALLET_VERSION="4.5.1" +CAKEWALLET_BUILD_NUMBER=133 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 c7ecaa60b..8bb945680 100644 --- a/scripts/ios/app_env.sh +++ b/scripts/ios/app_env.sh @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN) APP_IOS_TYPE=$1 MONERO_COM_NAME="Monero.com" -MONERO_COM_VERSION="1.2.0" -MONERO_COM_BUILD_NUMBER=28 +MONERO_COM_VERSION="1.2.1" +MONERO_COM_BUILD_NUMBER=29 MONERO_COM_BUNDLE_ID="com.cakewallet.monero" CAKEWALLET_NAME="Cake Wallet" -CAKEWALLET_VERSION="4.5.0" -CAKEWALLET_BUILD_NUMBER=132 +CAKEWALLET_VERSION="4.5.1" +CAKEWALLET_BUILD_NUMBER=133 CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet" HAVEN_NAME="Haven" From 3dbdb8fceaa77c33dbc0ff58484c411ee5ee4a77 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Wed, 16 Nov 2022 20:15:30 -0500 Subject: [PATCH 17/22] Update targetSdkVersion to 31. (#630) --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 74cd0f8f7..00cef6393 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -46,7 +46,7 @@ android { defaultConfig { applicationId appProperties['id'] minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" From 91941e7c80fc01141b7215afe3f918ed92cfdaf4 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Wed, 16 Nov 2022 20:19:23 -0500 Subject: [PATCH 18/22] Update build number for android cakewallet to 134; monero.com to 30. (#631) --- scripts/android/app_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index e57d3a97c..1cb3084cf 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,13 +15,13 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.1" -MONERO_COM_BUILD_NUMBER=29 +MONERO_COM_BUILD_NUMBER=30 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.1" -CAKEWALLET_BUILD_NUMBER=133 +CAKEWALLET_BUILD_NUMBER=134 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" From 841b69aef743b8d984ff81de817735072104de31 Mon Sep 17 00:00:00 2001 From: mkyq <53115730+mkyq@users.noreply.github.com> Date: Wed, 16 Nov 2022 21:55:26 -0500 Subject: [PATCH 19/22] Android exported (#632) * Add android:exported="true" to android activity. * Update build version for android for cakewallet to 135; monero.com 31. --- android/app/src/main/AndroidManifestBase.xml | 3 ++- scripts/android/app_env.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml index f43b0369b..22278d5f1 100644 --- a/android/app/src/main/AndroidManifestBase.xml +++ b/android/app/src/main/AndroidManifestBase.xml @@ -21,7 +21,8 @@ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" - android:screenOrientation="portrait"> + android:screenOrientation="portrait" + android:exported="true"> Date: Wed, 16 Nov 2022 22:00:59 -0500 Subject: [PATCH 20/22] Update android build version for cakewallet to 136; monero.com 32. (#633) --- scripts/android/app_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/android/app_env.sh b/scripts/android/app_env.sh index 51e9fcdec..d361c8dfa 100644 --- a/scripts/android/app_env.sh +++ b/scripts/android/app_env.sh @@ -15,13 +15,13 @@ APP_ANDROID_TYPE=$1 MONERO_COM_NAME="Monero.com" MONERO_COM_VERSION="1.2.1" -MONERO_COM_BUILD_NUMBER=31 +MONERO_COM_BUILD_NUMBER=32 MONERO_COM_BUNDLE_ID="com.monero.app" MONERO_COM_PACKAGE="com.monero.app" CAKEWALLET_NAME="Cake Wallet" CAKEWALLET_VERSION="4.5.1" -CAKEWALLET_BUILD_NUMBER=135 +CAKEWALLET_BUILD_NUMBER=136 CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet" CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet" From bcf09b048c635206e978ea1628ecb23201228c99 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 22 Nov 2022 03:52:03 +0200 Subject: [PATCH 21/22] Cw 220 fix grey exchange screen (#641) * Fix nullability issue for ChangeNow rateId * Handle concurrent modification error from Splay Tree --- .../exchange/exchange_view_model.dart | 158 +++++++++--------- 1 file changed, 83 insertions(+), 75 deletions(-) diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index e7e73855b..725208324 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -7,7 +7,6 @@ import 'package:cake_wallet/exchange/sideshift/sideshift_exchange_provider.dart' import 'package:cake_wallet/exchange/sideshift/sideshift_request.dart'; import 'package:cake_wallet/exchange/simpleswap/simpleswap_exchange_provider.dart'; import 'package:cake_wallet/view_model/settings/settings_view_model.dart'; -import 'package:cw_core/transaction_priority.dart'; import 'package:cake_wallet/exchange/simpleswap/simpleswap_request.dart'; import 'package:cw_core/wallet_base.dart'; import 'package:cw_core/crypto_currency.dart'; @@ -375,96 +374,105 @@ abstract class ExchangeViewModelBase with Store { TradeRequest? request; String amount = ''; - for (var provider in _sortedAvailableProviders.values) { - if (!(await provider.checkIsAvailable())) { - continue; - } + try { + for (var provider in _sortedAvailableProviders.values) { + if (!(await provider.checkIsAvailable())) { + continue; + } - if (provider is SideShiftExchangeProvider) { - request = SideShiftRequest( - depositMethod: depositCurrency, - settleMethod: receiveCurrency, - depositAmount: depositAmount.replaceAll(',', '.'), - settleAddress: receiveAddress, - refundAddress: depositAddress, - ); - amount = depositAmount; - } + if (provider is SideShiftExchangeProvider) { + request = SideShiftRequest( + depositMethod: depositCurrency, + settleMethod: receiveCurrency, + depositAmount: depositAmount.replaceAll(',', '.'), + settleAddress: receiveAddress, + refundAddress: depositAddress, + ); + amount = depositAmount; + } - if (provider is SimpleSwapExchangeProvider) { - request = SimpleSwapRequest( - from: depositCurrency, - to: receiveCurrency, - amount: depositAmount.replaceAll(',', '.'), - address: receiveAddress, - refundAddress: depositAddress, - ); - amount = depositAmount; - } - - if (provider is XMRTOExchangeProvider) { - request = XMRTOTradeRequest( + if (provider is SimpleSwapExchangeProvider) { + request = SimpleSwapRequest( from: depositCurrency, to: receiveCurrency, amount: depositAmount.replaceAll(',', '.'), - receiveAmount: receiveAmount.replaceAll(',', '.'), address: receiveAddress, refundAddress: depositAddress, - isBTCRequest: isReceiveAmountEntered); - amount = depositAmount; - } + ); + amount = depositAmount; + } - if (provider is ChangeNowExchangeProvider) { - request = ChangeNowRequest( - from: depositCurrency, - to: receiveCurrency, - fromAmount: depositAmount.replaceAll(',', '.'), - toAmount: receiveAmount.replaceAll(',', '.'), - refundAddress: depositAddress, - address: receiveAddress, - isReverse: isReverse); - amount = isReverse ? receiveAmount : depositAmount; - } + if (provider is XMRTOExchangeProvider) { + request = XMRTOTradeRequest( + from: depositCurrency, + to: receiveCurrency, + amount: depositAmount.replaceAll(',', '.'), + receiveAmount: receiveAmount.replaceAll(',', '.'), + address: receiveAddress, + refundAddress: depositAddress, + isBTCRequest: isReceiveAmountEntered); + amount = depositAmount; + } - if (provider is MorphTokenExchangeProvider) { - request = MorphTokenRequest( - from: depositCurrency, - to: receiveCurrency, - amount: depositAmount.replaceAll(',', '.'), - refundAddress: depositAddress, - address: receiveAddress); - amount = depositAmount; - } + if (provider is ChangeNowExchangeProvider) { + request = ChangeNowRequest( + from: depositCurrency, + to: receiveCurrency, + fromAmount: depositAmount.replaceAll(',', '.'), + toAmount: receiveAmount.replaceAll(',', '.'), + refundAddress: depositAddress, + address: receiveAddress, + isReverse: isReverse); + amount = isReverse ? receiveAmount : depositAmount; + } - amount = amount.replaceAll(',', '.'); + if (provider is MorphTokenExchangeProvider) { + request = MorphTokenRequest( + from: depositCurrency, + to: receiveCurrency, + amount: depositAmount.replaceAll(',', '.'), + refundAddress: depositAddress, + address: receiveAddress); + amount = depositAmount; + } - if (limitsState is LimitsLoadedSuccessfully) { - if (double.parse(amount) < limits.min!) { - continue; - } else if (limits.max != null && double.parse(amount) > limits.max!) { - continue; - } else { - try { - tradeState = TradeIsCreating(); - final trade = await provider.createTrade( - request: request!, isFixedRateMode: isFixedRateMode); - trade.walletId = wallet.id; - tradesStore.setTrade(trade); - await trades.add(trade); - tradeState = TradeIsCreatedSuccessfully(trade: trade); - /// return after the first successful trade - return; - } catch (e) { + amount = amount.replaceAll(',', '.'); + + if (limitsState is LimitsLoadedSuccessfully) { + if (double.parse(amount) < limits.min!) { continue; + } else if (limits.max != null && double.parse(amount) > limits.max!) { + continue; + } else { + try { + tradeState = TradeIsCreating(); + final trade = await provider.createTrade( + request: request!, isFixedRateMode: isFixedRateMode); + trade.walletId = wallet.id; + tradesStore.setTrade(trade); + await trades.add(trade); + tradeState = TradeIsCreatedSuccessfully(trade: trade); + /// return after the first successful trade + return; + } catch (e) { + continue; + } } } } - } - /// if the code reached here then none of the providers succeeded - tradeState = TradeIsCreatedFailure( - title: S.current.trade_not_created, - error: S.current.none_of_selected_providers_can_exchange); + /// if the code reached here then none of the providers succeeded + tradeState = TradeIsCreatedFailure( + title: S.current.trade_not_created, + error: S.current.none_of_selected_providers_can_exchange); + } on ConcurrentModificationError { + /// if create trade happened at the exact same time of the scheduled rate update + /// then delay the create trade a bit and try again + /// + /// this is because the limitation of the SplayTreeMap that + /// you can't modify it while iterating through it + Future.delayed(Duration(milliseconds: 500), createTrade); + } } @action From 9b32c9c95666093841621b4753b0de40e8a19f37 Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Tue, 22 Nov 2022 04:18:18 +0200 Subject: [PATCH 22/22] CW-227 Add Disable Exchange option to settings (#642) * Add Disable Exchange option to settings --- lib/entities/preferences_key.dart | 1 + lib/src/screens/dashboard/dashboard_page.dart | 4 +++- lib/store/settings_store.dart | 8 ++++++++ lib/view_model/dashboard/dashboard_view_model.dart | 6 ++---- lib/view_model/settings/settings_view_model.dart | 6 ++++++ res/values/strings_de.arb | 3 ++- res/values/strings_en.arb | 3 ++- res/values/strings_es.arb | 3 ++- res/values/strings_fr.arb | 3 ++- res/values/strings_hi.arb | 3 ++- res/values/strings_hr.arb | 3 ++- res/values/strings_it.arb | 3 ++- res/values/strings_ja.arb | 3 ++- res/values/strings_ko.arb | 3 ++- res/values/strings_nl.arb | 3 ++- res/values/strings_pl.arb | 3 ++- res/values/strings_pt.arb | 3 ++- res/values/strings_ru.arb | 3 ++- res/values/strings_uk.arb | 3 ++- res/values/strings_zh.arb | 3 ++- 20 files changed, 50 insertions(+), 20 deletions(-) diff --git a/lib/entities/preferences_key.dart b/lib/entities/preferences_key.dart index 6cf7e5608..a28410192 100644 --- a/lib/entities/preferences_key.dart +++ b/lib/entities/preferences_key.dart @@ -11,6 +11,7 @@ class PreferencesKey { static const shouldSaveRecipientAddressKey = 'save_recipient_address'; static const allowBiometricalAuthenticationKey = 'allow_biometrical_authentication'; + static const disableExchangeKey = 'disable_exchange'; static const currentTheme = 'current_theme'; static const isDarkThemeLegacy = 'dark_theme'; static const displayActionListModeKey = 'display_list_mode'; diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index f3d5a21fb..fe8414134 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -315,6 +315,8 @@ class DashboardPage extends BasePage { } Future _onClickExchangeButton(BuildContext context) async { - await Navigator.of(context).pushNamed(Routes.exchange); + if (walletViewModel.isEnabledExchangeAction) { + await Navigator.of(context).pushNamed(Routes.exchange); + } } } diff --git a/lib/store/settings_store.dart b/lib/store/settings_store.dart index 2b3105a34..534ea67e9 100644 --- a/lib/store/settings_store.dart +++ b/lib/store/settings_store.dart @@ -30,6 +30,7 @@ abstract class SettingsStoreBase with Store { required BalanceDisplayMode initialBalanceDisplayMode, required bool initialSaveRecipientAddress, required bool initialAllowBiometricalAuthentication, + required bool initialExchangeEnabled, required ThemeBase initialTheme, required int initialPinLength, required String initialLanguageCode, @@ -47,6 +48,7 @@ abstract class SettingsStoreBase with Store { balanceDisplayMode = initialBalanceDisplayMode, shouldSaveRecipientAddress = initialSaveRecipientAddress, allowBiometricalAuthentication = initialAllowBiometricalAuthentication, + disableExchange = initialExchangeEnabled, currentTheme = initialTheme, pinCodeLength = initialPinLength, languageCode = initialLanguageCode, @@ -143,6 +145,9 @@ abstract class SettingsStoreBase with Store { @observable bool allowBiometricalAuthentication; + @observable + bool disableExchange; + @observable ThemeBase currentTheme; @@ -221,6 +226,8 @@ abstract class SettingsStoreBase with Store { final allowBiometricalAuthentication = sharedPreferences .getBool(PreferencesKey.allowBiometricalAuthenticationKey) ?? false; + final disableExchange = sharedPreferences + .getBool(PreferencesKey.disableExchangeKey) ?? false; final legacyTheme = (sharedPreferences.getBool(PreferencesKey.isDarkThemeLegacy) ?? false) ? ThemeType.dark.index @@ -284,6 +291,7 @@ abstract class SettingsStoreBase with Store { initialBalanceDisplayMode: currentBalanceDisplayMode, initialSaveRecipientAddress: shouldSaveRecipientAddress, initialAllowBiometricalAuthentication: allowBiometricalAuthentication, + initialExchangeEnabled: disableExchange, initialTheme: savedTheme, actionlistDisplayMode: actionListDisplayMode, initialPinLength: pinLength, diff --git a/lib/view_model/dashboard/dashboard_view_model.dart b/lib/view_model/dashboard/dashboard_view_model.dart index 49dd2437a..7f11b0c2f 100644 --- a/lib/view_model/dashboard/dashboard_view_model.dart +++ b/lib/view_model/dashboard/dashboard_view_model.dart @@ -53,7 +53,6 @@ abstract class DashboardViewModelBase with Store { hasBuyAction = false, isEnabledBuyAction = false, hasExchangeAction = false, - isEnabledExchangeAction = false, isShowFirstYatIntroduction = false, isShowSecondYatIntroduction = false, isShowThirdYatIntroduction = false, @@ -249,8 +248,8 @@ abstract class DashboardViewModelBase with Store { void furtherShowYatPopup(bool shouldShow) => settingsStore.shouldShowYatPopup = shouldShow; - @observable - bool isEnabledExchangeAction; + @computed + bool get isEnabledExchangeAction => !settingsStore.disableExchange; @observable bool hasExchangeAction; @@ -365,7 +364,6 @@ abstract class DashboardViewModelBase with Store { } void updateActions() { - isEnabledExchangeAction = true; hasExchangeAction = !isHaven; isEnabledBuyAction = wallet.type != WalletType.haven && wallet.type != WalletType.monero; diff --git a/lib/view_model/settings/settings_view_model.dart b/lib/view_model/settings/settings_view_model.dart index aabe51ef1..f85d2c459 100644 --- a/lib/view_model/settings/settings_view_model.dart +++ b/lib/view_model/settings/settings_view_model.dart @@ -208,6 +208,12 @@ abstract class SettingsViewModelBase with Store { setAllowBiometricalAuthentication(value); } }), + SwitcherListItem( + title: S.current.disable_exchange, + value: () => _settingsStore.disableExchange, + onValueChange: (BuildContext context, bool value) { + _settingsStore.disableExchange = value; + }), ChoicesListItem( title: S.current.color_theme, items: ThemeList.all, diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 685d817d5..f5170b84e 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -651,5 +651,6 @@ "ignor": "Ignorieren", "use_suggested": "Vorgeschlagen verwenden", "do_not_share_warning_text" : "Teilen Sie diese nicht mit anderen, einschließlich des Supports.\n\nSie werden Ihr Geld stehlen!", - "help": "hilfe" + "help": "hilfe", + "disable_exchange": "Exchange deaktivieren" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 877d09231..b62dbd984 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -651,5 +651,6 @@ "ignor": "Ignore", "use_suggested": "Use Suggested", "do_not_share_warning_text" : "Do not share these with anyone else, including support.\n\nThey will steal your money!", - "help": "help" + "help": "help", + "disable_exchange": "Disable exchange" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 505f3ffa8..beff1af8d 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -651,5 +651,6 @@ "ignor": "Pasar por alto", "use_suggested": "Usar sugerido", "do_not_share_warning_text" : "No comparta estos con nadie más, incluido el soporte.\n\n¡Te robarán tu dinero!", - "help": "ayuda" + "help": "ayuda", + "disable_exchange": "Deshabilitar intercambio" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 941016c0b..fa1d01e22 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -649,5 +649,6 @@ "ignor": "Ignorer", "use_suggested": "Utilisation suggérée", "do_not_share_warning_text" : "Ne les partagez avec personne d'autre, y compris avec l'assistance.\n\nIls vont voler votre argent!", - "help": "aider" + "help": "aider", + "disable_exchange": "Désactiver l'échange" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 7faa06f7f..c7b6ece40 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -651,5 +651,6 @@ "ignor": "नज़रअंदाज़ करना", "use_suggested": "सुझाए गए का प्रयोग करें", "do_not_share_warning_text" : "इन्हें समर्थन सहित किसी और के साथ साझा न करें।\n\nवे आपका पैसा चुरा लेंगे!", - "help": "मदद करना" + "help": "मदद करना", + "disable_exchange": "एक्सचेंज अक्षम करें" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 4fa77948a..532a4d63a 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -651,5 +651,6 @@ "ignor": "Zanemariti", "use_suggested": "Koristite predloženo", "do_not_share_warning_text" : "Nemojte ih dijeliti ni s kim, uključujući podršku.\n\nUkrast će vam novac!", - "help": "pomozite" + "help": "pomozite", + "disable_exchange": "Onemogući exchange" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 9a42a588b..cb5209fc3 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -651,5 +651,6 @@ "ignor": "Ignorare", "use_suggested": "Usa suggerito", "do_not_share_warning_text" : "Non condividerli con nessun altro, incluso il supporto.\n\nTi ruberanno i soldi!", - "help": "aiuto" + "help": "aiuto", + "disable_exchange": "Disabilita scambio" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index c1d0de4e3..2d1c291ce 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -651,5 +651,6 @@ "ignor": "無視", "use_suggested": "推奨を使用", "do_not_share_warning_text" : "サポートを含め、これらを他の誰とも共有しないでください。\n\n彼らはあなたのお金を盗みます!", - "help": "ヘルプ" + "help": "ヘルプ", + "disable_exchange": "交換を無効にする" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 127aa949e..f24e736cb 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -651,5 +651,6 @@ "ignor": "무시하다", "use_suggested": "추천 사용", "do_not_share_warning_text" : "지원을 포함하여 다른 사람과 이러한 정보를 공유하지 마십시오.\n\n그들은 당신의 돈을 훔칠 것입니다!", - "help": "돕다" + "help": "돕다", + "disable_exchange": "교환 비활성화" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index fa748b552..5663b0357 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -651,5 +651,6 @@ "ignor": "Negeren", "use_suggested": "Gebruik aanbevolen", "do_not_share_warning_text" : "Deel deze met niemand anders, ook niet met support.\n\nZe zullen je geld stelen!", - "help": "helpen" + "help": "helpen", + "disable_exchange": "Uitwisseling uitschakelen" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 454fe9717..f2a414ae2 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -651,5 +651,6 @@ "ignor": "Ignorować", "use_suggested": "Użyj sugerowane", "do_not_share_warning_text" : "Nie udostępniaj ich nikomu innemu, w tym wsparcia.\n\nUkradną twoje pieniądze!", - "help": "pomoc" + "help": "pomoc", + "disable_exchange": "Wyłącz wymianę" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 04a0a3ff2..25318dc2d 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -651,5 +651,6 @@ "ignor": "Ignorar", "use_suggested": "Uso sugerido", "do_not_share_warning_text" : "Não os compartilhe com mais ninguém, incluindo suporte.\n\nEles vão roubar seu dinheiro!", - "help": "ajuda" + "help": "ajuda", + "disable_exchange": "Desativar troca" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 632b0990c..a907e5765 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -651,5 +651,6 @@ "ignor": "Игнорировать", "use_suggested": "Использовать предложенный", "do_not_share_warning_text" : "Не делитесь ими с кем-либо еще, в том числе со службой поддержки.\n\nОни украдут ваши деньги!", - "help": "помощь" + "help": "помощь", + "disable_exchange": "Отключить обмен" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 5e0f0d18a..91042e91b 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -650,5 +650,6 @@ "ignor": "Ігнорувати", "use_suggested": "Використати запропоноване", "do_not_share_warning_text" : "Не повідомляйте їх нікому, включно зі службою підтримки.\n\nВони вкрадуть ваші гроші!", - "help": "допомога" + "help": "допомога", + "disable_exchange": "Вимкнути exchange" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index c46d07d59..958e80d14 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -649,5 +649,6 @@ "ignor": "忽视", "use_suggested": "使用建议", "do_not_share_warning_text" : "不要與其他任何人分享這些內容,包括支持。\n\n他們會偷你的錢!", - "help": "帮助" + "help": "帮助", + "disable_exchange": "禁用交换" }