From 2ac81250c24ebe84610242ac62591a3e063d974f Mon Sep 17 00:00:00 2001 From: Adegoke David <64401859+Blazebrain@users.noreply.github.com> Date: Thu, 25 Apr 2024 02:14:11 +0100 Subject: [PATCH] CW-615-Add-Check-For-Contract-Address (#1387) * feat: Check if address is a valid Externally Owned Address * feat: Check if the EVM address received when exchanging tokens is a valid EOA address * move the contract address check to be only in the case of ThorChain [skip ci] * some enhancements * feat: Implement check for contract address for inputAddress when exchanging to ETH * fix: Remove previous implementation and clean up current implementation for the check for contract address * chore: Remove unneed space * chore: Remove unneed space --------- Co-authored-by: OmarHatem --- lib/core/create_trade_result.dart | 9 ++ .../exchange/exchange_view_model.dart | 120 +++++++++++++++--- lib/view_model/send/send_view_model.dart | 6 +- res/values/strings_ar.arb | 1 + res/values/strings_bg.arb | 1 + res/values/strings_cs.arb | 1 + res/values/strings_de.arb | 1 + res/values/strings_en.arb | 1 + res/values/strings_es.arb | 1 + res/values/strings_fr.arb | 1 + res/values/strings_ha.arb | 1 + res/values/strings_hi.arb | 1 + res/values/strings_hr.arb | 1 + res/values/strings_id.arb | 1 + res/values/strings_it.arb | 1 + res/values/strings_ja.arb | 1 + res/values/strings_ko.arb | 1 + res/values/strings_my.arb | 1 + res/values/strings_nl.arb | 1 + res/values/strings_pl.arb | 1 + res/values/strings_pt.arb | 1 + res/values/strings_ru.arb | 1 + res/values/strings_th.arb | 1 + res/values/strings_tl.arb | 1 + res/values/strings_tr.arb | 1 + res/values/strings_uk.arb | 1 + res/values/strings_ur.arb | 1 + res/values/strings_yo.arb | 1 + res/values/strings_zh.arb | 1 + tool/configure.dart | 3 +- 30 files changed, 146 insertions(+), 18 deletions(-) create mode 100644 lib/core/create_trade_result.dart diff --git a/lib/core/create_trade_result.dart b/lib/core/create_trade_result.dart new file mode 100644 index 000000000..0e873d51e --- /dev/null +++ b/lib/core/create_trade_result.dart @@ -0,0 +1,9 @@ +class CreateTradeResult { + bool result; + String? errorMessage; + + CreateTradeResult({ + required this.result, + this.errorMessage, + }); +} diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index eba347ac4..4e5902faa 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -3,8 +3,20 @@ import 'dart:collection'; import 'dart:convert'; import 'package:bitcoin_base/bitcoin_base.dart'; -import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart'; +import 'package:cake_wallet/core/create_trade_result.dart'; +import 'package:cw_core/crypto_currency.dart'; +import 'package:cw_core/sync_status.dart'; +import 'package:cw_core/transaction_priority.dart'; +import 'package:cw_core/wallet_type.dart'; +import 'package:hive/hive.dart'; +import 'package:http/http.dart' as http; +import 'package:intl/intl.dart'; +import 'package:mobx/mobx.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import 'package:cake_wallet/.secrets.g.dart' as secrets; import 'package:cake_wallet/bitcoin/bitcoin.dart'; +import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart'; import 'package:cake_wallet/core/wallet_change_listener_view_model.dart'; import 'package:cake_wallet/entities/exchange_api_mode.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; @@ -33,14 +45,6 @@ import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/templates/exchange_template_store.dart'; import 'package:cake_wallet/utils/feature_flag.dart'; import 'package:cake_wallet/view_model/contact_list/contact_list_view_model.dart'; -import 'package:cw_core/crypto_currency.dart'; -import 'package:cw_core/sync_status.dart'; -import 'package:cw_core/transaction_priority.dart'; -import 'package:cw_core/wallet_type.dart'; -import 'package:hive/hive.dart'; -import 'package:intl/intl.dart'; -import 'package:mobx/mobx.dart'; -import 'package:shared_preferences/shared_preferences.dart'; part 'exchange_view_model.g.dart'; @@ -516,10 +520,12 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with trade.walletId = wallet.id; trade.fromWalletAddress = wallet.walletAddresses.address; - if (!isCanCreateTrade(trade)) { + final canCreateTrade = await isCanCreateTrade(trade); + if (!canCreateTrade.result) { tradeState = TradeIsCreatedFailure( - title: S.current.trade_not_created, - error: S.current.thorchain_taproot_address_not_supported); + title: S.current.trade_not_created, + error: canCreateTrade.errorMessage ?? '', + ); return; } @@ -776,16 +782,100 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with int get receiveMaxDigits => receiveCurrency.decimals; - bool isCanCreateTrade(Trade trade) { + Future isCanCreateTrade(Trade trade) async { if (trade.provider == ExchangeProviderDescription.thorChain) { final payoutAddress = trade.payoutAddress ?? ''; final fromWalletAddress = trade.fromWalletAddress ?? ''; final tapRootPattern = RegExp(P2trAddress.regex.pattern); if (tapRootPattern.hasMatch(payoutAddress) || tapRootPattern.hasMatch(fromWalletAddress)) { - return false; + return CreateTradeResult( + result: false, + errorMessage: S.current.thorchain_taproot_address_not_supported, + ); + } + + final currenciesToCheckPattern = RegExp('0x[0-9a-zA-Z]'); + + // Perform checks for payOutAddress + final isPayOutAddressAccordingToPattern = currenciesToCheckPattern.hasMatch(payoutAddress); + + if (isPayOutAddressAccordingToPattern) { + final isPayOutAddressEOA = await _isExternallyOwnedAccountAddress(payoutAddress); + + return CreateTradeResult( + result: isPayOutAddressEOA, + errorMessage: + !isPayOutAddressEOA ? S.current.thorchain_contract_address_not_supported : null, + ); + } + + // Perform checks for fromWalletAddress + final isFromWalletAddressAddressAccordingToPattern = + currenciesToCheckPattern.hasMatch(fromWalletAddress); + + if (isFromWalletAddressAddressAccordingToPattern) { + final isFromWalletAddressEOA = await _isExternallyOwnedAccountAddress(fromWalletAddress); + + return CreateTradeResult( + result: isFromWalletAddressEOA, + errorMessage: + !isFromWalletAddressEOA ? S.current.thorchain_contract_address_not_supported : null, + ); } } - return true; + return CreateTradeResult(result: true); + } + + String _normalizeReceiveCurrency(CryptoCurrency receiveCurrency) { + switch (receiveCurrency) { + case CryptoCurrency.eth: + return 'eth'; + case CryptoCurrency.maticpoly: + return 'polygon'; + default: + return receiveCurrency.tag ?? ''; + } + } + + Future _isExternallyOwnedAccountAddress(String receivingAddress) async { + final normalizedReceiveCurrency = _normalizeReceiveCurrency(receiveCurrency); + + final isEOAAddress = !(await _isContractAddress(normalizedReceiveCurrency, receivingAddress)); + return isEOAAddress; + } + + Future _isContractAddress(String chainName, String contractAddress) async { + final httpClient = http.Client(); + + final uri = Uri.https( + 'deep-index.moralis.io', + '/api/v2.2/erc20/metadata', + { + "chain": chainName, + "addresses": contractAddress, + }, + ); + + try { + final response = await httpClient.get( + uri, + headers: { + "Accept": "application/json", + "X-API-Key": secrets.moralisApiKey, + }, + ); + + final decodedResponse = jsonDecode(response.body)[0] as Map; + + final name = decodedResponse['name'] as String?; + + bool isContractAddress = name!.isNotEmpty; + + return isContractAddress; + } catch (e) { + print(e); + return false; + } } } diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 038301db4..298cc3eed 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -324,14 +324,16 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor Future createTransaction({ExchangeProvider? provider}) async { try { state = IsExecutingState(); + pendingTransaction = await wallet.createTransaction(_credentials()); if (provider is ThorChainExchangeProvider) { final outputCount = pendingTransaction?.outputCount ?? 0; if (outputCount > 10) { - throw Exception("ThorChain does not support more than 10 outputs"); + throw Exception("THORChain does not support more than 10 outputs"); } + if (_hasTaprootInput(pendingTransaction)) { - throw Exception("ThorChain does not support Taproot addresses"); + throw Exception("THORChain does not support Taproot addresses"); } } state = ExecutedSuccessfullyState(); diff --git a/res/values/strings_ar.arb b/res/values/strings_ar.arb index 15b9712fc..cf9959f17 100644 --- a/res/values/strings_ar.arb +++ b/res/values/strings_ar.arb @@ -660,6 +660,7 @@ "template_name": "اسم القالب", "third_intro_content": "يعيش Yats خارج Cake Wallet أيضًا. يمكن استبدال أي عنوان محفظة على وجه الأرض بـ Yat!", "third_intro_title": "يتماشي Yat بلطف مع الآخرين", + "thorchain_contract_address_not_supported": "لا يدعم Thorchain الإرسال إلى عنوان العقد", "thorchain_taproot_address_not_supported": "لا يدعم مزود Thorchain عناوين Taproot. يرجى تغيير العنوان أو تحديد مزود مختلف.", "time": "${minutes}د ${seconds}س", "tip": "بقشيش:", diff --git a/res/values/strings_bg.arb b/res/values/strings_bg.arb index d479bd57d..bd1cd645d 100644 --- a/res/values/strings_bg.arb +++ b/res/values/strings_bg.arb @@ -660,6 +660,7 @@ "template_name": "Име на шаблон", "third_intro_content": "Yats също живее извън Cake Wallet. Всеки адрес на портфейл може да бъде заменен с Yat!", "third_intro_title": "Yat добре се сработва с други", + "thorchain_contract_address_not_supported": "Thorchain не подкрепя изпращането до адрес на договор", "thorchain_taproot_address_not_supported": "Доставчикът на Thorchain не поддържа адреси на TapRoot. Моля, променете адреса или изберете друг доставчик.", "time": "${minutes} мин ${seconds} сек", "tip": "Tip:", diff --git a/res/values/strings_cs.arb b/res/values/strings_cs.arb index 547c926af..4d3458bec 100644 --- a/res/values/strings_cs.arb +++ b/res/values/strings_cs.arb @@ -660,6 +660,7 @@ "template_name": "Název šablony", "third_intro_content": "Yat existuje i mimo Cake Wallet. Jakákoliv adresa peněženky na světě může být nahrazena Yatem!", "third_intro_title": "Yat dobře spolupracuje s ostatními", + "thorchain_contract_address_not_supported": "Thorchain nepodporuje odeslání na adresu smlouvy", "thorchain_taproot_address_not_supported": "Poskytovatel Thorchain nepodporuje adresy Taproot. Změňte adresu nebo vyberte jiného poskytovatele.", "time": "${minutes}m ${seconds}s", "tip": "Spropitné:", diff --git a/res/values/strings_de.arb b/res/values/strings_de.arb index 97f2ccdc2..7efb0b682 100644 --- a/res/values/strings_de.arb +++ b/res/values/strings_de.arb @@ -661,6 +661,7 @@ "template_name": "Vorlagenname", "third_intro_content": "Yats leben auch außerhalb von Cake Wallet. Jede Wallet-Adresse auf der Welt kann durch ein Yat ersetzt werden!", "third_intro_title": "Yat spielt gut mit anderen", + "thorchain_contract_address_not_supported": "Thorchain unterstützt das Senden an eine Vertragsadresse nicht", "thorchain_taproot_address_not_supported": "Der Thorchain -Anbieter unterstützt keine Taproot -Adressen. Bitte ändern Sie die Adresse oder wählen Sie einen anderen Anbieter aus.", "time": "${minutes}m ${seconds}s", "tip": "Hinweis:", diff --git a/res/values/strings_en.arb b/res/values/strings_en.arb index 60de404fd..8f8b753d6 100644 --- a/res/values/strings_en.arb +++ b/res/values/strings_en.arb @@ -660,6 +660,7 @@ "template_name": "Template Name", "third_intro_content": "Yats live outside of Cake Wallet, too. Any wallet address on earth can be replaced with a Yat!", "third_intro_title": "Yat plays nicely with others", + "thorchain_contract_address_not_supported": "THORChain does not support sending to a contract address", "thorchain_taproot_address_not_supported": "The ThorChain provider does not support Taproot addresses. Please change the address or select a different provider.", "time": "${minutes}m ${seconds}s", "tip": "Tip:", diff --git a/res/values/strings_es.arb b/res/values/strings_es.arb index 60cac3a8c..7de9cff53 100644 --- a/res/values/strings_es.arb +++ b/res/values/strings_es.arb @@ -661,6 +661,7 @@ "template_name": "Nombre de la plantilla", "third_intro_content": "Los Yats también viven fuera de Cake Wallet. Cualquier dirección de billetera en la tierra se puede reemplazar con un Yat!", "third_intro_title": "Yat juega muy bien con otras", + "thorchain_contract_address_not_supported": "Thorchain no admite enviar a una dirección de contrato", "thorchain_taproot_address_not_supported": "El proveedor de Thorchain no admite las direcciones de Taproot. Cambie la dirección o seleccione un proveedor diferente.", "time": "${minutes}m ${seconds}s", "tip": "Consejo:", diff --git a/res/values/strings_fr.arb b/res/values/strings_fr.arb index 691c481c1..2c76122fc 100644 --- a/res/values/strings_fr.arb +++ b/res/values/strings_fr.arb @@ -660,6 +660,7 @@ "template_name": "Nom du modèle", "third_intro_content": "Les Yats existent aussi en dehors de Cake Wallet. Toute adresse sur terre peut être remplacée par un Yat !", "third_intro_title": "Yat est universel", + "thorchain_contract_address_not_supported": "Thorchain ne prend pas en charge l'envoi à une adresse de contrat", "thorchain_taproot_address_not_supported": "Le fournisseur de Thorchain ne prend pas en charge les adresses de tapoot. Veuillez modifier l'adresse ou sélectionner un autre fournisseur.", "time": "${minutes}m ${seconds}s", "tip": "Pourboire :", diff --git a/res/values/strings_ha.arb b/res/values/strings_ha.arb index f310f67f3..bac970207 100644 --- a/res/values/strings_ha.arb +++ b/res/values/strings_ha.arb @@ -662,6 +662,7 @@ "template_name": "Sunan Samfura", "third_intro_content": "Yats suna zaune a wajen Kek Wallet, kuma. Ana iya maye gurbin kowane adireshin walat a duniya da Yat!", "third_intro_title": "Yat yana wasa da kyau tare da wasu", + "thorchain_contract_address_not_supported": "Thorchain baya goyon bayan aika zuwa adireshin kwangila", "thorchain_taproot_address_not_supported": "Mai ba da tallafi na ThorChain baya goyan bayan adreshin taproot. Da fatan za a canza adireshin ko zaɓi mai bayarwa daban.", "time": "${minutes}m ${seconds}s", "tip": "Tukwici:", diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 671c7a765..5a9706bd5 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -662,6 +662,7 @@ "template_name": "टेम्पलेट नाम", "third_intro_content": "Yats Cake Wallet के बाहर भी रहता है। धरती पर किसी भी वॉलेट पते को Yat से बदला जा सकता है!", "third_intro_title": "Yat दूसरों के साथ अच्छा खेलता है", + "thorchain_contract_address_not_supported": "थोरचेन एक अनुबंध पते पर भेजने का समर्थन नहीं करता है", "thorchain_taproot_address_not_supported": "थोरचेन प्रदाता टैपरोट पते का समर्थन नहीं करता है। कृपया पता बदलें या एक अलग प्रदाता का चयन करें।", "time": "${minutes}m ${seconds}s", "tip": "टिप:", diff --git a/res/values/strings_hr.arb b/res/values/strings_hr.arb index 67e25d59a..94f675a1d 100644 --- a/res/values/strings_hr.arb +++ b/res/values/strings_hr.arb @@ -660,6 +660,7 @@ "template_name": "Naziv predloška", "third_intro_content": "Yats žive i izvan Cake Wallet -a. Bilo koja adresa novčanika na svijetu može se zamijeniti Yat!", "third_intro_title": "Yat se lijepo igra s drugima", + "thorchain_contract_address_not_supported": "Thorchain ne podržava slanje na adresu ugovora", "thorchain_taproot_address_not_supported": "Thorchain pružatelj ne podržava Taproot adrese. Promijenite adresu ili odaberite drugog davatelja usluga.", "time": "${minutes}m ${seconds}s", "tip": "Savjet:", diff --git a/res/values/strings_id.arb b/res/values/strings_id.arb index cca6f9b2a..69e270d10 100644 --- a/res/values/strings_id.arb +++ b/res/values/strings_id.arb @@ -663,6 +663,7 @@ "template_name": "Nama Templat", "third_intro_content": "Yats hidup di luar Cake Wallet juga. Setiap alamat dompet di dunia dapat diganti dengan Yat!", "third_intro_title": "Yat bermain baik dengan yang lain", + "thorchain_contract_address_not_supported": "Thorchain tidak mendukung pengiriman ke alamat kontrak", "thorchain_taproot_address_not_supported": "Penyedia Thorchain tidak mendukung alamat Taproot. Harap ubah alamatnya atau pilih penyedia yang berbeda.", "time": "${minutes}m ${seconds}s", "tip": "Tip:", diff --git a/res/values/strings_it.arb b/res/values/strings_it.arb index 4e04c0498..09b3e43bb 100644 --- a/res/values/strings_it.arb +++ b/res/values/strings_it.arb @@ -662,6 +662,7 @@ "template_name": "Nome modello", "third_intro_content": "Yat può funzionare anche fuori da Cake Wallet. Qualsiasi indirizzo di portafoglio sulla terra può essere sostituito con uno Yat!", "third_intro_title": "Yat gioca bene con gli altri", + "thorchain_contract_address_not_supported": "Thorchain non supporta l'invio a un indirizzo contrattuale", "thorchain_taproot_address_not_supported": "Il provider di Thorchain non supporta gli indirizzi di TapRoot. Si prega di modificare l'indirizzo o selezionare un fornitore diverso.", "time": "${minutes}m ${seconds}s", "tip": "Suggerimento:", diff --git a/res/values/strings_ja.arb b/res/values/strings_ja.arb index b3aa527d6..b067c2721 100644 --- a/res/values/strings_ja.arb +++ b/res/values/strings_ja.arb @@ -661,6 +661,7 @@ "template_name": "テンプレート名", "third_intro_content": "YatsはCakeWalletの外にも住んでいます。 地球上のどのウォレットアドレスもYatに置き換えることができます!", "third_intro_title": "Yatは他の人とうまく遊ぶ", + "thorchain_contract_address_not_supported": "Thorchainは、契約アドレスへの送信をサポートしていません", "thorchain_taproot_address_not_supported": "Thorchainプロバイダーは、TapRootアドレスをサポートしていません。アドレスを変更するか、別のプロバイダーを選択してください。", "time": "${minutes}m ${seconds}s", "tip": "ヒント: ", diff --git a/res/values/strings_ko.arb b/res/values/strings_ko.arb index 6c5800614..d9881ad04 100644 --- a/res/values/strings_ko.arb +++ b/res/values/strings_ko.arb @@ -661,6 +661,7 @@ "template_name": "템플릿 이름", "third_intro_content": "Yats는 Cake Wallet 밖에서도 살고 있습니다. 지구상의 모든 지갑 주소는 Yat!", "third_intro_title": "Yat는 다른 사람들과 잘 놉니다.", + "thorchain_contract_address_not_supported": "Thorchain은 계약 주소로 보내는 것을 지원하지 않습니다", "thorchain_taproot_address_not_supported": "Thorchain 제공 업체는 Taproot 주소를 지원하지 않습니다. 주소를 변경하거나 다른 공급자를 선택하십시오.", "time": "${minutes}m ${seconds}s", "tip": "팁:", diff --git a/res/values/strings_my.arb b/res/values/strings_my.arb index 96f141eae..c36f63414 100644 --- a/res/values/strings_my.arb +++ b/res/values/strings_my.arb @@ -660,6 +660,7 @@ "template_name": "နမူနာပုံစံ", "third_intro_content": "Yats သည် Cake Wallet အပြင်ဘက်တွင် နေထိုင်ပါသည်။ ကမ္ဘာပေါ်ရှိ မည်သည့်ပိုက်ဆံအိတ်လိပ်စာကို Yat ဖြင့် အစားထိုးနိုင်ပါသည်။", "third_intro_title": "Yat သည် အခြားသူများနှင့် ကောင်းစွာကစားသည်။", + "thorchain_contract_address_not_supported": "Thorchain သည်စာချုပ်လိပ်စာသို့ပို့ခြင်းမပြုပါ", "thorchain_taproot_address_not_supported": "Thorchain Provider သည် Taproot လိပ်စာများကိုမထောက်ခံပါ။ ကျေးဇူးပြု. လိပ်စာကိုပြောင်းပါသို့မဟုတ်အခြားပံ့ပိုးပေးသူကိုရွေးချယ်ပါ။", "time": "${minutes}m ${seconds}s", "tip": "အကြံပြုချက်-", diff --git a/res/values/strings_nl.arb b/res/values/strings_nl.arb index 1ce17f706..f258b8f62 100644 --- a/res/values/strings_nl.arb +++ b/res/values/strings_nl.arb @@ -660,6 +660,7 @@ "template_name": "Sjabloonnaam", "third_intro_content": "Yats wonen ook buiten Cake Wallet. Elk portemonnee-adres op aarde kan worden vervangen door een Yat!", "third_intro_title": "Yat speelt leuk met anderen", + "thorchain_contract_address_not_supported": "Thorchain ondersteunt het verzenden niet naar een contractadres", "thorchain_taproot_address_not_supported": "De Thorchain -provider ondersteunt geen Taprooot -adressen. Wijzig het adres of selecteer een andere provider.", "time": "${minutes}m ${seconds}s", "tip": "Tip:", diff --git a/res/values/strings_pl.arb b/res/values/strings_pl.arb index f48ad5dde..4627d0242 100644 --- a/res/values/strings_pl.arb +++ b/res/values/strings_pl.arb @@ -660,6 +660,7 @@ "template_name": "Nazwa szablonu", "third_intro_content": "Yats mieszkają również poza Cake Wallet. Każdy adres portfela na ziemi można zastąpić Yat!", "third_intro_title": "Yat ładnie bawi się z innymi", + "thorchain_contract_address_not_supported": "Thorchain nie wspiera wysyłania na adres umowy", "thorchain_taproot_address_not_supported": "Dostawca Thorchain nie obsługuje adresów TAPROOT. Zmień adres lub wybierz innego dostawcę.", "time": "${minutes}m ${seconds}s", "tip": "wskazówka:", diff --git a/res/values/strings_pt.arb b/res/values/strings_pt.arb index 15cc9f01e..2a781c76b 100644 --- a/res/values/strings_pt.arb +++ b/res/values/strings_pt.arb @@ -662,6 +662,7 @@ "template_name": "Nome do modelo", "third_intro_content": "Yats também mora fora da Cake Wallet. Qualquer endereço de carteira na Terra pode ser substituído por um Yat!", "third_intro_title": "Yat joga bem com os outros", + "thorchain_contract_address_not_supported": "Thorchain não suporta o envio para um endereço de contrato", "thorchain_taproot_address_not_supported": "O provedor de Thorchain não suporta endereços de raiz de Tap. Altere o endereço ou selecione um provedor diferente.", "time": "${minutes}m ${seconds}s", "tip": "Dica:", diff --git a/res/values/strings_ru.arb b/res/values/strings_ru.arb index ac0fac2ba..22bac3e33 100644 --- a/res/values/strings_ru.arb +++ b/res/values/strings_ru.arb @@ -661,6 +661,7 @@ "template_name": "Имя Шаблона", "third_intro_content": "Yat находятся за пределами Cake Wallet. Любой адрес кошелька на земле можно заменить на Yat!", "third_intro_title": "Yat хорошо взаимодействует с другими", + "thorchain_contract_address_not_supported": "Thorchain не поддерживает отправку на адрес контракта", "thorchain_taproot_address_not_supported": "Поставщик Thorchain не поддерживает адреса taproot. Пожалуйста, измените адрес или выберите другого поставщика.", "time": "${minutes}мин ${seconds}сек", "tip": "Совет:", diff --git a/res/values/strings_th.arb b/res/values/strings_th.arb index 7030f6f7f..c0f58495c 100644 --- a/res/values/strings_th.arb +++ b/res/values/strings_th.arb @@ -660,6 +660,7 @@ "template_name": "ชื่อแม่แบบ", "third_intro_content": "Yat อาศัยอยู่นอก Cake Wallet ด้วย ที่อยู่กระเป๋าใดๆ ทั่วโลกสามารถแทนด้วย Yat ได้อีกด้วย!", "third_intro_title": "Yat ปฏิบัติตนอย่างดีกับผู้อื่น", + "thorchain_contract_address_not_supported": "Thorchain ไม่สนับสนุนการส่งไปยังที่อยู่สัญญา", "thorchain_taproot_address_not_supported": "ผู้ให้บริการ Thorchain ไม่รองรับที่อยู่ taproot โปรดเปลี่ยนที่อยู่หรือเลือกผู้ให้บริการอื่น", "time": "${minutes}m ${seconds}s", "tip": "เพิ่มค่าตอบแทน:", diff --git a/res/values/strings_tl.arb b/res/values/strings_tl.arb index 05a363bac..8c3b13b3b 100644 --- a/res/values/strings_tl.arb +++ b/res/values/strings_tl.arb @@ -660,6 +660,7 @@ "template_name": "Pangalan ng Template", "third_intro_content": "Ang mga yats ay nakatira sa labas ng cake wallet, din. Ang anumang address ng pitaka sa mundo ay maaaring mapalitan ng isang yat!", "third_intro_title": "Si Yat ay mahusay na gumaganap sa iba", + "thorchain_contract_address_not_supported": "Hindi sinusuportahan ng Thorchain ang pagpapadala sa isang address ng kontrata", "thorchain_taproot_address_not_supported": "Ang Tagabigay ng Thorchain ay hindi sumusuporta sa mga address ng taproot. Mangyaring baguhin ang address o pumili ng ibang provider.", "time": "${minutes} m ${seconds} s", "tip": "Tip:", diff --git a/res/values/strings_tr.arb b/res/values/strings_tr.arb index ce342df2f..534a36c77 100644 --- a/res/values/strings_tr.arb +++ b/res/values/strings_tr.arb @@ -660,6 +660,7 @@ "template_name": "şablon adı", "third_intro_content": "Yat'lar Cake Wallet'ın dışında da çalışabilir. Dünya üzerindeki herhangi bir cüzdan adresi Yat ile değiştirilebilir!", "third_intro_title": "Yat diğerleriyle iyi çalışır", + "thorchain_contract_address_not_supported": "Thorchain bir sözleşme adresine göndermeyi desteklemiyor", "thorchain_taproot_address_not_supported": "Thorchain sağlayıcısı Taproot adreslerini desteklemiyor. Lütfen adresi değiştirin veya farklı bir sağlayıcı seçin.", "time": "${minutes}d ${seconds}s", "tip": "Bahşiş:", diff --git a/res/values/strings_uk.arb b/res/values/strings_uk.arb index 4afd47fe2..5d1e2be05 100644 --- a/res/values/strings_uk.arb +++ b/res/values/strings_uk.arb @@ -661,6 +661,7 @@ "template_name": "Назва шаблону", "third_intro_content": "Yat знаходиться за межами Cake Wallet. Будь-яку адресу гаманця на землі можна замінити на Yat!", "third_intro_title": "Yat добре взаємодіє з іншими", + "thorchain_contract_address_not_supported": "Thorchain не підтримує надсилання на адресу контракту", "thorchain_taproot_address_not_supported": "Постачальник Thorchain не підтримує адреси Taproot. Будь ласка, змініть адресу або виберіть іншого постачальника.", "time": "${minutes}хв ${seconds}сек", "tip": "Порада:", diff --git a/res/values/strings_ur.arb b/res/values/strings_ur.arb index fac066ace..d98a85753 100644 --- a/res/values/strings_ur.arb +++ b/res/values/strings_ur.arb @@ -662,6 +662,7 @@ "template_name": "ٹیمپلیٹ کا نام", "third_intro_content": "Yats بھی Cake والیٹ سے باہر رہتے ہیں۔ زمین پر کسی بھی بٹوے کے پتے کو Yat سے تبدیل کیا جا سکتا ہے!", "third_intro_title": "Yat دوسروں کے ساتھ اچھی طرح کھیلتا ہے۔", + "thorchain_contract_address_not_supported": "تھورچین معاہدے کے پتے بھیجنے کی حمایت نہیں کرتا ہے", "thorchain_taproot_address_not_supported": "تھورچین فراہم کنندہ ٹیپروٹ پتے کی حمایت نہیں کرتا ہے۔ براہ کرم پتہ تبدیل کریں یا ایک مختلف فراہم کنندہ کو منتخب کریں۔", "time": "${minutes}m ${seconds}s", "tip": "ٹپ:", diff --git a/res/values/strings_yo.arb b/res/values/strings_yo.arb index 1f131f3d9..faaeb8837 100644 --- a/res/values/strings_yo.arb +++ b/res/values/strings_yo.arb @@ -661,6 +661,7 @@ "template_name": "Orukọ Awoṣe", "third_intro_content": "A sì lè lo Yats níta Cake Wallet. A lè rọ́pò Àdírẹ́sì kankan àpamọ́wọ́ fún Yat!", "third_intro_title": "Àlàáfíà ni Yat àti àwọn ìmíìn jọ wà", + "thorchain_contract_address_not_supported": "Thorchain ko ṣe atilẹyin fifiranṣẹ si adirẹsi adehun kan", "thorchain_taproot_address_not_supported": "Olupese Trockchain ko ṣe atilẹyin awọn adirẹsi Taproot. Jọwọ yi adirẹsi pada tabi yan olupese ti o yatọ.", "time": "${minutes}ìṣj ${seconds}ìṣs", "tip": "Owó àfikún:", diff --git a/res/values/strings_zh.arb b/res/values/strings_zh.arb index 10d11b2c0..2d5251d86 100644 --- a/res/values/strings_zh.arb +++ b/res/values/strings_zh.arb @@ -660,6 +660,7 @@ "template_name": "模板名称", "third_intro_content": "Yats 也住在 Cake Wallet 之外。 地球上任何一個錢包地址都可以用一個Yat來代替!", "third_intro_title": "Yat 和別人玩得很好", + "thorchain_contract_address_not_supported": "Thorchain不支持发送到合同地址", "thorchain_taproot_address_not_supported": "Thorchain提供商不支持Taproot地址。请更改地址或选择其他提供商。", "time": "${minutes}m ${seconds}s", "tip": "提示:", diff --git a/tool/configure.dart b/tool/configure.dart index 6ee84d63a..d08724e42 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -1057,7 +1057,8 @@ Future generatePubspec( final inputFile = File(pubspecOutputPath); final inputText = await inputFile.readAsString(); final inputLines = inputText.split('\n'); - final dependenciesIndex = inputLines.indexWhere((line) => line.toLowerCase().contains('dependencies:')); + final dependenciesIndex = + inputLines.indexWhere((line) => line.toLowerCase().contains('dependencies:')); var output = cwCore; if (hasMonero) {