Updated on 2026-08-14

This commit is contained in:
Tangem 2025-12-08 14:49:51 +05:00
parent 972a287b1d
commit ef6918ce4a
20 changed files with 374 additions and 115 deletions

View file

@ -583,7 +583,6 @@
<string name="hw_backup_need_title">Zuerst die Sicherung abschließen</string> <string name="hw_backup_need_title">Zuerst die Sicherung abschließen</string>
<string name="hw_backup_no_backup">Unvollständig</string> <string name="hw_backup_no_backup">Unvollständig</string>
<string name="hw_backup_section_other_title">Andere Methoden</string> <string name="hw_backup_section_other_title">Andere Methoden</string>
<string name="hw_backup_seed_description">Physische Geräte, die Deine privaten Schlüssel sicher offline speichern.</string>
<string name="hw_backup_seed_title">Wiederherstellungs-Phrase</string> <string name="hw_backup_seed_title">Wiederherstellungs-Phrase</string>
<string name="hw_backup_to_upgrade_description">Um Deine Wallet auf Hardware umzustellen, erstelle vorher ein Backup.</string> <string name="hw_backup_to_upgrade_description">Um Deine Wallet auf Hardware umzustellen, erstelle vorher ein Backup.</string>
<string name="hw_create_keys_description">Deine privaten Schlüssel sind sicher verschlüsselt und auf Deinem Telefon gespeichert.</string> <string name="hw_create_keys_description">Deine privaten Schlüssel sind sicher verschlüsselt und auf Deinem Telefon gespeichert.</string>

View file

@ -3,6 +3,10 @@
<string name="access_code_alert_skip_description">アクセスコードがないとウォレットは安全ではありません。</string> <string name="access_code_alert_skip_description">アクセスコードがないとウォレットは安全ではありません。</string>
<string name="access_code_alert_skip_ok">とにかくスキップ</string> <string name="access_code_alert_skip_ok">とにかくスキップ</string>
<string name="access_code_alert_skip_title">アクセスコードが設定されていません</string> <string name="access_code_alert_skip_title">アクセスコードが設定されていません</string>
<string name="access_code_alert_validation_cancel">コードを変更</string>
<string name="access_code_alert_validation_description">アクセスコードは、ウォレットのロック解除・資産へのアクセス保護に使用されます</string>
<string name="access_code_alert_validation_ok">このまま使用</string>
<string name="access_code_alert_validation_title">このアクセスコードは簡単に推測される可能性があります</string>
<string name="access_code_check_title">アクセスコードを入力</string> <string name="access_code_check_title">アクセスコードを入力</string>
<string name="access_code_check_warining_delete">アクセスコードが間違っています。あと%s回間違えると、モバイルウォレットが削除されます。</string> <string name="access_code_check_warining_delete">アクセスコードが間違っています。あと%s回間違えると、モバイルウォレットが削除されます。</string>
<string name="access_code_check_warining_lock">アクセスコードが間違っています。あと%s回失敗すると、アプリはロックされます。</string> <string name="access_code_check_warining_lock">アクセスコードが間違っています。あと%s回失敗すると、アプリはロックされます。</string>
@ -586,7 +590,6 @@
<string name="hw_backup_need_finish_first">まずバックアップを完了する</string> <string name="hw_backup_need_finish_first">まずバックアップを完了する</string>
<string name="hw_backup_need_title">まずバックアップを完了する</string> <string name="hw_backup_need_title">まずバックアップを完了する</string>
<string name="hw_backup_section_other_title">その他の方法</string> <string name="hw_backup_section_other_title">その他の方法</string>
<string name="hw_backup_seed_description">秘密鍵をオフラインで安全に保存する物理デバイス。</string>
<string name="hw_backup_seed_title">リカバリーフレーズ</string> <string name="hw_backup_seed_title">リカバリーフレーズ</string>
<string name="hw_backup_to_secure_description">アクセスコードを使用してウォレットを保護するには、まずバックアップを完了してください。</string> <string name="hw_backup_to_secure_description">アクセスコードを使用してウォレットを保護するには、まずバックアップを完了してください。</string>
<string name="hw_backup_to_upgrade_description">ウォレットをハードウェアにアップグレードするには、まずバックアップしてください。</string> <string name="hw_backup_to_upgrade_description">ウォレットをハードウェアにアップグレードするには、まずバックアップしてください。</string>
@ -773,6 +776,10 @@
<string name="markets_token_details_volume">取引量</string> <string name="markets_token_details_volume">取引量</string>
<string name="markets_tooltip_message">これをドラッグするか、検索窓をタップして、マーケットから直接トークンを追加します</string> <string name="markets_tooltip_message">これをドラッグするか、検索窓をタップして、マーケットから直接トークンを追加します</string>
<string name="markets_tooltip_title">トークンを追加</string> <string name="markets_tooltip_title">トークンを追加</string>
<string name="markets_yield_supply_banner_description">資産を即時アクセス可能な状態に保ったまま、パワーアップさせよう。%s</string>
<string name="markets_yield_supply_banner_title">利息モードを有効にする</string>
<string name="mobile_wallet_requires_min_os_warning_body">モバイルウォレットを作成するには、%1$sにアップデートする必要があります</string>
<string name="mobile_wallet_requires_min_os_warning_title">モバイルウォレットを使用するには、%1$s以降が必要です</string>
<string name="news_all_news">すべてのニュース</string> <string name="news_all_news">すべてのニュース</string>
<string name="news_stay_in_the_loop">最新情報を入手</string> <string name="news_stay_in_the_loop">最新情報を入手</string>
<string name="nfc_error_unavailable">お使いのデバイスではNFCが使用できません</string> <string name="nfc_error_unavailable">お使いのデバイスではNFCが使用できません</string>
@ -1897,6 +1904,7 @@
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangemは、生成された利息に対して15%サービス手数料も徴収します。</string> <string name="yield_module_fee_policy_tangem_service_fee_title">Tangemは、生成された利息に対して15%サービス手数料も徴収します。</string>
<string name="yield_module_high_fee_error">ネットワーク手数料が下がるか、残高が最低必要額に達すると、資金は自動的にAaveに供給されます。</string> <string name="yield_module_high_fee_error">ネットワーク手数料が下がるか、残高が最低必要額に達すると、資金は自動的にAaveに供給されます。</string>
<string name="yield_module_historical_returns">過去のリターン</string> <string name="yield_module_historical_returns">過去のリターン</string>
<string name="yield_module_main_screen_promo_banner_message">保有資産に年利%1$s%%を適用</string>
<string name="yield_module_main_view_approve_notification_description">利息モードでのトークンの承認が取り消されました。トークンを開いて再度許可してください。</string> <string name="yield_module_main_view_approve_notification_description">利息モードでのトークンの承認が取り消されました。トークンを開いて再度許可してください。</string>
<string name="yield_module_main_view_approve_notification_title">トークンの承認が必要です</string> <string name="yield_module_main_view_approve_notification_title">トークンの承認が必要です</string>
<string name="yield_module_network_fee_unreachable_notification_description">ネットワーク接続を確認してください</string> <string name="yield_module_network_fee_unreachable_notification_description">ネットワーク接続を確認してください</string>
@ -1911,7 +1919,9 @@
<string name="yield_module_promo_screen_self_custodial_title">分散型・自己管理型</string> <string name="yield_module_promo_screen_self_custodial_title">分散型・自己管理型</string>
<string name="yield_module_promo_screen_terms_disclaimer">このサービスを利用することにより、プロバイダー\n%1$sおよび%2$sに同意するものとします。</string> <string name="yield_module_promo_screen_terms_disclaimer">このサービスを利用することにより、プロバイダー\n%1$sおよび%2$sに同意するものとします。</string>
<string name="yield_module_promo_screen_title">Aaveに接続</string> <string name="yield_module_promo_screen_title">Aaveに接続</string>
<string name="yield_module_promo_screen_title_v2">残高に %1$s%% の年利APYを適用</string>
<string name="yield_module_promo_screen_variable_rate_info">Aave %1$s%% • 変動金利</string> <string name="yield_module_promo_screen_variable_rate_info">Aave %1$s%% • 変動金利</string>
<string name="yield_module_promo_screen_variable_rate_info_v2">変動金利</string>
<string name="yield_module_provider">Aave</string> <string name="yield_module_provider">Aave</string>
<string name="yield_module_rate_info_sheet_chart_average">平均%s</string> <string name="yield_module_rate_info_sheet_chart_average">平均%s</string>
<string name="yield_module_rate_info_sheet_chart_title">昨年のリターン</string> <string name="yield_module_rate_info_sheet_chart_title">昨年のリターン</string>
@ -1938,12 +1948,16 @@
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">利息モード</string> <string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">利息モード</string>
<string name="yield_module_token_details_earn_notification_processing">利息モードの有効化</string> <string name="yield_module_token_details_earn_notification_processing">利息モードの有効化</string>
<string name="yield_module_token_details_earn_notification_title">利息モード</string> <string name="yield_module_token_details_earn_notification_title">利息モード</string>
<string name="yield_module_transaction_enter">利息モードが有効になりました</string> <string name="yield_module_transaction_deploy_contract">利息モードコントラクトのデプロイ</string>
<string name="yield_module_transaction_enter">利息モードを有効にする</string>
<string name="yield_module_transaction_enter_subtitle">%1$sがAaveに供給されました</string> <string name="yield_module_transaction_enter_subtitle">%1$sがAaveに供給されました</string>
<string name="yield_module_transaction_exit">利息モードが無効になりました</string> <string name="yield_module_transaction_exit">利息モードを無効にする</string>
<string name="yield_module_transaction_exit_subtitle">%1$sがAaveから引き出されました</string> <string name="yield_module_transaction_exit_subtitle">%1$sがAaveから引き出されました</string>
<string name="yield_module_transaction_initialize">利息モードをセットアップ</string>
<string name="yield_module_transaction_reactivate">利息モードの再有効化</string>
<string name="yield_module_transaction_topup">Aaveへの供給</string> <string name="yield_module_transaction_topup">Aaveへの供給</string>
<string name="yield_module_transaction_topup_subtitle">%1$sがAaveに供給されました</string> <string name="yield_module_transaction_topup_subtitle">%1$sがAaveに供給されました</string>
<string name="yield_module_transaction_withdraw">Aaveから引き出す</string>
<string name="yield_module_transfer_mode_automatic">自動</string> <string name="yield_module_transfer_mode_automatic">自動</string>
<string name="yield_module_unable_to_cover_fee_description">取引のネットワーク手数料をカバーするために、 %1$s %2$sを追加してください。</string> <string name="yield_module_unable_to_cover_fee_description">取引のネットワーク手数料をカバーするために、 %1$s %2$sを追加してください。</string>
<string name="yield_module_unable_to_cover_fee_title">%s手数料を支払えません</string> <string name="yield_module_unable_to_cover_fee_title">%s手数料を支払えません</string>

View file

@ -274,7 +274,7 @@
<string name="common_from">Из</string> <string name="common_from">Из</string>
<string name="common_from_wallet_name">Из %s</string> <string name="common_from_wallet_name">Из %s</string>
<string name="common_generate_addresses">Синхронизировать адреса</string> <string name="common_generate_addresses">Синхронизировать адреса</string>
<string name="common_get_started">Начать зарабатывать</string> <string name="common_get_started">Начать</string>
<string name="common_get_token">Получить токен</string> <string name="common_get_token">Получить токен</string>
<string name="common_go_to_provider">К провайдеру</string> <string name="common_go_to_provider">К провайдеру</string>
<string name="common_go_to_token">Перейти в токен</string> <string name="common_go_to_token">Перейти в токен</string>
@ -576,7 +576,7 @@
<string name="hw_backup_need_title">Сначала завершите создание резервной копии</string> <string name="hw_backup_need_title">Сначала завершите создание резервной копии</string>
<string name="hw_backup_no_backup">Не завершено</string> <string name="hw_backup_no_backup">Не завершено</string>
<string name="hw_backup_section_other_title">Другие способы</string> <string name="hw_backup_section_other_title">Другие способы</string>
<string name="hw_backup_seed_description">Физические устройства, которые надёжно хранят ваш приватный ключ офлайн.</string> <string name="hw_backup_seed_description">Сохраните свою recovery-фразу вручную в надёжном месте. Держите её в секрете, чтобы защитить свои средства.</string>
<string name="hw_backup_seed_title">Фраза восстановления</string> <string name="hw_backup_seed_title">Фраза восстановления</string>
<string name="hw_backup_to_secure_description">Чтобы защитить ваш кошелёк с помощью кода доступа, сначала завершите резервное копирование.</string> <string name="hw_backup_to_secure_description">Чтобы защитить ваш кошелёк с помощью кода доступа, сначала завершите резервное копирование.</string>
<string name="hw_backup_to_upgrade_description">Чтобы улучшить кошелёк до аппаратного, сначала создайте резервную копию.</string> <string name="hw_backup_to_upgrade_description">Чтобы улучшить кошелёк до аппаратного, сначала создайте резервную копию.</string>
@ -1075,7 +1075,7 @@
<string name="save_user_wallet_agreement_notice">Обратите внимание, что для совершения транзакции с вашими средствами по-прежнему потребуется ваша карта или кольцо</string> <string name="save_user_wallet_agreement_notice">Обратите внимание, что для совершения транзакции с вашими средствами по-прежнему потребуется ваша карта или кольцо</string>
<string name="scan_card_settings_button">Сканировать</string> <string name="scan_card_settings_button">Сканировать</string>
<string name="scan_card_settings_message">Отсканируйте карту или кольцо, чтобы изменить ее настройки. Изменения затронут только ту карту или кольцо, которые вы отсканировали, и не повлияют на другие устройства, привязанные к вашему кошельку.</string> <string name="scan_card_settings_message">Отсканируйте карту или кольцо, чтобы изменить ее настройки. Изменения затронут только ту карту или кольцо, которые вы отсканировали, и не повлияют на другие устройства, привязанные к вашему кошельку.</string>
<string name="scan_card_settings_title">Приготовьте свой Tangem!</string> <string name="scan_card_settings_title">Приготовьте устройство Tangem!</string>
<string name="security_alert_title">Уведомление безопасности</string> <string name="security_alert_title">Уведомление безопасности</string>
<string name="seed_warning_no">Нет</string> <string name="seed_warning_no">Нет</string>
<string name="seed_warning_yes">Да</string> <string name="seed_warning_yes">Да</string>
@ -1538,6 +1538,7 @@
<string name="wallet_import_google_drive_description">Восстановите существующий кошелек через Google Drive.</string> <string name="wallet_import_google_drive_description">Восстановите существующий кошелек через Google Drive.</string>
<string name="wallet_import_google_drive_title">Импорт из Google Drive</string> <string name="wallet_import_google_drive_title">Импорт из Google Drive</string>
<string name="wallet_import_navtitle">Добавить существующий кошелек</string> <string name="wallet_import_navtitle">Добавить существующий кошелек</string>
<string name="wallet_import_scan_description">Физические устройства, которые безопасно хранят ваш приватный ключ офлайн.</string>
<string name="wallet_import_scan_title">Сканировать кошелек Tangem</string> <string name="wallet_import_scan_title">Сканировать кошелек Tangem</string>
<string name="wallet_import_seed_description">Импортируйте существующий кошелек через вашу фразу восстановления.</string> <string name="wallet_import_seed_description">Импортируйте существующий кошелек через вашу фразу восстановления.</string>
<string name="wallet_import_seed_navtitle">Имрортировать кошелек</string> <string name="wallet_import_seed_navtitle">Имрортировать кошелек</string>
@ -1854,9 +1855,9 @@
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Режим доходности</string> <string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Режим доходности</string>
<string name="yield_module_token_details_earn_notification_processing">Включение режима доходности</string> <string name="yield_module_token_details_earn_notification_processing">Включение режима доходности</string>
<string name="yield_module_token_details_earn_notification_title">Режим доходности</string> <string name="yield_module_token_details_earn_notification_title">Режим доходности</string>
<string name="yield_module_transaction_enter">Режим доходности включен</string> <string name="yield_module_transaction_enter">Включение режима доходности</string>
<string name="yield_module_transaction_enter_subtitle">%1$s отправлено в Aave</string> <string name="yield_module_transaction_enter_subtitle">%1$s отправлено в Aave</string>
<string name="yield_module_transaction_exit">Режим доходности выключен</string> <string name="yield_module_transaction_exit">Отключение режима доходности</string>
<string name="yield_module_transaction_exit_subtitle">%1$s выведено из Aave</string> <string name="yield_module_transaction_exit_subtitle">%1$s выведено из Aave</string>
<string name="yield_module_transaction_topup">Перевод средств в Aave</string> <string name="yield_module_transaction_topup">Перевод средств в Aave</string>
<string name="yield_module_transaction_topup_subtitle">%1$s отправлено в Aave</string> <string name="yield_module_transaction_topup_subtitle">%1$s отправлено в Aave</string>

View file

@ -3,6 +3,10 @@
<string name="access_code_alert_skip_description">Without an access code, your wallet is not secure.</string> <string name="access_code_alert_skip_description">Without an access code, your wallet is not secure.</string>
<string name="access_code_alert_skip_ok">Skip anyway</string> <string name="access_code_alert_skip_ok">Skip anyway</string>
<string name="access_code_alert_skip_title">Access code not set</string> <string name="access_code_alert_skip_title">Access code not set</string>
<string name="access_code_alert_validation_cancel">Change code</string>
<string name="access_code_alert_validation_description">Your access code will be used to unlock your wallet and to protect access to the assets</string>
<string name="access_code_alert_validation_ok">Use anyway</string>
<string name="access_code_alert_validation_title">This access code can be easily guessed</string>
<string name="access_code_check_title">Enter access code</string> <string name="access_code_check_title">Enter access code</string>
<string name="access_code_check_warining_delete">Wrong access code. Your mobile wallet will be deleted after %s more incorrect attempts.</string> <string name="access_code_check_warining_delete">Wrong access code. Your mobile wallet will be deleted after %s more incorrect attempts.</string>
<string name="access_code_check_warining_lock">Wrong access code. The app will be locked after %s more failed attempts</string> <string name="access_code_check_warining_lock">Wrong access code. The app will be locked after %s more failed attempts</string>
@ -596,7 +600,7 @@
<string name="hw_backup_need_title">Finalize backup first</string> <string name="hw_backup_need_title">Finalize backup first</string>
<string name="hw_backup_no_backup">Incomplete</string> <string name="hw_backup_no_backup">Incomplete</string>
<string name="hw_backup_section_other_title">Other methods</string> <string name="hw_backup_section_other_title">Other methods</string>
<string name="hw_backup_seed_description">Physical devices that securely store your private key offline.</string> <string name="hw_backup_seed_description">Manually save your recovery phrase in a secure place and keep it private to protect your funds.</string>
<string name="hw_backup_seed_title">Recovery phrase</string> <string name="hw_backup_seed_title">Recovery phrase</string>
<string name="hw_backup_to_secure_description">To secure your wallet with a Access Code, complete the backup first.</string> <string name="hw_backup_to_secure_description">To secure your wallet with a Access Code, complete the backup first.</string>
<string name="hw_backup_to_upgrade_description">To upgrade your wallet to hardware, back it up first.</string> <string name="hw_backup_to_upgrade_description">To upgrade your wallet to hardware, back it up first.</string>
@ -788,6 +792,10 @@
<string name="markets_token_details_volume">Volume</string> <string name="markets_token_details_volume">Volume</string>
<string name="markets_tooltip_message">Pull this up or tap the search bar to add tokens directly from the market</string> <string name="markets_tooltip_message">Pull this up or tap the search bar to add tokens directly from the market</string>
<string name="markets_tooltip_title">Add tokens</string> <string name="markets_tooltip_title">Add tokens</string>
<string name="markets_yield_supply_banner_description">Power up your assets while supplying them with instant access. %s</string>
<string name="markets_yield_supply_banner_title">Activate Yield Mode</string>
<string name="mobile_wallet_requires_min_os_warning_body">You must update to %1$s in order to create mobile wallet</string>
<string name="mobile_wallet_requires_min_os_warning_title">Mobile Wallet requires %1$s or later</string>
<string name="news_all_news">All news</string> <string name="news_all_news">All news</string>
<string name="news_stay_in_the_loop">Stay in the loop</string> <string name="news_stay_in_the_loop">Stay in the loop</string>
<string name="nfc_error_unavailable">NFC is not available on your device</string> <string name="nfc_error_unavailable">NFC is not available on your device</string>
@ -1450,6 +1458,8 @@
<string name="tangempay_failed_to_issue_card">Failed to issue card</string> <string name="tangempay_failed_to_issue_card">Failed to issue card</string>
<string name="tangempay_failed_to_issue_card_retry_description">A technical error has occurred, please try again by clicking the button below.</string> <string name="tangempay_failed_to_issue_card_retry_description">A technical error has occurred, please try again by clicking the button below.</string>
<string name="tangempay_failed_to_issue_card_support_description">A technical error has occurred, please contact support.</string> <string name="tangempay_failed_to_issue_card_support_description">A technical error has occurred, please contact support.</string>
<string name="tangempay_get_banner_description">Use your crypto for real world spending. \nIt\'s a payment card unlike any other.</string>
<string name="tangempay_get_tangem_pay">Get Tangem Pay</string>
<string name="tangempay_issue_card_notification_description">It usually takes up to 15 minutes</string> <string name="tangempay_issue_card_notification_description">It usually takes up to 15 minutes</string>
<string name="tangempay_issue_card_notification_title">Setting up your Tangem Card</string> <string name="tangempay_issue_card_notification_title">Setting up your Tangem Card</string>
<string name="tangempay_issuing_your_card">Issuing your card</string> <string name="tangempay_issuing_your_card">Issuing your card</string>
@ -1474,6 +1484,7 @@
<string name="tangempay_service_unavailable_title">Service temporarily unavailable</string> <string name="tangempay_service_unavailable_title">Service temporarily unavailable</string>
<string name="tangempay_service_unreachable_try_later">The service is currently unreachable. Please try again later.</string> <string name="tangempay_service_unreachable_try_later">The service is currently unreachable. Please try again later.</string>
<string name="tangempay_sync_needed">Sync needed</string> <string name="tangempay_sync_needed">Sync needed</string>
<string name="tangempay_tangem_visa_card">Tangem Visa Card</string>
<string name="tangempay_temporarily_unavailable">Tangem Pay is temporarily unavailable</string> <string name="tangempay_temporarily_unavailable">Tangem Pay is temporarily unavailable</string>
<string name="tangempay_title">Tangem Pay</string> <string name="tangempay_title">Tangem Pay</string>
<string name="tangempay_use_tangem_device_to_restore_payment_account">Use your card or ring to restore access to your payment account</string> <string name="tangempay_use_tangem_device_to_restore_payment_account">Use your card or ring to restore access to your payment account</string>
@ -1520,6 +1531,7 @@
<string name="transaction_history_multiple_addresses">Multiple addresses</string> <string name="transaction_history_multiple_addresses">Multiple addresses</string>
<string name="transaction_history_not_supported_description">Transaction history is currently not supported for this blockchain. But don\'t worry, we\'re working on it! In the meantime you can check it in the explorer.</string> <string name="transaction_history_not_supported_description">Transaction history is currently not supported for this blockchain. But don\'t worry, we\'re working on it! In the meantime you can check it in the explorer.</string>
<string name="transaction_history_operation">Operation</string> <string name="transaction_history_operation">Operation</string>
<string name="transaction_history_transaction_for_address">for: %s</string>
<string name="transaction_history_transaction_from_address">from: %s</string> <string name="transaction_history_transaction_from_address">from: %s</string>
<string name="transaction_history_transaction_to_address">to: %s</string> <string name="transaction_history_transaction_to_address">to: %s</string>
<string name="transaction_history_transaction_validator">validator: %s</string> <string name="transaction_history_transaction_validator">validator: %s</string>
@ -1973,6 +1985,7 @@
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangem also takes a 15% service fee on yield generated.</string> <string name="yield_module_fee_policy_tangem_service_fee_title">Tangem also takes a 15% service fee on yield generated.</string>
<string name="yield_module_high_fee_error">Your funds will be automatically supplied to Aave once network fees are lower or your balance meets the minimum required amount.</string> <string name="yield_module_high_fee_error">Your funds will be automatically supplied to Aave once network fees are lower or your balance meets the minimum required amount.</string>
<string name="yield_module_historical_returns">Historical returns</string> <string name="yield_module_historical_returns">Historical returns</string>
<string name="yield_module_main_screen_promo_banner_message">"Enable %1$s%% APY on your balance"</string>
<string name="yield_module_main_view_approve_notification_description">Approval for your token in Yield Mode has been revoked. Open the token to grant permission again.</string> <string name="yield_module_main_view_approve_notification_description">Approval for your token in Yield Mode has been revoked. Open the token to grant permission again.</string>
<string name="yield_module_main_view_approve_notification_title">Token approval needed</string> <string name="yield_module_main_view_approve_notification_title">Token approval needed</string>
<string name="yield_module_network_fee_unreachable_notification_description">Check your network connection</string> <string name="yield_module_network_fee_unreachable_notification_description">Check your network connection</string>
@ -2016,12 +2029,16 @@
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Yield Mode</string> <string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Yield Mode</string>
<string name="yield_module_token_details_earn_notification_processing">Enabling Yield Mode</string> <string name="yield_module_token_details_earn_notification_processing">Enabling Yield Mode</string>
<string name="yield_module_token_details_earn_notification_title">Yield Mode</string> <string name="yield_module_token_details_earn_notification_title">Yield Mode</string>
<string name="yield_module_transaction_enter">Yield Mode enabled</string> <string name="yield_module_transaction_deploy_contract">Yield Mode contract deploy</string>
<string name="yield_module_transaction_enter">Yield Mode enable</string>
<string name="yield_module_transaction_enter_subtitle">%1$s supplied to Aave</string> <string name="yield_module_transaction_enter_subtitle">%1$s supplied to Aave</string>
<string name="yield_module_transaction_exit">Yield Mode disabled</string> <string name="yield_module_transaction_exit">Yield Mode disable</string>
<string name="yield_module_transaction_exit_subtitle">%1$s withdrawn from Aave</string> <string name="yield_module_transaction_exit_subtitle">%1$s withdrawn from Aave</string>
<string name="yield_module_transaction_initialize">Yield Mode initialize</string>
<string name="yield_module_transaction_reactivate">Yield Mode reactivate</string>
<string name="yield_module_transaction_topup">Supply to Aave</string> <string name="yield_module_transaction_topup">Supply to Aave</string>
<string name="yield_module_transaction_topup_subtitle">%1$s supplied to Aave</string> <string name="yield_module_transaction_topup_subtitle">%1$s supplied to Aave</string>
<string name="yield_module_transaction_withdraw">Withdraw from Aave</string>
<string name="yield_module_transfer_mode_automatic">Automatic</string> <string name="yield_module_transfer_mode_automatic">Automatic</string>
<string name="yield_module_unable_to_cover_fee_description">Add some %1$s %2$s to cover the network fee for transactions.</string> <string name="yield_module_unable_to_cover_fee_description">Add some %1$s %2$s to cover the network fee for transactions.</string>
<string name="yield_module_unable_to_cover_fee_title">Unable to cover %s fee</string> <string name="yield_module_unable_to_cover_fee_title">Unable to cover %s fee</string>

View file

@ -19,10 +19,12 @@ import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider import androidx.compose.ui.tooling.preview.datasource.CollectionPreviewParameterProvider
import androidx.compose.ui.unit.dp
import androidx.constraintlayout.compose.ChainStyle import androidx.constraintlayout.compose.ChainStyle
import androidx.constraintlayout.compose.ConstraintLayout import androidx.constraintlayout.compose.ConstraintLayout
import androidx.constraintlayout.compose.Dimension import androidx.constraintlayout.compose.Dimension
import androidx.constraintlayout.compose.Visibility import androidx.constraintlayout.compose.Visibility
import androidx.constraintlayout.compose.atLeast
import com.tangem.core.ui.R import com.tangem.core.ui.R
import com.tangem.core.ui.components.CircleShimmer import com.tangem.core.ui.components.CircleShimmer
import com.tangem.core.ui.components.RectangleShimmer import com.tangem.core.ui.components.RectangleShimmer
@ -94,7 +96,7 @@ fun Transaction(state: TransactionState, isBalanceHidden: Boolean, modifier: Mod
bottom.linkTo(subtitleItem.top) bottom.linkTo(subtitleItem.top)
start.linkTo(iconItem.end) start.linkTo(iconItem.end)
end.linkTo(amountItem.start) end.linkTo(amountItem.start)
width = Dimension.fillToConstraints width = Dimension.fillToConstraints.atLeast(50.dp)
}, },
) )
@ -122,7 +124,6 @@ fun Transaction(state: TransactionState, isBalanceHidden: Boolean, modifier: Mod
visibility = state.isGoneIf { amount.isEmpty() } visibility = state.isGoneIf { amount.isEmpty() }
top.linkTo(parent.top) top.linkTo(parent.top)
bottom.linkTo(timestampItem.top) bottom.linkTo(timestampItem.top)
start.linkTo(titleItem.end)
end.linkTo(parent.end) end.linkTo(parent.end)
width = Dimension.fillToConstraints width = Dimension.fillToConstraints
}, },
@ -436,7 +437,7 @@ private class TransactionItemStateProvider : CollectionPreviewParameterProvider<
), ),
TransactionState.Content( TransactionState.Content(
txHash = UUID.randomUUID().toString(), txHash = UUID.randomUUID().toString(),
amount = "0.625 USDT", amount = "0.62521313 USDT",
time = "€0.50", time = "€0.50",
status = Status.Confirmed, status = Status.Confirmed,
direction = Direction.OUTGOING, direction = Direction.OUTGOING,

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M11.799,8.899C12.047,8.469 12.597,8.322 13.028,8.57C14.276,9.291 15.268,10.385 15.863,11.698C16.458,13.011 16.627,14.478 16.345,15.892C16.064,17.306 15.347,18.597 14.295,19.582C13.242,20.567 11.908,21.199 10.478,21.387C9.049,21.575 7.596,21.31 6.325,20.631C5.054,19.951 4.027,18.891 3.389,17.598C2.752,16.305 2.535,14.844 2.77,13.422C3.005,12 3.68,10.686 4.699,9.667C5.05,9.316 5.62,9.316 5.971,9.667C6.323,10.019 6.323,10.588 5.971,10.939C5.218,11.693 4.719,12.664 4.546,13.715C4.372,14.766 4.532,15.845 5.004,16.801C5.475,17.756 6.234,18.541 7.173,19.043C8.113,19.545 9.187,19.741 10.244,19.602C11.3,19.462 12.286,18.996 13.064,18.268C13.842,17.539 14.372,16.585 14.58,15.54C14.788,14.495 14.663,13.411 14.223,12.441C13.783,11.47 13.05,10.662 12.128,10.129C11.697,9.88 11.55,9.33 11.799,8.899ZM13.766,2.615C15.196,2.427 16.648,2.692 17.92,3.371C19.191,4.051 20.218,5.111 20.856,6.404C21.494,7.697 21.71,9.158 21.475,10.58C21.24,12.002 20.566,13.316 19.546,14.335C19.195,14.686 18.625,14.686 18.273,14.335C17.922,13.984 17.922,13.414 18.273,13.063C19.027,12.309 19.525,11.338 19.699,10.287C19.872,9.236 19.712,8.156 19.241,7.2C18.77,6.245 18.011,5.46 17.071,4.958C16.131,4.456 15.058,4.26 14.002,4.399C12.945,4.539 11.959,5.005 11.181,5.733C10.404,6.462 9.874,7.416 9.666,8.461C9.458,9.506 9.582,10.59 10.022,11.561C10.462,12.531 11.194,13.34 12.117,13.873C12.547,14.122 12.695,14.672 12.447,15.103C12.198,15.533 11.648,15.68 11.217,15.432C9.969,14.711 8.977,13.617 8.382,12.304C7.788,10.991 7.619,9.524 7.9,8.11C8.181,6.696 8.899,5.406 9.951,4.42C11.003,3.435 12.337,2.804 13.766,2.615Z"
android:fillColor="#1E1E1E"/>
</vector>

View file

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M5.91,11.001C5.191,11.745 4.714,12.691 4.546,13.714C4.372,14.764 4.533,15.844 5.004,16.799C5.475,17.755 6.234,18.539 7.173,19.042C8.113,19.544 9.188,19.739 10.244,19.6C11.3,19.461 12.286,18.994 13.064,18.266C13.083,18.249 13.1,18.229 13.119,18.212L14.392,19.485C14.36,19.517 14.328,19.549 14.295,19.581C13.242,20.566 11.907,21.197 10.478,21.385C9.049,21.573 7.596,21.309 6.325,20.629C5.054,19.95 4.027,18.889 3.389,17.596C2.752,16.303 2.535,14.843 2.77,13.42C3,12.027 3.652,10.738 4.637,9.728L5.91,11.001Z"
android:fillColor="#1E1E1E"/>
<path
android:pathData="M4.164,4.164C4.515,3.812 5.086,3.812 5.437,4.164L19.837,18.564C20.188,18.916 20.188,19.485 19.837,19.837C19.485,20.188 18.916,20.188 18.564,19.837L4.164,5.437C3.812,5.086 3.812,4.515 4.164,4.164Z"
android:fillColor="#1E1E1E"/>
<path
android:pathData="M13.766,2.614C15.195,2.426 16.648,2.69 17.92,3.37C19.191,4.049 20.219,5.11 20.856,6.403C21.493,7.696 21.71,9.157 21.475,10.579C21.24,12.001 20.566,13.314 19.546,14.334C19.526,14.354 19.503,14.373 19.481,14.391L18.215,13.125C18.233,13.103 18.253,13.082 18.273,13.061C19.027,12.308 19.525,11.337 19.699,10.286C19.872,9.235 19.712,8.154 19.241,7.199C18.77,6.244 18.01,5.459 17.071,4.957C16.131,4.455 15.058,4.259 14.002,4.398C12.945,4.537 11.959,5.004 11.181,5.732C11.12,5.79 11.059,5.848 11.001,5.909L9.728,4.636C9.801,4.562 9.875,4.49 9.951,4.419C11.003,3.433 12.337,2.802 13.766,2.614Z"
android:fillColor="#1E1E1E"/>
</vector>

View file

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,7.6C14.43,7.6 16.4,9.57 16.4,12C16.4,14.43 14.43,16.4 12,16.4C9.57,16.4 7.6,14.43 7.6,12C7.6,9.57 9.57,7.6 12,7.6ZM12,9.4C10.564,9.4 9.4,10.564 9.4,12C9.4,13.436 10.564,14.6 12,14.6C13.436,14.6 14.6,13.436 14.6,12C14.6,10.564 13.436,9.4 12,9.4Z"
android:fillColor="#1E1E1E"
android:fillType="evenOdd"/>
<path
android:pathData="M13.938,2.1C14.721,2.1 15.374,2.099 15.911,2.151C16.468,2.206 16.972,2.324 17.451,2.6C17.931,2.876 18.285,3.252 18.611,3.706C18.926,4.144 19.253,4.708 19.646,5.385L21.569,8.7C21.964,9.38 22.292,9.946 22.517,10.439C22.749,10.949 22.9,11.445 22.9,12C22.9,12.555 22.749,13.051 22.517,13.561C22.292,14.054 21.964,14.62 21.569,15.3L19.646,18.615C19.253,19.292 18.926,19.856 18.611,20.294C18.285,20.748 17.931,21.125 17.451,21.4C16.972,21.676 16.468,21.794 15.911,21.849C15.374,21.901 14.721,21.9 13.938,21.9H10.063C9.279,21.9 8.626,21.901 8.089,21.849C7.532,21.794 7.028,21.676 6.549,21.4C6.069,21.125 5.715,20.748 5.389,20.294C5.074,19.856 4.747,19.292 4.354,18.615L2.431,15.3C2.036,14.62 1.708,14.054 1.483,13.561C1.251,13.051 1.1,12.555 1.1,12C1.1,11.445 1.251,10.949 1.483,10.439C1.708,9.946 2.036,9.38 2.431,8.7L4.354,5.385C4.747,4.708 5.074,4.144 5.389,3.706C5.715,3.252 6.069,2.876 6.549,2.6C7.028,2.324 7.532,2.206 8.089,2.151C8.626,2.099 9.279,2.1 10.063,2.1H13.938ZM10.063,3.9C9.244,3.9 8.694,3.901 8.265,3.943C7.855,3.984 7.628,4.056 7.447,4.16C7.267,4.264 7.089,4.424 6.85,4.757C6.598,5.106 6.321,5.581 5.911,6.288L3.988,9.604C3.576,10.314 3.3,10.79 3.121,11.184C2.95,11.559 2.9,11.792 2.9,12C2.9,12.208 2.95,12.441 3.121,12.816C3.3,13.21 3.576,13.686 3.988,14.396L5.911,17.712C6.321,18.419 6.598,18.894 6.85,19.243C7.089,19.576 7.267,19.736 7.447,19.84C7.628,19.944 7.855,20.016 8.265,20.057C8.694,20.099 9.244,20.1 10.063,20.1H13.938C14.756,20.1 15.306,20.099 15.735,20.057C16.145,20.016 16.372,19.944 16.553,19.84C16.733,19.736 16.911,19.576 17.15,19.243C17.402,18.894 17.678,18.419 18.089,17.712L20.012,14.396C20.424,13.686 20.7,13.21 20.879,12.816C21.05,12.441 21.1,12.208 21.1,12C21.1,11.792 21.05,11.559 20.879,11.184C20.7,10.79 20.424,10.314 20.012,9.604L18.089,6.288C17.678,5.581 17.402,5.106 17.15,4.757C16.911,4.424 16.733,4.264 16.553,4.16C16.372,4.056 16.145,3.984 15.735,3.943C15.306,3.901 14.756,3.9 13.938,3.9H10.063Z"
android:fillColor="#1E1E1E"
android:fillType="evenOdd"/>
</vector>

View file

@ -24,7 +24,7 @@ internal class SdkTransactionHistoryItemConverter(
SdkTransactionHistoryItem.TransactionStatus.Failed -> TxInfo.TransactionStatus.Failed SdkTransactionHistoryItem.TransactionStatus.Failed -> TxInfo.TransactionStatus.Failed
SdkTransactionHistoryItem.TransactionStatus.Unconfirmed -> TxInfo.TransactionStatus.Unconfirmed SdkTransactionHistoryItem.TransactionStatus.Unconfirmed -> TxInfo.TransactionStatus.Unconfirmed
}, },
type = typeConverter.convert(value.type), type = typeConverter.convert(value.type to value.destinationType.toDomain()),
amount = requireNotNull(value.amount.value) { "Transaction amount value must not be null" }, amount = requireNotNull(value.amount.value) { "Transaction amount value must not be null" },
) )

View file

@ -1,21 +1,27 @@
package com.tangem.data.walletmanager.utils package com.tangem.data.walletmanager.utils
import com.tangem.blockchain.transactionhistory.models.TransactionHistoryItem.TransactionType import com.tangem.blockchain.transactionhistory.models.TransactionHistoryItem.TransactionType
import com.tangem.blockchain.yieldsupply.providers.ethereum.yield.EthereumYieldSupplyEnterCallData
import com.tangem.blockchain.yieldsupply.providers.ethereum.yield.EthereumYieldSupplyExitCallData
import com.tangem.blockchain.yieldsupply.providers.ethereum.yield.EthereumYieldSupplyInitTokenCallData
import com.tangem.blockchain.yieldsupply.providers.ethereum.yield.EthereumYieldSupplyReactivateTokenCallData
import com.tangem.domain.models.network.TxInfo import com.tangem.domain.models.network.TxInfo
import com.tangem.domain.walletmanager.model.SmartContractMethod import com.tangem.domain.walletmanager.model.SmartContractMethod
import com.tangem.utils.converter.Converter import com.tangem.utils.converter.Converter
internal class SdkTransactionTypeConverter( internal class SdkTransactionTypeConverter(
private val smartContractMethods: Map<String, SmartContractMethod>, private val smartContractMethods: Map<String, SmartContractMethod>,
) : Converter<TransactionType, TxInfo.TransactionType> { ) : Converter<Pair<TransactionType, TxInfo.DestinationType>, TxInfo.TransactionType> {
override fun convert(value: TransactionType): TxInfo.TransactionType { override fun convert(value: Pair<TransactionType, TxInfo.DestinationType>): TxInfo.TransactionType {
return when (value) { val (type, destination) = value
return when (type) {
is TransactionType.ContractMethod -> { is TransactionType.ContractMethod -> {
getTransactionType(methodName = smartContractMethods[value.id]?.name) getTransactionType(methodName = smartContractMethods[type.id]?.name, type.callData, destination)
} }
is TransactionType.ContractMethodName -> { is TransactionType.ContractMethodName -> {
getTransactionType(methodName = value.name) getTransactionType(methodName = type.name, type.callData, destination)
} }
is TransactionType.Transfer -> { is TransactionType.Transfer -> {
TxInfo.TransactionType.Transfer TxInfo.TransactionType.Transfer
@ -27,7 +33,7 @@ internal class SdkTransactionTypeConverter(
TxInfo.TransactionType.Staking.Unstake TxInfo.TransactionType.Staking.Unstake
} }
is TransactionType.TronStakingTransactionType.VoteWitnessContract -> { is TransactionType.TronStakingTransactionType.VoteWitnessContract -> {
TxInfo.TransactionType.Staking.Vote(value.validatorAddress) TxInfo.TransactionType.Staking.Vote(type.validatorAddress)
} }
is TransactionType.TronStakingTransactionType.WithdrawBalanceContract -> { is TransactionType.TronStakingTransactionType.WithdrawBalanceContract -> {
TxInfo.TransactionType.Staking.ClaimRewards TxInfo.TransactionType.Staking.ClaimRewards
@ -38,7 +44,12 @@ internal class SdkTransactionTypeConverter(
} }
} }
private fun getTransactionType(methodName: String?): TxInfo.TransactionType { @Suppress("CyclomaticComplexMethod")
private fun getTransactionType(
methodName: String?,
callData: String?,
destination: TxInfo.DestinationType,
): TxInfo.TransactionType {
return when (methodName) { return when (methodName) {
"transfer" -> TxInfo.TransactionType.Transfer "transfer" -> TxInfo.TransactionType.Transfer
"approve" -> TxInfo.TransactionType.Approve "approve" -> TxInfo.TransactionType.Approve
@ -59,11 +70,33 @@ internal class SdkTransactionTypeConverter(
"withdrawRewardsPOL", "withdrawRewardsPOL",
-> TxInfo.TransactionType.Staking.ClaimRewards -> TxInfo.TransactionType.Staking.ClaimRewards
"redelegate" -> TxInfo.TransactionType.Staking.Restake "redelegate" -> TxInfo.TransactionType.Staking.Restake
"supplyEnter" -> TxInfo.TransactionType.YieldSupply.Enter "yieldSend" -> TxInfo.TransactionType.YieldSupply.Send
"supplyExit" -> TxInfo.TransactionType.YieldSupply.Exit "enterProtocolByOwner" -> callData?.let { data ->
TxInfo.TransactionType.YieldSupply.Enter(
EthereumYieldSupplyEnterCallData.decode(data)?.tokenContractAddress.orEmpty(),
)
}
"withdrawAndDeactivate" -> callData?.let { data ->
TxInfo.TransactionType.YieldSupply.Exit(
EthereumYieldSupplyExitCallData.decode(data)?.tokenContractAddress.orEmpty(),
)
}
"deployYieldModule" -> TxInfo.TransactionType.YieldSupply.DeployContract(
(destination as? TxInfo.DestinationType.Single)?.addressType?.address.orEmpty(),
)
"initYieldToken" -> callData?.let { data ->
TxInfo.TransactionType.YieldSupply.InitializeToken(
EthereumYieldSupplyInitTokenCallData.decode(data)?.tokenContractAddress.orEmpty(),
)
}
"reactivateToken" -> callData?.let { data ->
TxInfo.TransactionType.YieldSupply.ReactivateToken(
EthereumYieldSupplyReactivateTokenCallData.decode(data)?.tokenContractAddress.orEmpty(),
)
}
"supplyTopUp" -> TxInfo.TransactionType.YieldSupply.Topup "supplyTopUp" -> TxInfo.TransactionType.YieldSupply.Topup
null -> TxInfo.TransactionType.UnknownOperation null -> TxInfo.TransactionType.UnknownOperation
else -> TxInfo.TransactionType.Operation(name = methodName.replaceFirstChar { it.titlecase() }) else -> TxInfo.TransactionType.Operation(name = methodName.replaceFirstChar { it.titlecase() })
} } ?: TxInfo.TransactionType.Operation(name = methodName?.replaceFirstChar { it.titlecase() }.orEmpty())
} }
} }

View file

@ -45,7 +45,7 @@ internal class TransactionDataToTxHistoryItemConverter(
TransactionStatus.Confirmed -> TxInfo.TransactionStatus.Confirmed TransactionStatus.Confirmed -> TxInfo.TransactionStatus.Confirmed
TransactionStatus.Unconfirmed -> TxInfo.TransactionStatus.Unconfirmed TransactionStatus.Unconfirmed -> TxInfo.TransactionStatus.Unconfirmed
}, },
type = getTransactionType(value.extras), type = getTransactionType(value),
amount = amount, amount = amount,
) )
} }
@ -99,16 +99,25 @@ internal class TransactionDataToTxHistoryItemConverter(
) )
} }
private fun getTransactionType(extras: TransactionExtras?): TxInfo.TransactionType { private fun getTransactionType(transactionData: TransactionData.Uncompiled?): TxInfo.TransactionType {
return when (extras) { return when (val extras = transactionData?.extras) {
is EthereumTransactionExtras -> { is EthereumTransactionExtras -> {
when (extras.callData) { when (val callData = extras.callData) {
is EthereumYieldSupplyDeployCallData, is EthereumYieldSupplyDeployCallData -> TxInfo.TransactionType.YieldSupply.DeployContract(
is EthereumYieldSupplyReactivateTokenCallData, transactionData.destinationAddress,
is EthereumYieldSupplyInitTokenCallData, )
is EthereumYieldSupplyEnterCallData, is EthereumYieldSupplyReactivateTokenCallData -> TxInfo.TransactionType.YieldSupply.ReactivateToken(
-> TxInfo.TransactionType.YieldSupply.Enter callData.tokenContractAddress,
is EthereumYieldSupplyExitCallData -> TxInfo.TransactionType.YieldSupply.Exit )
is EthereumYieldSupplyInitTokenCallData -> TxInfo.TransactionType.YieldSupply.InitializeToken(
callData.tokenContractAddress,
)
is EthereumYieldSupplyEnterCallData -> TxInfo.TransactionType.YieldSupply.Enter(
callData.tokenContractAddress,
)
is EthereumYieldSupplyExitCallData -> TxInfo.TransactionType.YieldSupply.Exit(
callData.tokenContractAddress,
)
is ApprovalERC20TokenCallData -> TxInfo.TransactionType.Approve is ApprovalERC20TokenCallData -> TxInfo.TransactionType.Approve
else -> TxInfo.TransactionType.Transfer else -> TxInfo.TransactionType.Transfer
} }

View file

@ -174,10 +174,10 @@ internal class DefaultYieldSupplyRepository(
null null
} }
private fun Set<TxInfo>.hasYieldEnterTransactions(yieldAddress: String) = any { private fun Set<TxInfo>.hasYieldEnterTransactions(yieldAddress: String) = any { txInfo ->
it.type == TxInfo.TransactionType.YieldSupply.Enter || txInfo.type is TxInfo.TransactionType.YieldSupply.Enter ||
it.type == TxInfo.TransactionType.Approve && txInfo.type == TxInfo.TransactionType.Approve &&
(it.interactionAddressType as? TxInfo.InteractionAddressType.Contract)?.address == yieldAddress (txInfo.interactionAddressType as? TxInfo.InteractionAddressType.Contract)?.address == yieldAddress
} }
private fun Set<TxInfo>.hasYieldExitTransactions() = any { private fun Set<TxInfo>.hasYieldExitTransactions() = any {

View file

@ -205,32 +205,32 @@
"0xcbeda14c": { "0xcbeda14c": {
"info": "yieldModule", "info": "yieldModule",
"source": "https://github.com/tangem/tangem-yield-module-contracts/", "source": "https://github.com/tangem/tangem-yield-module-contracts/",
"name": "supply" "name": "deployYieldModule"
}, },
"0x79be55f7": { "0x79be55f7": {
"info": "yieldModule", "info": "yieldModule",
"source": "https://github.com/tangem/tangem-yield-module-contracts/", "source": "https://github.com/tangem/tangem-yield-module-contracts/",
"name": "supplyEnter" "name": "enterProtocolByOwner"
}, },
"0xc65e6dcf": { "0xc65e6dcf": {
"info": "yieldModule", "info": "yieldModule",
"source": "https://github.com/tangem/tangem-yield-module-contracts/", "source": "https://github.com/tangem/tangem-yield-module-contracts/",
"name": "supplyExit" "name": "withdrawAndDeactivate"
}, },
"0xebd4b81c": { "0xebd4b81c": {
"info": "yieldModule", "info": "yieldModule",
"source": "https://github.com/tangem/tangem-yield-module-contracts/", "source": "https://github.com/tangem/tangem-yield-module-contracts/",
"name": "supply" "name": "initYieldToken"
}, },
"0xc478e956": { "0xc478e956": {
"info": "yieldModule", "info": "yieldModule",
"source": "https://github.com/tangem/tangem-yield-module-contracts/", "source": "https://github.com/tangem/tangem-yield-module-contracts/",
"name": "supply" "name": "reactivateToken"
}, },
"0x0779afe6": { "0x0779afe6": {
"info": "yieldModule", "info": "yieldModule",
"source": "https://github.com/tangem/tangem-yield-module-contracts/", "source": "https://github.com/tangem/tangem-yield-module-contracts/",
"name": "transfer" "name": "yieldSend"
}, },
"0xb9de6a93": { "0xb9de6a93": {
"info": "yieldModule", "info": "yieldModule",

View file

@ -110,14 +110,32 @@ data class TxInfo(
@Serializable @Serializable
sealed interface YieldSupply : TransactionType { sealed interface YieldSupply : TransactionType {
@Serializable val address: String?
data object Enter : YieldSupply
@Serializable @Serializable
data object Exit : YieldSupply data class Enter(override val address: String) : YieldSupply
@Serializable @Serializable
data object Topup : YieldSupply data class Exit(override val address: String) : YieldSupply
@Serializable
data object Topup : YieldSupply {
override val address: String? = null
}
@Serializable
data object Send : YieldSupply {
override val address: String? = null
}
@Serializable
data class DeployContract(override val address: String) : YieldSupply
@Serializable
data class ReactivateToken(override val address: String) : YieldSupply
@Serializable
data class InitializeToken(override val address: String) : YieldSupply
} }
@Serializable @Serializable

View file

@ -41,7 +41,9 @@ internal class TxHistoryItemToTransactionStateConverter(
R.drawable.ic_close_24 R.drawable.ic_close_24
} else { } else {
when (type) { when (type) {
is TransactionType.Approve -> R.drawable.ic_doc_24 is TransactionType.YieldSupply.DeployContract,
is TransactionType.Approve,
-> R.drawable.ic_doc_24
is TransactionType.Staking.Stake, is TransactionType.Staking.Stake,
is TransactionType.Staking.Vote, is TransactionType.Staking.Vote,
is TransactionType.Staking.Restake, is TransactionType.Staking.Restake,
@ -51,11 +53,16 @@ internal class TxHistoryItemToTransactionStateConverter(
is TransactionType.Staking.Unstake, is TransactionType.Staking.Unstake,
is TransactionType.Staking.Withdraw, is TransactionType.Staking.Withdraw,
-> R.drawable.ic_transaction_history_unstaking_24 -> R.drawable.ic_transaction_history_unstaking_24
is TransactionType.YieldSupply.Enter -> R.drawable.ic_connect_24
is TransactionType.YieldSupply.InitializeToken -> R.drawable.ic_gear_24
is TransactionType.YieldSupply.ReactivateToken -> R.drawable.ic_refresh_24
is TransactionType.YieldSupply.Exit -> R.drawable.ic_disconnect_24
is TransactionType.Operation, is TransactionType.Operation,
is TransactionType.Swap, is TransactionType.Swap,
is TransactionType.Transfer, is TransactionType.Transfer,
is TransactionType.YieldSupply,
is TransactionType.UnknownOperation, is TransactionType.UnknownOperation,
TransactionType.YieldSupply.Send,
TransactionType.YieldSupply.Topup,
-> if (isOutgoing) R.drawable.ic_arrow_up_24 else R.drawable.ic_arrow_down_24 -> if (isOutgoing) R.drawable.ic_arrow_up_24 else R.drawable.ic_arrow_down_24
} }
} }
@ -66,32 +73,76 @@ internal class TxHistoryItemToTransactionStateConverter(
is TransactionType.Operation -> stringReference(type.name) is TransactionType.Operation -> stringReference(type.name)
is TransactionType.Swap -> resourceReference(R.string.common_swap) is TransactionType.Swap -> resourceReference(R.string.common_swap)
is TransactionType.Transfer -> resourceReference(R.string.common_transfer) is TransactionType.Transfer -> resourceReference(R.string.common_transfer)
is TransactionType.YieldSupply.Enter -> resourceReference(R.string.yield_module_transaction_enter)
is TransactionType.YieldSupply.Exit -> resourceReference(R.string.yield_module_transaction_exit)
is TransactionType.YieldSupply.Topup -> resourceReference(R.string.yield_module_transaction_topup)
is TransactionType.Staking.Stake -> resourceReference(R.string.common_stake) is TransactionType.Staking.Stake -> resourceReference(R.string.common_stake)
is TransactionType.Staking.Unstake -> resourceReference(R.string.common_unstake) is TransactionType.Staking.Unstake -> resourceReference(R.string.common_unstake)
is TransactionType.Staking.Vote -> resourceReference(R.string.staking_vote) is TransactionType.Staking.Vote -> resourceReference(R.string.staking_vote)
is TransactionType.Staking.ClaimRewards -> resourceReference(R.string.common_claim_rewards) is TransactionType.Staking.ClaimRewards -> resourceReference(R.string.common_claim_rewards)
is TransactionType.Staking.Withdraw -> resourceReference(R.string.staking_withdraw) is TransactionType.Staking.Withdraw -> resourceReference(R.string.staking_withdraw)
is TransactionType.Staking.Restake -> resourceReference(R.string.staking_restake) is TransactionType.Staking.Restake -> resourceReference(R.string.staking_restake)
is TransactionType.YieldSupply -> when (type) {
is TransactionType.YieldSupply.Enter -> resourceReference(R.string.yield_module_transaction_enter)
is TransactionType.YieldSupply.Exit -> resourceReference(R.string.yield_module_transaction_exit)
TransactionType.YieldSupply.Topup -> resourceReference(R.string.yield_module_transaction_topup)
TransactionType.YieldSupply.Send -> if (isOutgoing) {
resourceReference(R.string.common_transfer)
} else {
resourceReference(R.string.yield_module_transaction_withdraw)
}
is TransactionType.YieldSupply.DeployContract -> resourceReference(
R.string
.yield_module_transaction_deploy_contract,
)
is TransactionType.YieldSupply.InitializeToken -> resourceReference(
R.string
.yield_module_transaction_initialize,
)
is TransactionType.YieldSupply.ReactivateToken -> resourceReference(
R.string
.yield_module_transaction_reactivate,
)
}
is TransactionType.UnknownOperation -> resourceReference(R.string.transaction_history_operation) is TransactionType.UnknownOperation -> resourceReference(R.string.transaction_history_operation)
} }
private fun TxInfo.extractSubtitle(): TextReference { private fun TxInfo.extractSubtitle(): TextReference {
return when (this.type) { return when (val type = this.type) {
is TransactionType.YieldSupply.Enter -> { is TransactionType.YieldSupply -> if (currency is CryptoCurrency.Coin) {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) } if (type == TransactionType.YieldSupply.Send) {
resourceReference(R.string.yield_module_transaction_enter_subtitle, wrappedList(amount)) extractSubtitleByAddressType()
} } else {
is TransactionType.YieldSupply.Topup, resourceReference(
-> { R.string.transaction_history_transaction_for_address,
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) } wrappedList(type.address?.toBriefAddressFormat().orEmpty()),
resourceReference(R.string.yield_module_transaction_topup_subtitle, wrappedList(amount)) )
} }
is TransactionType.YieldSupply.Exit -> { } else {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) } when (type) {
resourceReference(R.string.yield_module_transaction_exit_subtitle, wrappedList(amount)) is TransactionType.YieldSupply.Enter -> {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(R.string.yield_module_transaction_enter_subtitle, wrappedList(amount))
}
TransactionType.YieldSupply.Topup -> {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(R.string.yield_module_transaction_topup_subtitle, wrappedList(amount))
}
is TransactionType.YieldSupply.Exit -> {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(R.string.yield_module_transaction_exit_subtitle, wrappedList(amount))
}
TransactionType.YieldSupply.Send -> {
if (isOutgoing) {
extractSubtitleByAddressType()
} else {
val amount =
amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(
R.string.yield_module_transaction_exit_subtitle,
wrappedList(amount),
)
}
}
else -> extractSubtitleByAddressType()
}
} }
else -> extractSubtitleByAddressType() else -> extractSubtitleByAddressType()
} }
@ -133,14 +184,21 @@ internal class TxHistoryItemToTransactionStateConverter(
@Suppress("ComplexCondition") @Suppress("ComplexCondition")
private fun TxInfo.getAmount(): String { private fun TxInfo.getAmount(): String {
if (type is TransactionType.Staking.Vote || when (type) {
type == TransactionType.Staking.ClaimRewards || is TransactionType.Staking.Vote,
type == TransactionType.Staking.Withdraw || TransactionType.Staking.ClaimRewards,
type == TransactionType.YieldSupply.Enter || TransactionType.Staking.Withdraw,
type == TransactionType.YieldSupply.Exit || -> return ""
type == TransactionType.YieldSupply.Topup
) { is TransactionType.YieldSupply -> if (currency is CryptoCurrency.Token) {
return "" when (type) {
TransactionType.YieldSupply.Send -> if (!isOutgoing) {
return ""
}
else -> return ""
}
}
else -> Unit
} }
val prefix = when { val prefix = when {
status == TxInfo.TransactionStatus.Failed -> "" status == TxInfo.TransactionStatus.Failed -> ""

View file

@ -3,6 +3,7 @@ package com.tangem.feature.wallet.presentation.wallet.state.transformers
import com.tangem.blockchain.common.Blockchain import com.tangem.blockchain.common.Blockchain
import com.tangem.core.ui.components.transactions.state.TxHistoryState import com.tangem.core.ui.components.transactions.state.TxHistoryState
import com.tangem.domain.card.common.util.cardTypesResolver import com.tangem.domain.card.common.util.cardTypesResolver
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.network.TxInfo import com.tangem.domain.models.network.TxInfo
import com.tangem.domain.txhistory.models.TxHistoryStateError import com.tangem.domain.txhistory.models.TxHistoryStateError
import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWallet
@ -17,6 +18,7 @@ internal class SetTxHistoryCountErrorTransformer(
private val error: TxHistoryStateError, private val error: TxHistoryStateError,
private val pendingTransactions: Set<TxInfo>, private val pendingTransactions: Set<TxInfo>,
private val clickIntents: WalletClickIntents, private val clickIntents: WalletClickIntents,
private val currency: CryptoCurrency,
) : WalletStateTransformer(userWallet.walletId) { ) : WalletStateTransformer(userWallet.walletId) {
private val txHistoryItemConverter by lazy { private val txHistoryItemConverter by lazy {
@ -26,6 +28,7 @@ internal class SetTxHistoryCountErrorTransformer(
} }
TxHistoryItemStateConverter( TxHistoryItemStateConverter(
currency = currency,
symbol = blockchain.currency, symbol = blockchain.currency,
decimals = blockchain.decimals(), decimals = blockchain.decimals(),
clickIntents = clickIntents, clickIntents = clickIntents,

View file

@ -9,6 +9,7 @@ import com.tangem.core.ui.extensions.wrappedList
import com.tangem.core.ui.format.bigdecimal.crypto import com.tangem.core.ui.format.bigdecimal.crypto
import com.tangem.core.ui.format.bigdecimal.format import com.tangem.core.ui.format.bigdecimal.format
import com.tangem.core.ui.utils.toTimeFormat import com.tangem.core.ui.utils.toTimeFormat
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.network.TxInfo import com.tangem.domain.models.network.TxInfo
import com.tangem.domain.models.network.TxInfo.TransactionStatus import com.tangem.domain.models.network.TxInfo.TransactionStatus
import com.tangem.domain.models.network.TxInfo.TransactionType import com.tangem.domain.models.network.TxInfo.TransactionType
@ -20,6 +21,7 @@ import com.tangem.utils.converter.Converter
import com.tangem.utils.toBriefAddressFormat import com.tangem.utils.toBriefAddressFormat
internal class TxHistoryItemStateConverter( internal class TxHistoryItemStateConverter(
private val currency: CryptoCurrency,
private val symbol: String, private val symbol: String,
private val decimals: Int, private val decimals: Int,
private val clickIntents: WalletClickIntents, private val clickIntents: WalletClickIntents,
@ -49,7 +51,9 @@ internal class TxHistoryItemStateConverter(
R.drawable.ic_close_24 R.drawable.ic_close_24
} else { } else {
when (type) { when (type) {
is TransactionType.Approve -> R.drawable.ic_doc_24 is TransactionType.YieldSupply.DeployContract,
is TransactionType.Approve,
-> R.drawable.ic_doc_24
is TransactionType.Staking.Stake, is TransactionType.Staking.Stake,
is TransactionType.Staking.Vote, is TransactionType.Staking.Vote,
is TransactionType.Staking.Restake, is TransactionType.Staking.Restake,
@ -59,11 +63,16 @@ internal class TxHistoryItemStateConverter(
is TransactionType.Staking.Unstake, is TransactionType.Staking.Unstake,
is TransactionType.Staking.Withdraw, is TransactionType.Staking.Withdraw,
-> R.drawable.ic_transaction_history_unstaking_24 -> R.drawable.ic_transaction_history_unstaking_24
is TransactionType.YieldSupply.Enter -> R.drawable.ic_connect_24
is TransactionType.YieldSupply.InitializeToken -> R.drawable.ic_gear_24
is TransactionType.YieldSupply.ReactivateToken -> R.drawable.ic_refresh_24
is TransactionType.YieldSupply.Exit -> R.drawable.ic_disconnect_24
is TransactionType.Operation, is TransactionType.Operation,
is TransactionType.Swap, is TransactionType.Swap,
is TransactionType.Transfer, is TransactionType.Transfer,
is TransactionType.YieldSupply,
is TransactionType.UnknownOperation, is TransactionType.UnknownOperation,
TransactionType.YieldSupply.Send,
TransactionType.YieldSupply.Topup,
-> if (isOutgoing) R.drawable.ic_arrow_up_24 else R.drawable.ic_arrow_down_24 -> if (isOutgoing) R.drawable.ic_arrow_up_24 else R.drawable.ic_arrow_down_24
} }
} }
@ -74,32 +83,81 @@ internal class TxHistoryItemStateConverter(
is TransactionType.Operation -> stringReference(type.name) is TransactionType.Operation -> stringReference(type.name)
is TransactionType.Swap -> resourceReference(R.string.common_swap) is TransactionType.Swap -> resourceReference(R.string.common_swap)
is TransactionType.Transfer -> resourceReference(R.string.common_transfer) is TransactionType.Transfer -> resourceReference(R.string.common_transfer)
is TransactionType.YieldSupply.Enter -> resourceReference(R.string.yield_module_transaction_enter)
is TransactionType.YieldSupply.Exit -> resourceReference(R.string.yield_module_transaction_exit)
is TransactionType.YieldSupply.Topup -> resourceReference(R.string.yield_module_transaction_topup)
is TransactionType.Staking.Stake -> resourceReference(R.string.common_stake) is TransactionType.Staking.Stake -> resourceReference(R.string.common_stake)
is TransactionType.Staking.Unstake -> resourceReference(R.string.common_unstake) is TransactionType.Staking.Unstake -> resourceReference(R.string.common_unstake)
is TransactionType.Staking.Vote -> resourceReference(R.string.staking_vote) is TransactionType.Staking.Vote -> resourceReference(R.string.staking_vote)
is TransactionType.Staking.ClaimRewards -> resourceReference(R.string.common_claim_rewards) is TransactionType.Staking.ClaimRewards -> resourceReference(R.string.common_claim_rewards)
is TransactionType.Staking.Withdraw -> resourceReference(R.string.staking_withdraw) is TransactionType.Staking.Withdraw -> resourceReference(R.string.staking_withdraw)
is TransactionType.Staking.Restake -> resourceReference(R.string.staking_restake) is TransactionType.Staking.Restake -> resourceReference(R.string.staking_restake)
is TransactionType.YieldSupply -> when (type) {
is TransactionType.YieldSupply.Enter -> resourceReference(R.string.yield_module_transaction_enter)
is TransactionType.YieldSupply.Exit -> resourceReference(R.string.yield_module_transaction_exit)
TransactionType.YieldSupply.Topup -> resourceReference(R.string.yield_module_transaction_topup)
TransactionType.YieldSupply.Send -> if (isOutgoing) {
resourceReference(R.string.common_transfer)
} else {
resourceReference(R.string.yield_module_transaction_withdraw)
}
is TransactionType.YieldSupply.DeployContract -> resourceReference(
R.string
.yield_module_transaction_deploy_contract,
)
is TransactionType.YieldSupply.InitializeToken -> resourceReference(
R.string
.yield_module_transaction_initialize,
)
is TransactionType.YieldSupply.ReactivateToken -> resourceReference(
R.string
.yield_module_transaction_reactivate,
)
}
is TransactionType.UnknownOperation -> resourceReference(R.string.transaction_history_operation) is TransactionType.UnknownOperation -> resourceReference(R.string.transaction_history_operation)
} }
private fun TxInfo.extractSubtitle(): TextReference { private fun TxInfo.extractSubtitle(): TextReference {
return when (this.type) { return when (val type = this.type) {
is TransactionType.YieldSupply.Enter -> { is TransactionType.YieldSupply -> if (currency is CryptoCurrency.Coin) {
val amount = amount.format { crypto(symbol = symbol, decimals = decimals) } resourceReference(
resourceReference(R.string.yield_module_transaction_enter_subtitle, wrappedList(amount)) R.string.transaction_history_transaction_for_address,
} wrappedList(type.address?.toBriefAddressFormat().orEmpty()),
is TransactionType.YieldSupply.Topup, )
-> { } else {
val amount = amount.format { crypto(symbol = symbol, decimals = decimals) } when (type) {
resourceReference(R.string.yield_module_transaction_topup_subtitle, wrappedList(amount)) is TransactionType.YieldSupply.Enter -> {
} val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
is TransactionType.YieldSupply.Exit -> { resourceReference(
val amount = amount.format { crypto(symbol = symbol, decimals = decimals) } R.string.yield_module_transaction_enter_subtitle,
resourceReference(R.string.yield_module_transaction_exit_subtitle, wrappedList(amount)) wrappedList(amount),
)
}
TransactionType.YieldSupply.Topup -> {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(
R.string.yield_module_transaction_topup_subtitle,
wrappedList(amount),
)
}
TransactionType.YieldSupply.Send -> {
if (isOutgoing) {
extractSubtitleByAddressType()
} else {
val amount =
amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(
R.string.yield_module_transaction_exit_subtitle,
wrappedList(amount),
)
}
}
is TransactionType.YieldSupply.Exit -> {
val amount = amount.format { crypto(symbol = currency.symbol, decimals = currency.decimals) }
resourceReference(
R.string.yield_module_transaction_exit_subtitle,
wrappedList(amount),
)
}
else -> extractSubtitleByAddressType()
}
} }
else -> extractSubtitleByAddressType() else -> extractSubtitleByAddressType()
} }
@ -147,14 +205,18 @@ internal class TxHistoryItemStateConverter(
@Suppress("ComplexCondition") @Suppress("ComplexCondition")
private fun TxInfo.getAmount(): String { private fun TxInfo.getAmount(): String {
if (type is TransactionType.Staking.Vote || when (type) {
type == TransactionType.Staking.ClaimRewards || is TransactionType.Staking.Vote,
type == TransactionType.Staking.Withdraw || TransactionType.Staking.ClaimRewards,
type == TransactionType.YieldSupply.Enter || TransactionType.Staking.Withdraw,
type == TransactionType.YieldSupply.Exit || -> return ""
type == TransactionType.YieldSupply.Topup
) { is TransactionType.YieldSupply -> {
return "" if (currency is CryptoCurrency.Token && type == TransactionType.YieldSupply.Send && !isOutgoing) {
return ""
}
}
else -> Unit
} }
val prefix = when { val prefix = when {
status == TransactionStatus.Failed -> "" status == TransactionStatus.Failed -> ""

View file

@ -5,6 +5,7 @@ import androidx.paging.cachedIn
import androidx.paging.map import androidx.paging.map
import arrow.core.Either import arrow.core.Either
import com.tangem.domain.card.common.util.cardTypesResolver import com.tangem.domain.card.common.util.cardTypesResolver
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.currency.CryptoCurrencyStatus
import com.tangem.domain.models.network.TxInfo import com.tangem.domain.models.network.TxInfo
import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWallet
@ -58,7 +59,7 @@ internal class TxHistorySubscriber(
refresh = isRefresh, refresh = isRefresh,
).map { it.cachedIn(coroutineScope) } ).map { it.cachedIn(coroutineScope) }
setLoadedTxHistoryState(maybeTxHistoryItems) setLoadedTxHistoryState(maybeTxHistoryItems, status.currency)
} }
} }
} }
@ -67,18 +68,19 @@ internal class TxHistorySubscriber(
private fun setLoadingTxHistoryState(maybeTxHistoryItemCount: MaybeTxHistoryCount, status: CryptoCurrencyStatus) { private fun setLoadingTxHistoryState(maybeTxHistoryItemCount: MaybeTxHistoryCount, status: CryptoCurrencyStatus) {
stateHolder.update( stateHolder.update(
maybeTxHistoryItemCount.fold( maybeTxHistoryItemCount.fold(
ifLeft = { ifLeft = { error ->
SetTxHistoryCountErrorTransformer( SetTxHistoryCountErrorTransformer(
userWallet = userWallet, userWallet = userWallet,
error = it, error = error,
pendingTransactions = status.value.pendingTransactions, pendingTransactions = status.value.pendingTransactions,
currency = status.currency,
clickIntents = clickIntents, clickIntents = clickIntents,
) )
}, },
ifRight = { ifRight = { txCount ->
SetTxHistoryCountTransformer( SetTxHistoryCountTransformer(
userWalletId = userWallet.walletId, userWalletId = userWallet.walletId,
transactionsCount = it, transactionsCount = txCount,
clickIntents = clickIntents, clickIntents = clickIntents,
) )
}, },
@ -86,7 +88,7 @@ internal class TxHistorySubscriber(
) )
} }
private fun setLoadedTxHistoryState(maybeTxHistoryItems: MaybeTxHistoryItems) { private fun setLoadedTxHistoryState(maybeTxHistoryItems: MaybeTxHistoryItems, currency: CryptoCurrency) {
stateHolder.update( stateHolder.update(
maybeTxHistoryItems.fold( maybeTxHistoryItems.fold(
ifLeft = { ifLeft = {
@ -102,6 +104,7 @@ internal class TxHistorySubscriber(
symbol = blockchain.currency, symbol = blockchain.currency,
decimals = blockchain.decimals(), decimals = blockchain.decimals(),
clickIntents = clickIntents, clickIntents = clickIntents,
currency = currency,
) )
SetTxHistoryItemsTransformer( SetTxHistoryItemsTransformer(

View file

@ -5,6 +5,7 @@ import androidx.paging.cachedIn
import androidx.paging.map import androidx.paging.map
import com.tangem.domain.account.status.supplier.SingleAccountStatusListSupplier import com.tangem.domain.account.status.supplier.SingleAccountStatusListSupplier
import com.tangem.domain.card.common.util.cardTypesResolver import com.tangem.domain.card.common.util.cardTypesResolver
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.currency.CryptoCurrencyStatus import com.tangem.domain.models.currency.CryptoCurrencyStatus
import com.tangem.domain.models.network.TxInfo import com.tangem.domain.models.network.TxInfo
import com.tangem.domain.models.wallet.UserWallet import com.tangem.domain.models.wallet.UserWallet
@ -51,7 +52,7 @@ internal class TxHistorySubscriberV2(
refresh = isRefresh, refresh = isRefresh,
).map { it.cachedIn(coroutineScope) } ).map { it.cachedIn(coroutineScope) }
setLoadedTxHistoryState(maybeTxHistoryItems) setLoadedTxHistoryState(maybeTxHistoryItems, currency = status.currency)
} }
} }
} }
@ -60,18 +61,19 @@ internal class TxHistorySubscriberV2(
private fun setLoadingTxHistoryState(maybeTxHistoryItemCount: MaybeTxHistoryCount, status: CryptoCurrencyStatus) { private fun setLoadingTxHistoryState(maybeTxHistoryItemCount: MaybeTxHistoryCount, status: CryptoCurrencyStatus) {
stateController.update( stateController.update(
maybeTxHistoryItemCount.fold( maybeTxHistoryItemCount.fold(
ifLeft = { ifLeft = { error ->
SetTxHistoryCountErrorTransformer( SetTxHistoryCountErrorTransformer(
userWallet = userWallet, userWallet = userWallet,
error = it, error = error,
pendingTransactions = status.value.pendingTransactions, pendingTransactions = status.value.pendingTransactions,
clickIntents = clickIntents, clickIntents = clickIntents,
currency = status.currency,
) )
}, },
ifRight = { ifRight = { txCount ->
SetTxHistoryCountTransformer( SetTxHistoryCountTransformer(
userWalletId = userWallet.walletId, userWalletId = userWallet.walletId,
transactionsCount = it, transactionsCount = txCount,
clickIntents = clickIntents, clickIntents = clickIntents,
) )
}, },
@ -79,7 +81,7 @@ internal class TxHistorySubscriberV2(
) )
} }
private fun setLoadedTxHistoryState(maybeTxHistoryItems: MaybeTxHistoryItems) { private fun setLoadedTxHistoryState(maybeTxHistoryItems: MaybeTxHistoryItems, currency: CryptoCurrency) {
stateController.update( stateController.update(
maybeTxHistoryItems.fold( maybeTxHistoryItems.fold(
ifLeft = { ifLeft = {
@ -92,6 +94,7 @@ internal class TxHistorySubscriberV2(
ifRight = { itemsFlow -> ifRight = { itemsFlow ->
val blockchain = userWallet.scanResponse.cardTypesResolver.getBlockchain() val blockchain = userWallet.scanResponse.cardTypesResolver.getBlockchain()
val itemConverter = TxHistoryItemStateConverter( val itemConverter = TxHistoryItemStateConverter(
currency = currency,
symbol = blockchain.currency, symbol = blockchain.currency,
decimals = blockchain.decimals(), decimals = blockchain.decimals(),
clickIntents = clickIntents, clickIntents = clickIntents,

View file

@ -5,7 +5,7 @@
# https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/tangem-sdk-android/
# https://github.com/tangem/vico # https://github.com/tangem/vico
tangemBlockchainSdk = "releases-5.31-1314" tangemBlockchainSdk = "releases-5.31.1-1316"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "releases-5.31-569" tangemCardSdk = "releases-5.31-569"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^