From 7f37bd3d590a92b59a881f859223f471287e225c Mon Sep 17 00:00:00 2001 From: Serhii Date: Sat, 14 Jan 2023 23:29:47 +0200 Subject: [PATCH 1/4] update localization files --- lib/view_model/exchange/exchange_trade_view_model.dart | 2 +- res/values/strings_ar.arb | 4 +++- res/values/strings_de.arb | 4 +++- res/values/strings_en.arb | 4 +++- res/values/strings_es.arb | 4 +++- res/values/strings_fr.arb | 6 ++++-- res/values/strings_hi.arb | 6 ++++-- res/values/strings_hr.arb | 4 +++- res/values/strings_it.arb | 4 +++- res/values/strings_ja.arb | 4 +++- res/values/strings_ko.arb | 4 +++- res/values/strings_nl.arb | 4 +++- res/values/strings_pl.arb | 6 ++++-- res/values/strings_pt.arb | 4 +++- res/values/strings_ru.arb | 4 +++- res/values/strings_th.arb | 4 +++- res/values/strings_uk.arb | 4 +++- res/values/strings_zh.arb | 4 +++- 18 files changed, 55 insertions(+), 21 deletions(-) diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 10ddf25e4..275de2808 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -143,7 +143,7 @@ abstract class ExchangeTradeViewModelBase with Store { ExchangeTradeItem( title: S.current.status, data: '${trade.state}', isCopied: false), ExchangeTradeItem( - title: S.current.widgets_address + ':', + title: S.current.send_to_this_address('${trade.from} ${trade.from.tag ?? ''}') + ':', data: trade.inputAddress ?? '', isCopied: true), ]); diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 250f29a70..7d7994b1e 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -678,5 +678,7 @@ "enabled":"ممكنة", "tor_only":"Tor فقط", "unmatched_currencies": "عملة محفظتك الحالية لا تتطابق مع عملة QR الممسوحة ضوئيًا", - "orbot_running_alert": "يرجى التأكد من تشغيل Orbot قبل الاتصال بهذه العقدة." + "orbot_running_alert": "يرجى التأكد من تشغيل Orbot قبل الاتصال بهذه العقدة.", + "send_to_this_address" : "أرسل ${currency} إلى هذا العنوان", + "arrive_in_this_address" : "سيصل ${currency} إلى هذا العنوان" } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 2e71e8ce9..dbcf03ae2 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "Die Währung Ihres aktuellen Wallets stimmt nicht mit der des gescannten QR überein", "orbot_running_alert": "Bitte stellen Sie sicher, dass Orbot läuft, bevor Sie sich mit diesem Knoten verbinden.", "contact_list_contacts": "Kontakte", - "contact_list_wallets": "Meine Geldbörsen" + "contact_list_wallets": "Meine Geldbörsen", + "send_to_this_address" : "Senden Sie ${currency} an diese Adresse", + "arrive_in_this_address" : "${currency} wird an dieser Adresse ankommen" } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index a2b1cc702..602fbcde1 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "Your current wallet's currency does not match that of the scanned QR", "orbot_running_alert": "Please make sure Orbot is running prior to connecting to this node.", "contact_list_contacts": "Contacts", - "contact_list_wallets": "My Wallets" + "contact_list_wallets": "My Wallets", + "send_to_this_address" : "Send ${currency} to this address", + "arrive_in_this_address" : "${currency} will arrive in this address" } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 6cbfa627a..4fdc450e0 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "La moneda de su billetera actual no coincide con la del QR escaneado", "orbot_running_alert": "Asegúrese de que Orbot se esté ejecutando antes de conectarse a este nodo.", "contact_list_contacts": "Contactos", - "contact_list_wallets": "Mis billeteras" + "contact_list_wallets": "Mis billeteras", + "send_to_this_address" : "Enviar ${currency} a esta dirección", + "arrive_in_this_address" : "${currency} llegará a esta dirección" } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 61bec11bf..34baa88d9 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -675,8 +675,10 @@ "disabled": "Désactivé", "enabled": "Activé", "tor_only": "Tor uniquement", - "orbot_running_alert": "Veuillez vous assurer qu'Orbot est en cours d'exécution avant de vous connecter à ce nœud.", "unmatched_currencies": "La devise de votre portefeuille (wallet) actuel ne correspond pas à celle du QR code scanné", + "orbot_running_alert": "Veuillez vous assurer qu'Orbot est en cours d'exécution avant de vous connecter à ce nœud.", "contact_list_contacts": "Contacts", - "contact_list_wallets": "Mes portefeuilles (wallets)" + "contact_list_wallets": "Mes portefeuilles (wallets)", + "send_to_this_address" : "Envoyez ${currency} à cette adresse", + "arrive_in_this_address" : "${currency} arrivera à cette adresse" } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index e906b3cc4..9bf6cfca2 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -677,8 +677,10 @@ "disabled": "अक्षम", "enabled": "सक्रिय", "tor_only": "Tor केवल", - "orbot_running_alert": "कृपया सुनिश्चित करें कि इस नोड से कनेक्ट करने से पहले Orbot चल रहा है।", "unmatched_currencies": "आपके वर्तमान वॉलेट की मुद्रा स्कैन किए गए क्यूआर से मेल नहीं खाती" , + "orbot_running_alert": "कृपया सुनिश्चित करें कि इस नोड से कनेक्ट करने से पहले Orbot चल रहा है।", "contact_list_contacts": "संपर्क", - "contact_list_wallets": "मेरा बटुआ" + "contact_list_wallets": "मेरा बटुआ", + "send_to_this_address" : "इस पते पर ${currency} भेजें", + "arrive_in_this_address" : "${currency} इस पते पर पहुंचेंगे" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index b44d2d6c3..27f4b3892 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "Valuta vašeg trenutnog novčanika ne odgovara onoj na skeniranom QR-u", "orbot_running_alert": "Provjerite radi li Orbot prije spajanja na ovaj čvor.", "contact_list_contacts": "Kontakti", - "contact_list_wallets": "Moji novčanici" + "contact_list_wallets": "Moji novčanici", + "send_to_this_address" : "Pošaljite ${currency} na ovu adresu", + "arrive_in_this_address" : "${currency} će stići na ovu adresu" } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 6885fefa8..47d26aa9e 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "La valuta del tuo portafoglio attuale non corrisponde a quella del QR scansionato", "orbot_running_alert": "Assicurati che Orbot sia in esecuzione prima di connetterti a questo nodo.", "contact_list_contacts": "Contatti", - "contact_list_wallets": "I miei portafogli" + "contact_list_wallets": "I miei portafogli", + "send_to_this_address" : "Invia ${currency} a questo indirizzo", + "arrive_in_this_address" : "${currency} arriverà a questo indirizzo" } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index f02b76598..6c6ac91e3 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "現在のウォレットの通貨がスキャンされたQRの通貨と一致しません", "orbot_running_alert": "このノードに接続する前に、Orbot が実行されていることを確認してください", "contact_list_contacts": "連絡先", - "contact_list_wallets": "マイウォレット" + "contact_list_wallets": "マイウォレット", + "send_to_this_address" : "${currency} をこのアドレスに送金", + "arrive_in_this_address" : "${currency} はこの住所に到着します" } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index b7678fa85..e458aed0d 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "현재 지갑의 통화가 스캔한 QR의 통화와 일치하지 않습니다.", "orbot_running_alert": "이 노드에 연결하기 전에 Orbot이 실행 중인지 확인하십시오.", "contact_list_contacts": "콘택트 렌즈", - "contact_list_wallets": "내 지갑" + "contact_list_wallets": "내 지갑", + "send_to_this_address" : "이 주소로 ${currency} 송금", + "arrive_in_this_address" : "${currency}이(가) 이 주소로 도착합니다" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 802c0e9ac..b8edbc0c1 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "De valuta van uw huidige portemonnee komt niet overeen met die van de gescande QR", "orbot_running_alert": "Zorg ervoor dat Orbot actief is voordat u verbinding maakt met dit knooppunt.", "contact_list_contacts": "Contacten", - "contact_list_wallets": "Mijn portefeuilles" + "contact_list_wallets": "Mijn portefeuilles", + "send_to_this_address" : "Stuur ${currency} naar dit adres", + "arrive_in_this_address" : "${currency} komt aan op dit adres" } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index 1b49c6ef1..1bf2cf5b8 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -675,10 +675,12 @@ "disable_fiat": "Wyłącz waluty FIAT", "fiat_api": "API Walut FIAT", "disabled": "Wyłączone", - "orbot_running_alert": "Upewnij się, że Orbot działa przed połączeniem z tym węzłem.", "enabled": "Włączone", "tor_only": "Tylko sieć Tor", "unmatched_currencies": "Waluta Twojego obecnego portfela nie zgadza się z waluctą zeskanowanego kodu QR", + "orbot_running_alert": "Upewnij się, że Orbot działa przed połączeniem z tym węzłem.", "contact_list_contacts": "Łączność", - "contact_list_wallets": "Moje portfele" + "contact_list_wallets": "Moje portfele", + "send_to_this_address" : "Wyślij ${currency} na ten adres", + "arrive_in_this_address" : "${currency} dotrze na ten adres" } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 8daba6193..7e4a66379 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -679,5 +679,7 @@ "unmatched_currencies": "A moeda da sua carteira atual não corresponde à do QR digitalizado", "orbot_running_alert": "Certifique-se de que o Orbot esteja em execução antes de se conectar a este nó.", "contact_list_contacts": "Contatos", - "contact_list_wallets": "minhas carteiras" + "contact_list_wallets": "minhas carteiras", + "send_to_this_address" : "Envie ${currency} para este endereço", + "arrive_in_this_address" : "${currency} chegará neste endereço" } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 17640af6d..979c3517d 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -680,5 +680,7 @@ "unmatched_currencies": "Валюта вашего текущего кошелька не соответствует валюте отсканированного QR-кода.", "orbot_running_alert": "Перед подключением к этому узлу убедитесь, что Orbot запущен.", "contact_list_contacts": "Контакты", - "contact_list_wallets": "Мои кошельки" + "contact_list_wallets": "Мои кошельки", + "send_to_this_address" : "Отправить ${currency} на этот адрес", + "arrive_in_this_address" : "${currency} придет на этот адрес" } diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 6934d9630..48e1ed0be 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -678,5 +678,7 @@ "unmatched_currencies" : "สกุลเงินของกระเป๋าปัจจุบันของคุณไม่ตรงกับของ QR ที่สแกน", "orbot_running_alert": "โปรดตรวจสอบว่า Orbot กำลังทำงานก่อนที่จะเชื่อมต่อกับโหนดนี้", "contact_list_contacts": "ติดต่อ", - "contact_list_wallets": "กระเป๋าเงินของฉัน" + "contact_list_wallets": "กระเป๋าเงินของฉัน", + "send_to_this_address" : "ส่ง ${currency} ไปยังที่อยู่นี้", + "arrive_in_this_address" : "${currency} จะมาถึงที่อยู่นี้" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index b9311e8ef..05fbf2e00 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -679,5 +679,7 @@ "unmatched_currencies": "Валюта вашого гаманця не збігається з валютою сканованого QR-коду", "orbot_running_alert": "Перед підключенням до цього вузла переконайтеся, що Orbot запущено.", "contact_list_contacts": "Контакти", - "contact_list_wallets": "Мої гаманці" + "contact_list_wallets": "Мої гаманці", + "send_to_this_address" : "Надіслати ${currency} на цю адресу", + "arrive_in_this_address" : "${currency} надійде на цю адресу" } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 5b6608671..e7e63764d 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -678,5 +678,7 @@ "unmatched_currencies": "您当前钱包的货币与扫描的 QR 的货币不匹配", "orbot_running_alert": "请确保 Orbot 在连接到此节点之前正在运行。", "contact_list_contacts": "联系人", - "contact_list_wallets": "我的钱包" + "contact_list_wallets": "我的钱包", + "send_to_this_address" : "发送 ${currency} 到这个地址", + "arrive_in_this_address" : "${currency} 将到达此地址" } From b4249f21a9cd484a613c0a7706fa9b443791745e Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 16 Jan 2023 17:27:49 +0200 Subject: [PATCH 2/4] add payout address item to confirmation screen --- lib/exchange/changenow/changenow_exchange_provider.dart | 8 ++++++-- lib/exchange/sideshift/sideshift_exchange_provider.dart | 3 +++ lib/exchange/simpleswap/simpleswap_exchange_provider.dart | 4 ++++ lib/exchange/trade.dart | 6 +++++- lib/view_model/exchange/exchange_trade_view_model.dart | 4 ++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lib/exchange/changenow/changenow_exchange_provider.dart b/lib/exchange/changenow/changenow_exchange_provider.dart index a9fb7c9ca..fc60be18e 100644 --- a/lib/exchange/changenow/changenow_exchange_provider.dart +++ b/lib/exchange/changenow/changenow_exchange_provider.dart @@ -143,6 +143,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider { final inputAddress = responseJSON['payinAddress'] as String; final refundAddress = responseJSON['refundAddress'] as String; final extraId = responseJSON['payinExtraId'] as String?; + final payoutAddress = responseJSON['payoutAddress'] as String; return Trade( id: id, @@ -154,7 +155,8 @@ class ChangeNowExchangeProvider extends ExchangeProvider { extraId: extraId, createdAt: DateTime.now(), amount: responseJSON['fromAmount']?.toString() ?? _request.fromAmount, - state: TradeState.created); + state: TradeState.created, + payoutAddress: payoutAddress); } @override @@ -192,6 +194,7 @@ class ChangeNowExchangeProvider extends ExchangeProvider { 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(); return Trade( @@ -204,7 +207,8 @@ class ChangeNowExchangeProvider extends ExchangeProvider { state: state, extraId: extraId, expiredAt: expiredAt, - outputTransaction: outputTransaction); + outputTransaction: outputTransaction, + payoutAddress: payoutAddress); } @override diff --git a/lib/exchange/sideshift/sideshift_exchange_provider.dart b/lib/exchange/sideshift/sideshift_exchange_provider.dart index 59d7964cb..2fc593988 100644 --- a/lib/exchange/sideshift/sideshift_exchange_provider.dart +++ b/lib/exchange/sideshift/sideshift_exchange_provider.dart @@ -150,6 +150,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { refundAddress: settleAddress, state: TradeState.created, amount: _request.depositAmount, + payoutAddress: settleAddress, createdAt: DateTime.now(), ); } @@ -244,6 +245,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { 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; TradeState? state; String? status; @@ -264,6 +266,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { amount: expectedSendAmount, state: state, expiredAt: expiredAt, + payoutAddress: settleAddress ); } diff --git a/lib/exchange/simpleswap/simpleswap_exchange_provider.dart b/lib/exchange/simpleswap/simpleswap_exchange_provider.dart index 2521c1486..e965e5331 100644 --- a/lib/exchange/simpleswap/simpleswap_exchange_provider.dart +++ b/lib/exchange/simpleswap/simpleswap_exchange_provider.dart @@ -108,6 +108,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { final responseJSON = json.decode(response.body) as Map; final id = responseJSON['id'] as String; final inputAddress = responseJSON['address_from'] as String; + final payoutAddress = responseJSON['address_to'] as String; final settleAddress = responseJSON['user_refund_address'] as String; final extraId = responseJSON['extra_id_from'] as String?; return Trade( @@ -120,6 +121,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { extraId: extraId, state: TradeState.created, amount: _request.amount, + payoutAddress: payoutAddress, createdAt: DateTime.now(), ); } @@ -189,6 +191,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { final expectedSendAmount = responseJSON['expected_amount'].toString(); final extraId = responseJSON['extra_id_from'] as String?; final status = responseJSON['status'] as String; + final payoutAddress = responseJSON['address_to'] as String; final state = TradeState.deserialize(raw: status); return Trade( @@ -200,6 +203,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider { inputAddress: inputAddress, amount: expectedSendAmount, state: state, + payoutAddress: payoutAddress, ); } diff --git a/lib/exchange/trade.dart b/lib/exchange/trade.dart index 99b73e789..f20a080b7 100644 --- a/lib/exchange/trade.dart +++ b/lib/exchange/trade.dart @@ -21,7 +21,8 @@ class Trade extends HiveObject { this.extraId, this.outputTransaction, this.refundAddress, - this.walletId}) { + this.walletId, + this.payoutAddress}) { if (provider != null) { providerRaw = provider.raw; } @@ -88,6 +89,9 @@ class Trade extends HiveObject { @HiveField(12) String? walletId; + @HiveField(13) + String? payoutAddress; + static Trade fromMap(Map map) { return Trade( id: map['id'] as String, diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 275de2808..2ec91b49b 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -146,6 +146,10 @@ abstract class ExchangeTradeViewModelBase with Store { title: S.current.send_to_this_address('${trade.from} ${trade.from.tag ?? ''}') + ':', data: trade.inputAddress ?? '', isCopied: true), + ExchangeTradeItem( + title: S.current.arrive_in_this_address('${trade.to} ${trade.to.tag ?? ''}') + ':', + data: trade.payoutAddress ?? '', + isCopied: true), ]); } } From 4636aacae71d511ae090e5f8d11bf75a9b602c39 Mon Sep 17 00:00:00 2001 From: Serhii Date: Mon, 16 Jan 2023 17:31:31 +0200 Subject: [PATCH 3/4] formatting --- .../exchange/exchange_trade_view_model.dart | 52 ++++++++----------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 2ec91b49b..8b578faa5 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -18,19 +18,18 @@ import 'package:cake_wallet/generated/i18n.dart'; part 'exchange_trade_view_model.g.dart'; -class ExchangeTradeViewModel = ExchangeTradeViewModelBase - with _$ExchangeTradeViewModel; +class ExchangeTradeViewModel = ExchangeTradeViewModelBase with _$ExchangeTradeViewModel; abstract class ExchangeTradeViewModelBase with Store { ExchangeTradeViewModelBase( {required this.wallet, - required this.trades, - required this.tradesStore, - required this.sendViewModel}) - : trade = tradesStore.trade!, - isSendable = tradesStore.trade!.from == wallet.currency || - tradesStore.trade!.provider == ExchangeProviderDescription.xmrto, - items = ObservableList() { + required this.trades, + required this.tradesStore, + required this.sendViewModel}) + : trade = tradesStore.trade!, + isSendable = tradesStore.trade!.from == wallet.currency || + tradesStore.trade!.provider == ExchangeProviderDescription.xmrto, + items = ObservableList() { switch (trade.provider) { case ExchangeProviderDescription.xmrto: _provider = XMRTOExchangeProvider(); @@ -67,22 +66,20 @@ abstract class ExchangeTradeViewModelBase with Store { @computed String get extraInfo => trade.from == CryptoCurrency.xlm - ? '\n\n' + S.current.xlm_extra_info - : trade.from == CryptoCurrency.xrp - ? '\n\n' + S.current.xrp_extra_info - : ''; + ? '\n\n' + S.current.xlm_extra_info + : trade.from == CryptoCurrency.xrp + ? '\n\n' + S.current.xrp_extra_info + : ''; @computed - String get pendingTransactionFiatAmountValueFormatted => - sendViewModel.isFiatDisabled - ? '' : sendViewModel.pendingTransactionFiatAmount - + ' ' + sendViewModel.fiat.title; + String get pendingTransactionFiatAmountValueFormatted => sendViewModel.isFiatDisabled + ? '' + : sendViewModel.pendingTransactionFiatAmount + ' ' + sendViewModel.fiat.title; @computed - String get pendingTransactionFeeFiatAmountFormatted => - sendViewModel.isFiatDisabled - ? '' : sendViewModel.pendingTransactionFeeFiatAmount - + ' ' + sendViewModel.fiat.title; + String get pendingTransactionFeeFiatAmountFormatted => sendViewModel.isFiatDisabled + ? '' + : sendViewModel.pendingTransactionFeeFiatAmount + ' ' + sendViewModel.fiat.title; @observable ObservableList items; @@ -130,18 +127,15 @@ abstract class ExchangeTradeViewModelBase with Store { final title = trade.from == CryptoCurrency.xrp ? S.current.destination_tag : trade.from == CryptoCurrency.xlm - ? S.current.memo - : S.current.extra_id; + ? S.current.memo + : S.current.extra_id; - items.add(ExchangeTradeItem( - title: title, data: '${trade.extraId}', isCopied: false)); + items.add(ExchangeTradeItem(title: title, data: '${trade.extraId}', isCopied: false)); } items.addAll([ - ExchangeTradeItem( - title: S.current.amount, data: '${trade.amount}', isCopied: false), - ExchangeTradeItem( - title: S.current.status, data: '${trade.state}', isCopied: false), + ExchangeTradeItem(title: S.current.amount, data: '${trade.amount}', isCopied: false), + ExchangeTradeItem(title: S.current.status, data: '${trade.state}', isCopied: false), ExchangeTradeItem( title: S.current.send_to_this_address('${trade.from} ${trade.from.tag ?? ''}') + ':', data: trade.inputAddress ?? '', From cce56a61a36bfe3a753aa368d003d1a5037f4828 Mon Sep 17 00:00:00 2001 From: Serhii Date: Thu, 26 Jan 2023 13:33:33 +0200 Subject: [PATCH 4/4] minor fixes --- lib/view_model/exchange/exchange_trade_view_model.dart | 7 ++++--- res/values/strings_ar.arb | 4 ++-- res/values/strings_de.arb | 4 ++-- res/values/strings_en.arb | 4 ++-- res/values/strings_es.arb | 4 ++-- res/values/strings_fr.arb | 4 ++-- res/values/strings_hi.arb | 4 ++-- res/values/strings_hr.arb | 4 ++-- res/values/strings_it.arb | 4 ++-- res/values/strings_ja.arb | 4 ++-- res/values/strings_ko.arb | 4 ++-- res/values/strings_my.arb | 4 +++- res/values/strings_nl.arb | 4 ++-- res/values/strings_pl.arb | 4 ++-- res/values/strings_pt.arb | 4 ++-- res/values/strings_ru.arb | 4 ++-- res/values/strings_th.arb | 4 ++-- res/values/strings_tr.arb | 4 +++- res/values/strings_uk.arb | 4 ++-- res/values/strings_zh.arb | 4 ++-- 20 files changed, 44 insertions(+), 39 deletions(-) diff --git a/lib/view_model/exchange/exchange_trade_view_model.dart b/lib/view_model/exchange/exchange_trade_view_model.dart index 8b578faa5..541b74396 100644 --- a/lib/view_model/exchange/exchange_trade_view_model.dart +++ b/lib/view_model/exchange/exchange_trade_view_model.dart @@ -119,6 +119,8 @@ abstract class ExchangeTradeViewModelBase with Store { } void _updateItems() { + final tagFrom = trade.from.tag != null ? '${trade.from.tag}' + ' ' : ''; + final tagTo = trade.to.tag != null ? '${trade.to.tag}' + ' ' : ''; items.clear(); items.add(ExchangeTradeItem( title: "${trade.provider.title} ${S.current.id}", data: '${trade.id}', isCopied: true)); @@ -135,13 +137,12 @@ abstract class ExchangeTradeViewModelBase with Store { items.addAll([ ExchangeTradeItem(title: S.current.amount, data: '${trade.amount}', isCopied: false), - ExchangeTradeItem(title: S.current.status, data: '${trade.state}', isCopied: false), ExchangeTradeItem( - title: S.current.send_to_this_address('${trade.from} ${trade.from.tag ?? ''}') + ':', + title: S.current.send_to_this_address('${trade.from}', tagFrom) + ':', data: trade.inputAddress ?? '', isCopied: true), ExchangeTradeItem( - title: S.current.arrive_in_this_address('${trade.to} ${trade.to.tag ?? ''}') + ':', + title: S.current.arrive_in_this_address('${trade.to}', tagTo) + ':', data: trade.payoutAddress ?? '', isCopied: true), ]); diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 7d7994b1e..e111bb467 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -679,6 +679,6 @@ "tor_only":"Tor فقط", "unmatched_currencies": "عملة محفظتك الحالية لا تتطابق مع عملة QR الممسوحة ضوئيًا", "orbot_running_alert": "يرجى التأكد من تشغيل Orbot قبل الاتصال بهذه العقدة.", - "send_to_this_address" : "أرسل ${currency} إلى هذا العنوان", - "arrive_in_this_address" : "سيصل ${currency} إلى هذا العنوان" + "send_to_this_address" : "أرسل ${currency} ${tag}إلى هذا العنوان", + "arrive_in_this_address" : "سيصل ${currency} ${tag}إلى هذا العنوان" } diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 8a9e90c5e..018aa7e7c 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Bitte stellen Sie sicher, dass Orbot läuft, bevor Sie sich mit diesem Knoten verbinden.", "contact_list_contacts": "Kontakte", "contact_list_wallets": "Meine Geldbörsen", - "send_to_this_address" : "Senden Sie ${currency} an diese Adresse", - "arrive_in_this_address" : "${currency} wird an dieser Adresse ankommen", + "send_to_this_address" : "Senden Sie ${currency} ${tag}an diese Adresse", + "arrive_in_this_address" : "${currency} ${tag}wird an dieser Adresse ankommen", "do_not_send": "Nicht senden", "error_dialog_content": "Hoppla, wir haben einen Fehler.\n\nBitte senden Sie den Absturzbericht an unser Support-Team, um die Anwendung zu verbessern." } diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 7718f3c39..24baded77 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Please make sure Orbot is running prior to connecting to this node.", "contact_list_contacts": "Contacts", "contact_list_wallets": "My Wallets", - "send_to_this_address" : "Send ${currency} to this address", - "arrive_in_this_address" : "${currency} will arrive in this address", + "send_to_this_address" : "Send ${currency} ${tag}to this address", + "arrive_in_this_address" : "${currency} ${tag}will arrive in this address", "do_not_send": "Don't send", "error_dialog_content": "Oops, we got some error.\n\nPlease send the crash report to our support team to make the application better." } diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 999f0bc47..82889df37 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Asegúrese de que Orbot se esté ejecutando antes de conectarse a este nodo.", "contact_list_contacts": "Contactos", "contact_list_wallets": "Mis billeteras", - "send_to_this_address" : "Enviar ${currency} a esta dirección", - "arrive_in_this_address" : "${currency} llegará a esta dirección", + "send_to_this_address" : "Enviar ${currency} ${tag}a esta dirección", + "arrive_in_this_address" : "${currency} ${tag}llegará a esta dirección", "do_not_send": "no enviar", "error_dialog_content": "Vaya, tenemos un error.\n\nEnvíe el informe de bloqueo a nuestro equipo de soporte para mejorar la aplicación." } diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 7fcf71478..a3288f958 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -679,8 +679,8 @@ "orbot_running_alert": "Veuillez vous assurer qu'Orbot est en cours d'exécution avant de vous connecter à ce nœud.", "contact_list_contacts": "Contacts", "contact_list_wallets": "Mes portefeuilles (wallets)", - "send_to_this_address" : "Envoyez ${currency} à cette adresse", - "arrive_in_this_address" : "${currency} arrivera à cette adresse", + "send_to_this_address" : "Envoyez ${currency} ${tag}à cette adresse", + "arrive_in_this_address" : "${currency} ${tag}arrivera à cette adresse", "do_not_send": "N'envoyez pas", "error_dialog_content": "Oups, nous avons eu une erreur.\n\nVeuillez envoyer le rapport de plantage à notre équipe d'assistance pour améliorer l'application." } diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 9127fb576..7ec7de38d 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "कृपया सुनिश्चित करें कि इस नोड से कनेक्ट करने से पहले Orbot चल रहा है।", "contact_list_contacts": "संपर्क", "contact_list_wallets": "मेरा बटुआ", - "send_to_this_address" : "इस पते पर ${currency} भेजें", - "arrive_in_this_address" : "${currency} इस पते पर पहुंचेंगे", + "send_to_this_address" : "इस पते पर ${currency} ${tag}भेजें", + "arrive_in_this_address" : "${currency} ${tag}इस पते पर पहुंचेंगे", "do_not_send": "मत भेजो", "error_dialog_content": "ओह, हमसे कुछ गड़बड़ी हुई है.\n\nएप्लिकेशन को बेहतर बनाने के लिए कृपया क्रैश रिपोर्ट हमारी सहायता टीम को भेजें।" } diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 0f097a087..79bad1e66 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Provjerite radi li Orbot prije spajanja na ovaj čvor.", "contact_list_contacts": "Kontakti", "contact_list_wallets": "Moji novčanici", - "send_to_this_address" : "Pošaljite ${currency} na ovu adresu", - "arrive_in_this_address" : "${currency} će stići na ovu adresu", + "send_to_this_address" : "Pošaljite ${currency} ${tag}na ovu adresu", + "arrive_in_this_address" : "${currency} ${tag}će stići na ovu adresu", "do_not_send": "Ne šalji", "error_dialog_content": "Ups, imamo grešku.\n\nPošaljite izvješće o padu našem timu za podršku kako bismo poboljšali aplikaciju." } diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 3f78da499..28f502cd6 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Assicurati che Orbot sia in esecuzione prima di connetterti a questo nodo.", "contact_list_contacts": "Contatti", "contact_list_wallets": "I miei portafogli", - "send_to_this_address" : "Invia ${currency} a questo indirizzo", - "arrive_in_this_address" : "${currency} arriverà a questo indirizzo", + "send_to_this_address" : "Invia ${currency} ${tag}a questo indirizzo", + "arrive_in_this_address" : "${currency} ${tag}arriverà a questo indirizzo", "do_not_send": "Non inviare", "error_dialog_content": "Ups, imamo grešku.\n\nPošaljite izvješće o padu našem timu za podršku kako bismo poboljšali aplikaciju." } diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index 50aacb432..f1a05b987 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "このノードに接続する前に、Orbot が実行されていることを確認してください", "contact_list_contacts": "連絡先", "contact_list_wallets": "マイウォレット", - "send_to_this_address" : "${currency} をこのアドレスに送金", - "arrive_in_this_address" : "${currency} はこの住所に到着します", + "send_to_this_address" : "${currency} ${tag}をこのアドレスに送金", + "arrive_in_this_address" : "${currency} ${tag}はこの住所に到着します", "do_not_send": "送信しない", "error_dialog_content": "Spiacenti, abbiamo riscontrato un errore.\n\nSi prega di inviare il rapporto sull'arresto anomalo al nostro team di supporto per migliorare l'applicazione." } diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index d84014e55..fa8565e6d 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "이 노드에 연결하기 전에 Orbot이 실행 중인지 확인하십시오.", "contact_list_contacts": "콘택트 렌즈", "contact_list_wallets": "내 지갑", - "send_to_this_address" : "이 주소로 ${currency} 송금", - "arrive_in_this_address" : "${currency}이(가) 이 주소로 도착합니다", + "send_to_this_address" : "이 주소로 ${currency} ${tag}송금", + "arrive_in_this_address" : "${currency} ${tag}이(가) 이 주소로 도착합니다", "do_not_send": "보내지 마세요", "error_dialog_content": "죄송합니다. 오류가 발생했습니다.\n\n응용 프로그램을 개선하려면 지원 팀에 충돌 보고서를 보내주십시오." } diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 352b8d191..0979948c1 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -679,5 +679,7 @@ "tor_only" : "Tor သာ", "unmatched_currencies" : "သင့်လက်ရှိပိုက်ဆံအိတ်၏ငွေကြေးသည် စကင်ဖတ်ထားသော QR နှင့် မကိုက်ညီပါ။", "contact_list_contacts" : "အဆက်အသွယ်များ", - "contact_list_wallets" : "ကျွန်ုပ်၏ ပိုက်ဆံအိတ်များ" + "contact_list_wallets" : "ကျွန်ုပ်၏ ပိုက်ဆံအိတ်များ", + "send_to_this_address" : "ဤလိပ်စာသို့ ${currency} ${tag}သို့ ပို့ပါ။", + "arrive_in_this_address" : "${currency} ${tag}ဤလိပ်စာသို့ ရောက်ရှိပါမည်။" } diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 67613d461..c10b1722f 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Zorg ervoor dat Orbot actief is voordat u verbinding maakt met dit knooppunt.", "contact_list_contacts": "Contacten", "contact_list_wallets": "Mijn portefeuilles", - "send_to_this_address" : "Stuur ${currency} naar dit adres", - "arrive_in_this_address" : "${currency} komt aan op dit adres", + "send_to_this_address" : "Stuur ${currency} ${tag}naar dit adres", + "arrive_in_this_address" : "${currency} ${tag}komt aan op dit adres", "do_not_send": "Niet sturen", "error_dialog_content": "Oeps, er is een fout opgetreden.\n\nStuur het crashrapport naar ons ondersteuningsteam om de applicatie te verbeteren." } diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index a38da0e28..72b93a08b 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Upewnij się, że Orbot działa przed połączeniem z tym węzłem.", "contact_list_contacts": "Łączność", "contact_list_wallets": "Moje portfele", - "send_to_this_address" : "Wyślij ${currency} na ten adres", - "arrive_in_this_address" : "${currency} dotrze na ten adres", + "send_to_this_address" : "Wyślij ${currency} ${tag}na ten adres", + "arrive_in_this_address" : "${currency} ${tag}dotrze na ten adres", "do_not_send": "Nie wysyłaj", "error_dialog_content": "Ups, wystąpił błąd.\n\nPrześlij raport o awarii do naszego zespołu wsparcia, aby ulepszyć aplikację." } diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 8d81eda26..4ed4df754 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -680,8 +680,8 @@ "orbot_running_alert": "Certifique-se de que o Orbot esteja em execução antes de se conectar a este nó.", "contact_list_contacts": "Contatos", "contact_list_wallets": "minhas carteiras", - "send_to_this_address" : "Envie ${currency} para este endereço", - "arrive_in_this_address" : "${currency} chegará neste endereço", + "send_to_this_address" : "Envie ${currency} ${tag}para este endereço", + "arrive_in_this_address" : "${currency} ${tag}chegará neste endereço", "do_not_send": "não envie", "error_dialog_content": "Ops, houve algum erro.\n\nPor favor, envie o relatório de falha para nossa equipe de suporte para melhorar o aplicativo." } diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index 161d33580..8482a1bda 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -681,8 +681,8 @@ "orbot_running_alert": "Перед подключением к этому узлу убедитесь, что Orbot запущен.", "contact_list_contacts": "Контакты", "contact_list_wallets": "Мои кошельки", - "send_to_this_address" : "Отправить ${currency} на этот адрес", - "arrive_in_this_address" : "${currency} придет на этот адрес", + "send_to_this_address" : "Отправить ${currency} ${tag}на этот адрес", + "arrive_in_this_address" : "${currency} ${tag}придет на этот адрес", "do_not_send": "Не отправлять", "error_dialog_content": "Ой, у нас какая-то ошибка.\n\nПожалуйста, отправьте отчет о сбое в нашу службу поддержки, чтобы сделать приложение лучше." } diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 0104bbb02..8e108f6c7 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -679,8 +679,8 @@ "orbot_running_alert": "โปรดตรวจสอบว่า Orbot กำลังทำงานก่อนที่จะเชื่อมต่อกับโหนดนี้", "contact_list_contacts": "ติดต่อ", "contact_list_wallets": "กระเป๋าเงินของฉัน", - "send_to_this_address" : "ส่ง ${currency} ไปยังที่อยู่นี้", - "arrive_in_this_address" : "${currency} จะมาถึงที่อยู่นี้", + "send_to_this_address" : "ส่ง ${currency} ${tag}ไปยังที่อยู่นี้", + "arrive_in_this_address" : "${currency} ${tag}จะมาถึงที่อยู่นี้", "do_not_send": "อย่าส่ง", "error_dialog_content": "อ๊ะ เราพบข้อผิดพลาดบางอย่าง\n\nโปรดส่งรายงานข้อขัดข้องไปยังทีมสนับสนุนของเราเพื่อปรับปรุงแอปพลิเคชันให้ดียิ่งขึ้น" } diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index 678b3609f..46f7213d4 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -679,5 +679,7 @@ "tor_only": "Yalnızca Tor", "unmatched_currencies": "Mevcut cüzdanınızın para birimi taranan QR ile eşleşmiyor", "contact_list_contacts": "Rehberim", - "contact_list_wallets": "Cüzdanlarım" + "contact_list_wallets": "Cüzdanlarım", + "send_to_this_address" : "Bu adrese ${currency} ${tag}gönder", + "arrive_in_this_address" : "${currency} ${tag}bu adrese ulaşacak" } diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 1f0c2b2ee..2ed7c7fdb 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -680,8 +680,8 @@ "orbot_running_alert": "Перед підключенням до цього вузла переконайтеся, що Orbot запущено.", "contact_list_contacts": "Контакти", "contact_list_wallets": "Мої гаманці", - "send_to_this_address" : "Надіслати ${currency} на цю адресу", - "arrive_in_this_address" : "${currency} надійде на цю адресу", + "send_to_this_address" : "Надіслати ${currency} ${tag}на цю адресу", + "arrive_in_this_address" : "${currency} ${tag}надійде на цю адресу", "do_not_send": "Не надсилайте", "error_dialog_content": "На жаль, ми отримали помилку.\n\nБудь ласка, надішліть звіт про збій нашій команді підтримки, щоб покращити додаток." } diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index e2e8dd82a..7355ac3bd 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -679,8 +679,8 @@ "orbot_running_alert": "请确保 Orbot 在连接到此节点之前正在运行。", "contact_list_contacts": "联系人", "contact_list_wallets": "我的钱包", - "send_to_this_address" : "发送 ${currency} 到这个地址", - "arrive_in_this_address" : "${currency} 将到达此地址", + "send_to_this_address" : "发送 ${currency} ${tag}到这个地址", + "arrive_in_this_address" : "${currency} ${tag}将到达此地址", "do_not_send": "不要发送", "error_dialog_content": "糟糕,我们遇到了一些错误。\n\n请将崩溃报告发送给我们的支持团队,以改进应用程序。" }