Updated on 2026-08-14
This commit is contained in:
parent
bd33dadcfe
commit
5a62376bfa
18 changed files with 194 additions and 163 deletions
|
|
@ -1679,6 +1679,7 @@
|
|||
<string name="yield_module_deposit_error_notification_title">Der erhaltene Betrag %1$s %2$s wurde nicht auf Aave eingezahlt.</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_title">Aktuelle Gebühr</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_title">Maximale Gebühr</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">Dies ist die niedrigste Einzahlung, die an Aave gesendet werden kann. Um Einzahlungen rentabel zu halten, verarbeiten wir sie nicht, wenn die Netzwerkgebühren 4 % des Betrags übersteigen.</string>
|
||||
<string name="yield_module_fee_policy_sheet_title">Gebührenpolitik</string>
|
||||
<string name="yield_module_high_fee_error">Die Netzwerkgebühr ist derzeit zu hoch. Warte, bis sie unter Dein Limit fällt.</string>
|
||||
<string name="yield_module_historical_returns">Historische Renditen</string>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
<string name="account_details_archive_description">このアカウントをアーカイブしますが、いつでも復元できます。</string>
|
||||
<string name="account_details_title">アカウント</string>
|
||||
<string name="account_edit_success_message">アカウントが保存されました</string>
|
||||
<string name="account_for_rewards">報酬用のアカウント</string>
|
||||
<string name="account_form_account_index">アカウント番号%s — アドレス導出に使用されます。</string>
|
||||
<string name="account_form_create_button">アカウントを追加</string>
|
||||
<string name="account_form_edit_button">保存</string>
|
||||
|
|
@ -545,6 +546,7 @@
|
|||
<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_to_upgrade_description">ウォレットをハードウェアにアップグレードするには、まずバックアップしてください。</string>
|
||||
<string name="hw_create_keys_title">鍵はアプリに保存されます</string>
|
||||
<string name="hw_create_seed_title">シードフレーズのバックアップ</string>
|
||||
<string name="hw_create_title">モバイルウォレットを作成する</string>
|
||||
|
|
@ -969,6 +971,10 @@
|
|||
<string name="reset_card_to_factory_condition_2">このカードを使用して、現在のウォレットの他のカードのアクセスコードを回復させられないことを認識しています。</string>
|
||||
<string name="reset_card_with_backup_to_factory_message">工場出荷時設定にリセットすると、選択したカードやリングからウォレットが完全に削除されます。現在のウォレットを復元したり、カードやリングを使用してアクセスコードを復元することはできません。</string>
|
||||
<string name="reset_card_without_backup_to_factory_message">工場出荷時の状態にリセットすると、選択したカードやリングからウォレットが完全に削除され、アプリから削除されます。現在のウォレットを復元することはできません。</string>
|
||||
<string name="reset_cards_dialog_complete_description">すべてのTangemデバイスがリセットされました。</string>
|
||||
<string name="reset_cards_dialog_first_description">アクティベーション処理中に問題が発生しました。カードを1枚ずつリセットしてください。</string>
|
||||
<string name="reset_cards_dialog_first_title">カード認証に失敗しました</string>
|
||||
<string name="reset_cards_dialog_next_device_description">続行するには次のデバイスをリセットしてください</string>
|
||||
<string name="ring_promo_text">Tangem Ringユーザーは、11/15日までChangelly経由でスワップを3回手数料ゼロで行えます!</string>
|
||||
<string name="ring_promo_title">今すぐ手数料0% でスワップしましょう!</string>
|
||||
<string name="save_user_wallet_agreement_access_description">アプリにログインして、カードまたはリングをスキャンせずに残高を確認できます</string>
|
||||
|
|
@ -1298,6 +1304,8 @@
|
|||
<string name="tangem_pay_transaction_fee_notification_text">この手数料は、送金処理にかかるコストをカバーするためのものです。</string>
|
||||
<string name="tangem_pay_withdrawal">出金</string>
|
||||
<string name="tangempay_card_details_change_pin">PINを変更する</string>
|
||||
<string name="tangempay_card_details_change_pin_success_description">カードは支払いの準備が整いました。</string>
|
||||
<string name="tangempay_card_details_change_pin_success_title">PINコードを作成しました</string>
|
||||
<string name="tangempay_card_details_error_text">データの読み込みに失敗しました。しばらくしてからもう一度お試しください。</string>
|
||||
<string name="tangempay_card_details_freeze_card">カードの一時停止</string>
|
||||
<string name="tangempay_card_details_hide_text">非表示</string>
|
||||
|
|
@ -1728,8 +1736,9 @@
|
|||
<string name="xtz_withdrawal_message_ignore">いいえ、すべて送信します</string>
|
||||
<string name="xtz_withdrawal_message_reduce">%s XTZを減らす</string>
|
||||
<string name="xtz_withdrawal_message_warning">次回ウォレットにチャージするときに手数料の増加を避けるには、金額を%s XTZ減らしてください。</string>
|
||||
<string name="yield_module_alert_description">資産残高に関するテキスト [プレースホルダー]</string>
|
||||
<string name="yield_module_alert_title">%sはAaveに預けられています</string>
|
||||
<string name="yield_module_alert_description">あなたの資金は現在Aaveプロトコルに供給されていますが、いつでも管理できます。</string>
|
||||
<string name="yield_module_alert_title">%sはAaveに供給されています</string>
|
||||
<string name="yield_module_amount_not_transfered_to_aave_title">受け取った金額%1$s %2$sはAaveに入金されませんでした。</string>
|
||||
<string name="yield_module_approve_needed_notification_cta">承認する</string>
|
||||
<string name="yield_module_approve_needed_notification_description">前回の承認に問題があったため、新しい承認が必要です。手続き方法を選択してください。</string>
|
||||
<string name="yield_module_approve_needed_notification_title">承認が必要</string>
|
||||
|
|
@ -1743,60 +1752,62 @@
|
|||
<string name="yield_module_earn_badge">年利%1$s%%</string>
|
||||
<string name="yield_module_earn_sheet_available_title">利用可能</string>
|
||||
<string name="yield_module_earn_sheet_current_apy_title">現在のAPY</string>
|
||||
<string name="yield_module_earn_sheet_fee_description">貸付のために入金する際は、残高から%1$s以下のネットワーク手数料が差し引かれます。</string>
|
||||
<string name="yield_module_earn_sheet_high_fee_description">現在、ネットワーク手数料が高すぎるため貸付を実行できません。手数料が%1$s以下に下がり次第、資金が供給されます。</string>
|
||||
<string name="yield_module_earn_sheet_my_funds_title">私の資金</string>
|
||||
<string name="yield_module_earn_sheet_provider_description">あなたの%1$sはAaveに預けられ、利息が付きます。あなたは%2$sトークンを保有しており、これは残高を表し、時間の経過とともに増加します。入金すると、資金はAaveに預け入れられ、取引手数料を差し引いた利息が付きます。</string>
|
||||
<string name="yield_module_earn_sheet_provider_description">あなたの%1$sはAaveに預けられ、利息が付きます。あなたは%2$sトークンを保有しており、これは残高を表し、時間の経過とともに増加します。入金すると資金はAaveに供給され、取引手数料を差し引いた利息が付きます。</string>
|
||||
<string name="yield_module_earn_sheet_title">利回りを得る</string>
|
||||
<string name="yield_module_earn_sheet_total_earnings_title">総収益</string>
|
||||
<string name="yield_module_earn_sheet_transfers_title">Aaveへの送金</string>
|
||||
<string name="yield_module_explore_sheet_explore_aave_button_title">Aaveの詳細を見る</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_note">これは%sの現在の供給手数料です。実際のコストは受取画面に表示されます。</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_note">これは%sの現在の供給手数料です。実際のコストはアクティベーションタブに表示されます。</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_title">現在の手数料</string>
|
||||
<string name="yield_module_fee_policy_sheet_description">今後の%sの入金はすべて、取引手数料が差し引かれて自動的にAaveに供給されます。</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_note">ネットワーク手数料が上限手数料を超えた場合、手数料が下がるまで取引は成立しません。この制限は後で変更できます。</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_title">最大手数料</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">取引手数料は入金額の4%未満である必要があります。残高がこの条件を満たすのに十分な金額になった場合にのみ、TangemはAaveに資金を送ります。</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">これがAaveに供給できる最小金額です。利回りモードの収益性を保つため、ネットワーク手数料が金額の4%を超える場合は資産を供給しません。</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_title">最低入金額</string>
|
||||
<string name="yield_module_fee_policy_sheet_title">手数料ポリシー</string>
|
||||
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangemはまた、得られた利回りに対して3%のサービス手数料を差し引きます。</string>
|
||||
<string name="yield_module_high_fee_error">ネットワーク手数料が現在高すぎます。設定した上限を下回るまで待機しています。</string>
|
||||
<string name="yield_module_high_fee_error">ネットワーク手数料が下がるか、残高が最低必要額に達すると、資金は自動的にAaveに供給されます。</string>
|
||||
<string name="yield_module_historical_returns">過去のリターン</string>
|
||||
<string name="yield_module_main_view_approve_notification_description">ここに説明を入力してください。1〜3行が理想的です。[プレースホルダー]</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_title">ネットワーク手数料についての情報にアクセスできません</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_subtitle">アカウントへの入金はすべて自動的にAaveに貸し出されます。</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_title">残高は自動的に計算されます</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_title">Aaveへの自動送金</string>
|
||||
<string name="yield_module_promo_screen_cash_out_subtitle">いつでも、即座に資金を送信、交換、売却できます。</string>
|
||||
<string name="yield_module_promo_screen_cash_out_title">いつでも資金にアクセス可能</string>
|
||||
<string name="yield_module_promo_screen_how_it_works_button_title">使い方</string>
|
||||
<string name="yield_module_promo_screen_self_custodial_subtitle">Aaveは、総額819億ドル以上の資産を管理する分散型プロトコルです。</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_variable_rate_info">Aave %1$s%% • 変動金利</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_title">昨年のリターン</string>
|
||||
<string name="yield_module_rate_info_sheet_description">現在の金利は常に変動し、リアルタイムの需要と供給に基づいて、AAVEオンチェーンスマートコントラクトによって自動的に計算されます。</string>
|
||||
<string name="yield_module_rate_info_sheet_description">現在の金利は常に変動し、リアルタイムの需要と供給に基づいて、Aaveオンチェーンスマートコントラクトによって自動的に計算されます。</string>
|
||||
<string name="yield_module_rate_info_sheet_powered_by">提供</string>
|
||||
<string name="yield_module_rate_info_sheet_title">金利は変動します</string>
|
||||
<string name="yield_module_receive_sheet_description">入金すると、資金は自動的にAaveに送金され、利息が付き始めます。取引手数料として%s相当の少額の手数料が差し引かれます。</string>
|
||||
<string name="yield_module_receive_sheet_description">入金すると、資金は自動的にAaveに送金され、利息が付き始めます。%sが取引手数料として差し引かれます。</string>
|
||||
<string name="yield_module_start_earning">資産を供給する</string>
|
||||
<string name="yield_module_start_earning_sheet_description">%sはAaveに供給され、すぐに利用可能になります</string>
|
||||
<string name="yield_module_start_earning_sheet_description">%sはAaveに供給されますが、管理可能な状態のままになります。</string>
|
||||
<string name="yield_module_start_earning_sheet_fee_policy">手数料ポリシーを見る</string>
|
||||
<string name="yield_module_start_earning_sheet_next_deposits">次回以降の入金は自動的にAaveに供給されます。</string>
|
||||
<string name="yield_module_start_earning_sheet_next_deposits">次回の入金は自動的にAaveに供給されます。</string>
|
||||
<string name="yield_module_status_active">アクティブ</string>
|
||||
<string name="yield_module_status_paused">停止中</string>
|
||||
<string name="yield_module_stop_earning">収益を停止する</string>
|
||||
<string name="yield_module_stop_earning_sheet_description">オフにすると、Aaveから資金が引き出され、ウォレットの%sに戻され、報酬の獲得が停止されます。</string>
|
||||
<string name="yield_module_stop_earning">利回りモードを無効にする</string>
|
||||
<string name="yield_module_stop_earning_sheet_description">これをオフにすると、Aave からウォレットの %s に資金が引き出され、報酬の獲得が停止します。</string>
|
||||
<string name="yield_module_stop_earning_sheet_fee_note">出金金額からネットワーク手数料が差し引かれます。</string>
|
||||
<string name="yield_module_supply_apr">供給APY</string>
|
||||
<string name="yield_module_token_details_earn_notification_apy">APY</string>
|
||||
<string name="yield_module_token_details_earn_notification_description">あなたの資産を眠らせない — 残高を運用して利息を得ましょう。</string>
|
||||
<string name="yield_module_token_details_earn_notification_description">自分で管理しながら、資金に働かせましょう。</string>
|
||||
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_subtitle">利息は自動的に発生します</string>
|
||||
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_title">Aaveの利回り</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_title">残高を活用</string>
|
||||
<string name="yield_module_token_details_earn_notification_title">資産を有効活用しましょう</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_title">%s手数料を支払えません</string>
|
||||
|
|
|
|||
|
|
@ -1569,6 +1569,7 @@
|
|||
<string name="xtz_withdrawal_message_ignore">Нет, отправить все</string>
|
||||
<string name="xtz_withdrawal_message_reduce">Уменьшить на %s XTZ</string>
|
||||
<string name="xtz_withdrawal_message_warning">Чтобы не платить повышенную комиссию при следующем пополнении кошелька, уменьшите сумму на %s XTZ</string>
|
||||
<string name="yield_module_alert_description">Ваши средства сейчас размещены в протоколе AAVE, но вы можете управлять ими в любое время.</string>
|
||||
<string name="yield_module_alert_title">Ваш %s внесён в Aave</string>
|
||||
<string name="yield_module_approve_needed_notification_cta">Выдать разрешение</string>
|
||||
<string name="yield_module_approve_needed_notification_description">Что-то пошло не так с вашим предыдущим разрешением, поэтому требуется новое. Выберите, как хотите продолжить.</string>
|
||||
|
|
@ -1592,7 +1593,7 @@
|
|||
<string name="yield_module_fee_policy_sheet_description">Все следующие пополнения %s автоматически поступят в Aave с удержанием комиссии за транзакцию.</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_note">Если комиссия сети превысит максимальный лимит, транзакция не будет выполнена до тех пор, пока комиссия не снизится. Вы сможете изменить этот лимит позже.</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_title">Максимальная комиссия</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">Комиссия за транзакцию должна быть ниже 4% от суммы депозита. Tangem переведёт средства в Aave, как только это условие будет выполнено.</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">Это минимальный депозит, который можно отправить в Aave. Чтобы депозиты оставались прибыльными, мы не обрабатываем их, когда комиссия сети превышает 4% от суммы.</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_title">Минимальный депозит</string>
|
||||
<string name="yield_module_fee_policy_sheet_title">Политика комиссий</string>
|
||||
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangem взимает комиссию за обслуживание в размере 3% от полученного дохода.</string>
|
||||
|
|
@ -1602,7 +1603,7 @@
|
|||
<string name="yield_module_network_fee_unreachable_notification_description">Проверьте ваше интернет соединение</string>
|
||||
<string name="yield_module_network_fee_unreachable_notification_title">Информация о комиссии недоступна</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_subtitle">Каждое пополнение вашего адреса автоматически будет отправляться в Aave.</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_title">Ваш баланс работает автоматически</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_title">Автоперевод в AAVE</string>
|
||||
<string name="yield_module_promo_screen_cash_out_subtitle">Отправляйте, обменивайте или продавайте свои средства мгновенно, когда захотите.</string>
|
||||
<string name="yield_module_promo_screen_cash_out_title">Мгновенный вывод средств</string>
|
||||
<string name="yield_module_promo_screen_how_it_works_button_title">Как это работает?</string>
|
||||
|
|
|
|||
|
|
@ -1430,4 +1430,5 @@
|
|||
<string name="xtz_withdrawal_message_ignore">Ні, відправити все</string>
|
||||
<string name="xtz_withdrawal_message_reduce">Зменшити на %s XTZ</string>
|
||||
<string name="xtz_withdrawal_message_warning">Щоб не платити підвищену комісію при наступному поповненні гаманця, зменште суму на %s XTZ</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">Це найменший депозит, який можна надіслати в Aave. Щоб депозити залишалися прибутковими, ми не обробляємо їх, коли комісія мережі перевищує 4% від суми.</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
<string name="account_archived_recover_error_title">Can\'t recover account</string>
|
||||
<string name="account_archived_title">Archived</string>
|
||||
<string name="account_could_not_archive">We couldn’t archive account. Please try again later.</string>
|
||||
<string name="account_could_not_archive_referral_program_message">This account participates in the referral program.</string>
|
||||
<string name="account_could_not_archive_referral_program_title">This account cannot be archived.</string>
|
||||
<string name="account_could_not_create">We couldn’t create account. Please try again later.</string>
|
||||
<string name="account_create_success_message">Account created</string>
|
||||
<string name="account_details_archive">Archive account</string>
|
||||
|
|
@ -42,6 +44,8 @@
|
|||
<string name="account_form_title_edit">Edit account</string>
|
||||
<string name="account_label_tokens_info">%1$s in %2$s</string>
|
||||
<string name="account_main_account_title">Main account</string>
|
||||
<string name="account_recover_limit_dialog_description">You have already exceeded the limit of %1$s active accounts. Archive one to recover</string>
|
||||
<string name="account_recover_limit_dialog_title">Can’t recover account</string>
|
||||
<string name="account_recover_success_message">Account recovered</string>
|
||||
<string name="account_reorder_description">Long tap on an account to reorder accounts</string>
|
||||
<string name="account_unsaved_dialog_action_first">Keep Editing</string>
|
||||
|
|
@ -555,6 +559,7 @@
|
|||
<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_title">Recovery phrase</string>
|
||||
<string name="hw_backup_to_upgrade_description">To upgrade your wallet to hardware, back it up first.</string>
|
||||
<string name="hw_create_keys_description">Your private keys are securely encrypted and stored on your phone</string>
|
||||
<string name="hw_create_keys_title">Keys are stored in the app</string>
|
||||
<string name="hw_create_seed_description">Create or restore your wallet using a recovery phrase — your built-in backup.</string>
|
||||
|
|
@ -993,7 +998,7 @@
|
|||
<string name="reset_card_with_backup_to_factory_message">Factory Reset will completely delete the wallet from the selected card or ring. You will not be able to restore the current wallet or use the card or ring to recover the access code.</string>
|
||||
<string name="reset_card_without_backup_to_factory_message">Factory Reset will completely delete the wallet from the selected card or ring and remove it from the app. You will not be able to restore the current wallet.</string>
|
||||
<string name="reset_cards_dialog_complete_description">All Tangem devices have been reset.</string>
|
||||
<string name="reset_cards_dialog_first_description">Something went wrong with activation process. Please reset cards one by one.</string>
|
||||
<string name="reset_cards_dialog_first_description">Something went wrong with the activation process. Please reset the cards one by one.</string>
|
||||
<string name="reset_cards_dialog_first_title">Card verification failed</string>
|
||||
<string name="reset_cards_dialog_next_device_description">Please reset the next device to continue</string>
|
||||
<string name="ring_promo_text">Ring owners get 3 commission-free swaps on Changelly until 15.11!</string>
|
||||
|
|
@ -1326,6 +1331,8 @@
|
|||
<string name="tangem_pay_transaction_fee_notification_text">This fee goes to cover the cost of handling your transfer.</string>
|
||||
<string name="tangem_pay_withdrawal">Withdrawal</string>
|
||||
<string name="tangempay_card_details_change_pin">Change PIN</string>
|
||||
<string name="tangempay_card_details_change_pin_success_description">The card is fully ready for payments.</string>
|
||||
<string name="tangempay_card_details_change_pin_success_title">PIN code created</string>
|
||||
<string name="tangempay_card_details_error_text">Failed to load data. Try again later.</string>
|
||||
<string name="tangempay_card_details_freeze_card">Freeze Card</string>
|
||||
<string name="tangempay_card_details_hide_text">Hide</string>
|
||||
|
|
@ -1805,9 +1812,9 @@
|
|||
<string name="xtz_withdrawal_message_ignore">No, send all</string>
|
||||
<string name="xtz_withdrawal_message_reduce">Reduce by %s XTZ</string>
|
||||
<string name="xtz_withdrawal_message_warning">To avoid paying an increased commission the next time you top up your wallet, reduce the amount by %s XTZ</string>
|
||||
<string name="yield_module_alert_description">Text about your money in balance [PLACEHOLDER]</string>
|
||||
<string name="yield_module_alert_title">Your %s is deposited in Aave</string>
|
||||
<string name="yield_module_amount_not_transfered_to_aave_title">The amount received, %1$s %2$s was not deposited to Aave.</string>
|
||||
<string name="yield_module_alert_description">Your funds are currently supplied to the Aave protocol, but you can manage them at any time.</string>
|
||||
<string name="yield_module_alert_title">Your %s is supplied to Aave</string>
|
||||
<string name="yield_module_amount_not_transfered_to_aave_title">Supplying %1$s %2$s to Aave is pending</string>
|
||||
<string name="yield_module_approve_needed_notification_cta">Give Approve</string>
|
||||
<string name="yield_module_approve_needed_notification_description">Something went wrong with your previous approval, so we need a new one. Choose how you’d like to proceed.</string>
|
||||
<string name="yield_module_approve_needed_notification_title">Approve needed</string>
|
||||
|
|
@ -1817,66 +1824,67 @@
|
|||
<string name="yield_module_balance_info_sheet_subtitle">Text about your money in balance [PLACEHOLDER]</string>
|
||||
<string name="yield_module_balance_info_sheet_title">Your %s is deposited in Aave</string>
|
||||
<string name="yield_module_chart_loading_error">Unable to load chart...</string>
|
||||
<string name="yield_module_deposit_error_notification_title">The amount received, %1$s %2$s was not deposited to Aave.</string>
|
||||
<string name="yield_module_deposit_error_notification_title">The amount received, %1$s %2$s was not supplied to Aave.</string>
|
||||
<string name="yield_module_earn_badge">APY %1$s%%</string>
|
||||
<string name="yield_module_earn_sheet_available_title">Available</string>
|
||||
<string name="yield_module_earn_sheet_current_apy_title">Current APY</string>
|
||||
<string name="yield_module_earn_sheet_fee_description">When topping up for lending, a network fee will be deducted from the amount — never more than %1$s</string>
|
||||
<string name="yield_module_earn_sheet_fee_description">When topping up for lending, a network fee not exceeding %1$s will be deducted from the balance.</string>
|
||||
<string name="yield_module_earn_sheet_high_fee_description">The network fee is currently too high to execute lending. Funds will be supplied once it drops to %1$s or below. </string>
|
||||
<string name="yield_module_earn_sheet_my_funds_title">My funds</string>
|
||||
<string name="yield_module_earn_sheet_provider_description">Your %1$s is now deposited in Aave and earning interest. You hold a%2$s token, which represents your balance and grows over time. When you top up, funds go to Aave to earn interest, minus a transaction fee.</string>
|
||||
<string name="yield_module_earn_sheet_provider_description">Your %1$s is now deposited in Aave and earning interest. You hold a%2$s token, which represents your balance and grows over time. When you deposit more funds, they\'ll be supplied to Aave to earn interest, minus a transaction fee.</string>
|
||||
<string name="yield_module_earn_sheet_title">Earn</string>
|
||||
<string name="yield_module_earn_sheet_total_earnings_title">Total earnings</string>
|
||||
<string name="yield_module_earn_sheet_transfers_title">Transfers to Aave</string>
|
||||
<string name="yield_module_explore_sheet_explore_aave_button_title">Explore Aave</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_note">This is the current supply fee on %s. The live cost will be shown on the Receive Screen.</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_note">This is the current supply fee on %s. The actual cost will be shown on the activation tab.</string>
|
||||
<string name="yield_module_fee_policy_sheet_current_fee_title">Current fee</string>
|
||||
<string name="yield_module_fee_policy_sheet_description">All future %s top-ups will be supplied to Aave automatically, with the transaction fee deducted.</string>
|
||||
<string name="yield_module_fee_policy_sheet_description">All future %s deposits will be supplied to Aave automatically, with the transaction fee deducted.</string>
|
||||
<string name="yield_module_fee_policy_sheet_fee_note">An approximate network fee of %1$s (%2$s) will be deducted from each future top-up, and it won’t exceed your %3$s (%4$s) limit.</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_note">If network fees rise above maximum fee, the transaction won’t go through until they decrease. You can change this limit later.</string>
|
||||
<string name="yield_module_fee_policy_sheet_max_fee_title">Maximum fee</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">The transaction fee must stay below 4% of your deposit. Tangem will transfer funds to Aave only once your balance is large enough to meet this condition.</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_title">Minimal top-up</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_note">The minimum amount is calculated from the current network fee to ensure it does not exceed 4%, which makes the minimum %1$s (%2$s).</string>
|
||||
<string name="yield_module_fee_policy_sheet_min_amount_title">Minimum top-up</string>
|
||||
<string name="yield_module_fee_policy_sheet_title">Fee policy</string>
|
||||
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangem also takes a 3% service fee on the yield earned.</string>
|
||||
<string name="yield_module_high_fee_error">Your funds will be automatically transferred to Aave once network fees are lower or your balance meets the minimum required amount.</string>
|
||||
<string name="yield_module_fee_policy_tangem_service_fee_title">Tangem also takes a 3% service fee on yield earned.</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_main_view_approve_notification_description">Write description here. In one, two or three lines will be awesome. [PLACEHOLDER]</string>
|
||||
<string name="yield_module_main_view_approve_notification_title">Some token approve needed</string>
|
||||
<string name="yield_module_main_view_approve_notification_title">Token approvals needed</string>
|
||||
<string name="yield_module_network_fee_unreachable_notification_description">Check your network connection</string>
|
||||
<string name="yield_module_network_fee_unreachable_notification_title">Network fee info unreachable</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_subtitle">Every top-up of your account will be lended to Aave automatically.</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_title">Your balance works automatically</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_subtitle">Every deposit you make will be supplied to Aave automatically.</string>
|
||||
<string name="yield_module_promo_screen_auto_balance_title">Auto-Transfer to Aave</string>
|
||||
<string name="yield_module_promo_screen_cash_out_subtitle">Send, swap, or sell your funds instantly, anytime you want.</string>
|
||||
<string name="yield_module_promo_screen_cash_out_title">Access to funds at any time</string>
|
||||
<string name="yield_module_promo_screen_cash_out_title">Access your funds anytime</string>
|
||||
<string name="yield_module_promo_screen_how_it_works_button_title">How it works?</string>
|
||||
<string name="yield_module_promo_screen_self_custodial_subtitle">Aave is a decentralized protocol managing over $81.9 billion in total value.</string>
|
||||
<string name="yield_module_promo_screen_self_custodial_title">Decentralized and self-custodial</string>
|
||||
<string name="yield_module_promo_screen_terms_disclaimer">By using service, you agree with provider\n%1$s and %2$s</string>
|
||||
<string name="yield_module_promo_screen_terms_disclaimer">By using this service, you agree with provider\n%1$s and %2$s</string>
|
||||
<string name="yield_module_promo_screen_title">Connect Aave</string>
|
||||
<string name="yield_module_promo_screen_variable_rate_info">Aave %1$s%% • Variable Interest Rate</string>
|
||||
<string name="yield_module_provider">Aave</string>
|
||||
<string name="yield_module_rate_info_sheet_chart_average">Avg %s</string>
|
||||
<string name="yield_module_rate_info_sheet_chart_title">Last year returns</string>
|
||||
<string name="yield_module_rate_info_sheet_description">Current interest rate is always variable and automatically computed by AAVE on-chain smart-contract based on real-time supply and demand.</string>
|
||||
<string name="yield_module_rate_info_sheet_chart_title">Last year\'s returns</string>
|
||||
<string name="yield_module_rate_info_sheet_description">Current interest rate is always variable and automatically computed by the Aave on-chain smart-contract, based on real-time supply and demand.</string>
|
||||
<string name="yield_module_rate_info_sheet_powered_by">Powered by</string>
|
||||
<string name="yield_module_rate_info_sheet_title">Interest rate is variable</string>
|
||||
<string name="yield_module_receive_sheet_description">When you top up, your funds will be automatically sent to Aave to start earning interest. A small fee equal to %s will be deducted to cover the transaction.</string>
|
||||
<string name="yield_module_receive_sheet_description">When you top up, your funds will be automatically sent to Aave to start earning interest. %s will be deducted to cover the transaction fee.</string>
|
||||
<string name="yield_module_start_earning">Supply assets</string>
|
||||
<string name="yield_module_start_earning_sheet_description">Your %s will be supplied to Aave and will stay instantly available</string>
|
||||
<string name="yield_module_start_earning_sheet_description">Your %s will be supplied to Aave, but will remain manageable.</string>
|
||||
<string name="yield_module_start_earning_sheet_fee_policy">See fee policy</string>
|
||||
<string name="yield_module_start_earning_sheet_next_deposits">Your next top-ups will be automatically supplied to Aave.</string>
|
||||
<string name="yield_module_start_earning_sheet_next_deposits">Your next deposits will be automatically supplied to Aave.</string>
|
||||
<string name="yield_module_status_active">Active</string>
|
||||
<string name="yield_module_status_paused">Paused</string>
|
||||
<string name="yield_module_stop_earning">Disable yield mode</string>
|
||||
<string name="yield_module_stop_earning_sheet_description">Turning off will withdraw your funds from Aave, return them to %s in your wallet, and stop earning rewards.</string>
|
||||
<string name="yield_module_stop_earning_sheet_description">Turning this off will withdraw your funds from Aave to %s in your wallet and it will stop earning rewards.</string>
|
||||
<string name="yield_module_stop_earning_sheet_fee_note">The network fee will be deducted from the amount you withdraw.</string>
|
||||
<string name="yield_module_supply_apr">Supply APY</string>
|
||||
<string name="yield_module_token_details_earn_notification_apy">APY</string>
|
||||
<string name="yield_module_token_details_earn_notification_description">Let your funds work in the background while you stay in control.</string>
|
||||
<string name="yield_module_token_details_earn_notification_description">Let your funds do the work while you stay in control.</string>
|
||||
<string name="yield_module_token_details_earn_notification_earning_on_your_balance_subtitle">Interest accrues automatically</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">Processing your deposit</string>
|
||||
<string name="yield_module_token_details_earn_notification_title">Make your balance work for you</string>
|
||||
<string name="yield_module_token_details_earn_notification_title">Make your assets work for you</string>
|
||||
<string name="yield_module_transfer_mode_automatic">Automatic</string>
|
||||
<string name="yield_module_unable_to_cover_fee_description">Deposit 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>
|
||||
|
|
|
|||
|
|
@ -168,17 +168,17 @@ internal class DefaultAccountsCRUDRepository(
|
|||
userTokensSaver.push(userWalletId = userWalletId, response = response.toUserTokensResponse())
|
||||
}
|
||||
|
||||
override suspend fun getTotalAccountsCountSync(userWalletId: UserWalletId): Option<Int> = option {
|
||||
override suspend fun getTotalActiveAccountsCountSync(userWalletId: UserWalletId): Option<Int> = option {
|
||||
val accountListResponse = getAccountsResponseSync(userWalletId = userWalletId)
|
||||
|
||||
ensureNotNull(accountListResponse)
|
||||
|
||||
return accountListResponse.wallet.totalAccounts.toOption()
|
||||
return accountListResponse.accounts.size.toOption()
|
||||
}
|
||||
|
||||
override fun getTotalAccountsCount(userWalletId: UserWalletId): Flow<Option<Int>> {
|
||||
override fun getTotalActiveAccountsCount(userWalletId: UserWalletId): Flow<Option<Int>> {
|
||||
return getAccountsResponseStore(userWalletId = userWalletId).data
|
||||
.map { it?.wallet?.totalAccounts.toOption() }
|
||||
.map { it?.accounts?.size.toOption() }
|
||||
}
|
||||
|
||||
override fun getUserWallet(userWalletId: UserWalletId): UserWallet {
|
||||
|
|
|
|||
|
|
@ -644,15 +644,15 @@ class DefaultAccountsCRUDRepositoryTest {
|
|||
|
||||
@Nested
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
inner class GetTotalAccountsCountSync {
|
||||
inner class GetTotalActiveAccountsCountSync {
|
||||
|
||||
@Test
|
||||
fun `getTotalAccountsCountSync returns None if account list response is null`() = runTest {
|
||||
fun `getTotalActiveAccountsCountSync returns None if account list response is null`() = runTest {
|
||||
// Arrange
|
||||
accountsResponseStoreFlow.value = null
|
||||
|
||||
// Act
|
||||
val actual = repository.getTotalAccountsCountSync(userWalletId)
|
||||
val actual = repository.getTotalActiveAccountsCountSync(userWalletId)
|
||||
|
||||
// Assert
|
||||
Truth.assertThat(actual).isEqualTo(None)
|
||||
|
|
@ -664,20 +664,22 @@ class DefaultAccountsCRUDRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
fun `getTotalAccountsCountSync returns Some with totalAccounts when response is valid`() = runTest {
|
||||
fun `getTotalActiveAccountsCountSync returns Some with totalAccounts when response is valid`() = runTest {
|
||||
// Arrange
|
||||
val totalAccounts = 5
|
||||
val response = mockk<GetWalletAccountsResponse> {
|
||||
every { this@mockk.wallet.totalAccounts } returns totalAccounts
|
||||
val response = createGetWalletAccountsResponse(userWalletId).let {
|
||||
it.copy(
|
||||
wallet = it.wallet.copy(totalAccounts = totalAccounts),
|
||||
)
|
||||
}
|
||||
|
||||
accountsResponseStoreFlow.value = response
|
||||
|
||||
// Act
|
||||
val actual = repository.getTotalAccountsCountSync(userWalletId)
|
||||
val actual = repository.getTotalActiveAccountsCountSync(userWalletId)
|
||||
|
||||
// Assert
|
||||
val expected = totalAccounts.toOption()
|
||||
val expected = 1.toOption()
|
||||
Truth.assertThat(actual).isEqualTo(expected)
|
||||
|
||||
verifyOrder {
|
||||
|
|
@ -689,15 +691,15 @@ class DefaultAccountsCRUDRepositoryTest {
|
|||
|
||||
@Nested
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
inner class GetTotalAccountsCount {
|
||||
inner class GetTotalActiveAccountsCount {
|
||||
|
||||
@Test
|
||||
fun `getTotalAccountsCount emits 0 when account list response is null`() = runTest {
|
||||
fun `getTotalActiveAccountsCount emits 0 when account list response is null`() = runTest {
|
||||
// Arrange
|
||||
accountsResponseStoreFlow.value = null
|
||||
|
||||
// Act
|
||||
val flow = repository.getTotalAccountsCount(userWalletId)
|
||||
val flow = repository.getTotalActiveAccountsCount(userWalletId)
|
||||
val actual = getEmittedValues(flow)
|
||||
|
||||
// Assert
|
||||
|
|
@ -710,21 +712,23 @@ class DefaultAccountsCRUDRepositoryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
fun `getTotalAccountsCount emits correct value when response is valid`() = runTest {
|
||||
fun `getTotalActiveAccountsCount emits correct value when response is valid`() = runTest {
|
||||
// Arrange
|
||||
val totalAccounts = 7
|
||||
val response = mockk<GetWalletAccountsResponse> {
|
||||
every { this@mockk.wallet.totalAccounts } returns totalAccounts
|
||||
val response = createGetWalletAccountsResponse(userWalletId).let {
|
||||
it.copy(
|
||||
wallet = it.wallet.copy(totalAccounts = totalAccounts),
|
||||
)
|
||||
}
|
||||
|
||||
accountsResponseStoreFlow.value = response
|
||||
|
||||
// Act
|
||||
val flow = repository.getTotalAccountsCount(userWalletId)
|
||||
val flow = repository.getTotalActiveAccountsCount(userWalletId)
|
||||
val actual = getEmittedValues(flow)
|
||||
|
||||
// Assert
|
||||
Truth.assertThat(actual).containsExactly(totalAccounts.toOption())
|
||||
Truth.assertThat(actual).containsExactly(1.toOption())
|
||||
verifyOrder {
|
||||
accountsResponseStoreFactory.create(userWalletId)
|
||||
accountsResponseStore.data
|
||||
|
|
|
|||
|
|
@ -79,18 +79,19 @@ interface AccountsCRUDRepository {
|
|||
suspend fun syncTokens(userWalletId: UserWalletId)
|
||||
|
||||
/**
|
||||
* Retrieves the total count of accounts associated with a specific user wallet including archived accounts
|
||||
* Retrieves the total count of active accounts associated with a specific user wallet excluding archived accounts
|
||||
*
|
||||
* @param userWalletId the unique identifier of the user wallet
|
||||
*/
|
||||
suspend fun getTotalAccountsCountSync(userWalletId: UserWalletId): Option<Int>
|
||||
suspend fun getTotalActiveAccountsCountSync(userWalletId: UserWalletId): Option<Int>
|
||||
|
||||
/**
|
||||
* Provides a flow of the total count of accounts associated with a specific user wallet including archived accounts
|
||||
* Provides a flow of the total count of active accounts associated with a specific user wallet excluding
|
||||
* archived accounts
|
||||
*
|
||||
* @param userWalletId the unique identifier of the user wallet
|
||||
*/
|
||||
fun getTotalAccountsCount(userWalletId: UserWalletId): Flow<Option<Int>>
|
||||
fun getTotalActiveAccountsCount(userWalletId: UserWalletId): Flow<Option<Int>>
|
||||
|
||||
/**
|
||||
* Retrieves a user wallet by its unique identifier
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class GetUnoccupiedAccountIndexUseCase(
|
|||
|
||||
private suspend fun Raise<Error>.getTotalAccountsCount(userWalletId: UserWalletId): Int {
|
||||
return catch(
|
||||
block = { crudRepository.getTotalAccountsCountSync(userWalletId = userWalletId) },
|
||||
block = { crudRepository.getTotalActiveAccountsCountSync(userWalletId = userWalletId) },
|
||||
catch = { raise(Error.DataOperationFailed(cause = it)) },
|
||||
)
|
||||
.getOrElse { raise(Error.DataNotFound) }
|
||||
|
|
|
|||
|
|
@ -45,18 +45,19 @@ class IsAccountsModeEnabledUseCase(
|
|||
// If the wallet does not support multiple currencies, we consider its account count as 0
|
||||
if (!userWallet.isMultiCurrency) return@map 0
|
||||
|
||||
crudRepository.getTotalAccountsCountSync(userWalletId = userWallet.walletId).getOrZero()
|
||||
crudRepository.getTotalActiveAccountsCountSync(userWalletId = userWallet.walletId).getOrZero()
|
||||
}
|
||||
.isModeEnabled()
|
||||
}
|
||||
|
||||
@Suppress("UnusedFlow")
|
||||
private fun getTotalAccountsCountList(userWallets: List<UserWallet>): List<Flow<Int>> {
|
||||
return userWallets
|
||||
.map { userWallet ->
|
||||
// If the wallet does not support multiple currencies, we consider its account count as 0
|
||||
if (!userWallet.isMultiCurrency) return@map flowOf(0)
|
||||
|
||||
crudRepository.getTotalAccountsCount(userWalletId = userWallet.walletId)
|
||||
crudRepository.getTotalActiveAccountsCount(userWalletId = userWallet.walletId)
|
||||
.map { maybeCount -> maybeCount.getOrZero() }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class GetUnoccupiedAccountIndexUseCaseTest {
|
|||
@Test
|
||||
fun `invoke should return error if repository returns 0`() = runTest {
|
||||
// Arrange
|
||||
coEvery { crudRepository.getTotalAccountsCountSync(userWalletId) } returns 0.toOption()
|
||||
coEvery { crudRepository.getTotalActiveAccountsCountSync(userWalletId) } returns 0.toOption()
|
||||
|
||||
// Act
|
||||
val actual = useCase(userWalletId = userWalletId).leftOrNull() as Error.DataOperationFailed
|
||||
|
|
@ -42,13 +42,13 @@ class GetUnoccupiedAccountIndexUseCaseTest {
|
|||
Truth.assertThat(actual.cause).isInstanceOf(expected::class.java)
|
||||
Truth.assertThat(actual.cause).hasMessageThat().isEqualTo(expected.message)
|
||||
|
||||
coVerify { crudRepository.getTotalAccountsCountSync(userWalletId) }
|
||||
coVerify { crudRepository.getTotalActiveAccountsCountSync(userWalletId) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `invoke should return next unoccupied index when repository returns count`() = runTest {
|
||||
// Arrange
|
||||
coEvery { crudRepository.getTotalAccountsCountSync(userWalletId) } returns 3.toOption()
|
||||
coEvery { crudRepository.getTotalActiveAccountsCountSync(userWalletId) } returns 3.toOption()
|
||||
|
||||
// Act
|
||||
val actual = useCase(userWalletId = userWalletId)
|
||||
|
|
@ -57,14 +57,14 @@ class GetUnoccupiedAccountIndexUseCaseTest {
|
|||
val expected = DerivationIndex(3)
|
||||
Truth.assertThat(actual).isEqualTo(expected)
|
||||
|
||||
coVerify { crudRepository.getTotalAccountsCountSync(userWalletId) }
|
||||
coVerify { crudRepository.getTotalActiveAccountsCountSync(userWalletId) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `invoke should return error if repository throws exception`() = runTest {
|
||||
// Arrange
|
||||
val exception = IllegalStateException("Test error")
|
||||
coEvery { crudRepository.getTotalAccountsCountSync(userWalletId) } throws exception
|
||||
coEvery { crudRepository.getTotalActiveAccountsCountSync(userWalletId) } throws exception
|
||||
|
||||
// Act
|
||||
val actual = useCase(userWalletId = userWalletId)
|
||||
|
|
@ -73,6 +73,6 @@ class GetUnoccupiedAccountIndexUseCaseTest {
|
|||
val expected = Error.DataOperationFailed(exception).left()
|
||||
Truth.assertThat(actual).isEqualTo(expected)
|
||||
|
||||
coVerify { crudRepository.getTotalAccountsCountSync(userWalletId) }
|
||||
coVerify { crudRepository.getTotalActiveAccountsCountSync(userWalletId) }
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@ import org.junit.jupiter.api.Nested
|
|||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.TestInstance
|
||||
|
||||
@Suppress("UnusedFlow")
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
class IsAccountsModeEnabledUseCaseTest {
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
accountsCRUDRepository.getUserWallets()
|
||||
}
|
||||
|
||||
verify(inverse = true) { accountsCRUDRepository.getTotalAccountsCount(any()) }
|
||||
verify(inverse = true) { accountsCRUDRepository.getTotalActiveAccountsCount(any()) }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -90,7 +91,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
accountsCRUDRepository.getUserWallets()
|
||||
}
|
||||
|
||||
verify(inverse = true) { accountsCRUDRepository.getTotalAccountsCount(any()) }
|
||||
verify(inverse = true) { accountsCRUDRepository.getTotalActiveAccountsCount(any()) }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -100,7 +101,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
|
||||
every { featureToggles.isFeatureEnabled } returns true
|
||||
every { accountsCRUDRepository.getUserWallets() } returns flowOf(listOf(wallet))
|
||||
every { accountsCRUDRepository.getTotalAccountsCount(wallet.walletId) } returns flowOf(2.some())
|
||||
every { accountsCRUDRepository.getTotalActiveAccountsCount(wallet.walletId) } returns flowOf(2.some())
|
||||
|
||||
// Act
|
||||
val actual = useCase.invoke().first()
|
||||
|
|
@ -111,7 +112,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
verifyOrder {
|
||||
featureToggles.isFeatureEnabled
|
||||
accountsCRUDRepository.getUserWallets()
|
||||
accountsCRUDRepository.getTotalAccountsCount(wallet.walletId)
|
||||
accountsCRUDRepository.getTotalActiveAccountsCount(wallet.walletId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -122,7 +123,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
|
||||
every { featureToggles.isFeatureEnabled } returns true
|
||||
every { accountsCRUDRepository.getUserWallets() } returns flowOf(listOf(wallet))
|
||||
every { accountsCRUDRepository.getTotalAccountsCount(wallet.walletId) } returns flowOf(none())
|
||||
every { accountsCRUDRepository.getTotalActiveAccountsCount(wallet.walletId) } returns flowOf(none())
|
||||
|
||||
// Act
|
||||
val actual = useCase.invoke().first()
|
||||
|
|
@ -133,7 +134,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
verifyOrder {
|
||||
featureToggles.isFeatureEnabled
|
||||
accountsCRUDRepository.getUserWallets()
|
||||
accountsCRUDRepository.getTotalAccountsCount(wallet.walletId)
|
||||
accountsCRUDRepository.getTotalActiveAccountsCount(wallet.walletId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +146,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
|
||||
every { featureToggles.isFeatureEnabled } returns true
|
||||
every { accountsCRUDRepository.getUserWallets() } returns flowOf(listOf(wallet1, wallet2))
|
||||
every { accountsCRUDRepository.getTotalAccountsCount(wallet2.walletId) } returns flowOf(2.some())
|
||||
every { accountsCRUDRepository.getTotalActiveAccountsCount(wallet2.walletId) } returns flowOf(2.some())
|
||||
|
||||
// Act
|
||||
val actual = useCase.invoke().first()
|
||||
|
|
@ -156,10 +157,10 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
verifyOrder {
|
||||
featureToggles.isFeatureEnabled
|
||||
accountsCRUDRepository.getUserWallets()
|
||||
accountsCRUDRepository.getTotalAccountsCount(wallet2.walletId)
|
||||
accountsCRUDRepository.getTotalActiveAccountsCount(wallet2.walletId)
|
||||
}
|
||||
|
||||
verify(inverse = true) { accountsCRUDRepository.getTotalAccountsCount(wallet1.walletId) }
|
||||
verify(inverse = true) { accountsCRUDRepository.getTotalActiveAccountsCount(wallet1.walletId) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -199,7 +200,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
accountsCRUDRepository.getUserWalletsSync()
|
||||
}
|
||||
|
||||
coVerify(inverse = true) { accountsCRUDRepository.getTotalAccountsCountSync(any()) }
|
||||
coVerify(inverse = true) { accountsCRUDRepository.getTotalActiveAccountsCountSync(any()) }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -221,7 +222,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
accountsCRUDRepository.getUserWalletsSync()
|
||||
}
|
||||
|
||||
coVerify(inverse = true) { accountsCRUDRepository.getTotalAccountsCountSync(any()) }
|
||||
coVerify(inverse = true) { accountsCRUDRepository.getTotalActiveAccountsCountSync(any()) }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -231,7 +232,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
|
||||
every { featureToggles.isFeatureEnabled } returns true
|
||||
every { accountsCRUDRepository.getUserWalletsSync() } returns listOf(wallet)
|
||||
coEvery { accountsCRUDRepository.getTotalAccountsCountSync(wallet.walletId) } returns 2.some()
|
||||
coEvery { accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet.walletId) } returns 2.some()
|
||||
|
||||
// Act
|
||||
val actual = useCase.invokeSync()
|
||||
|
|
@ -242,7 +243,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
coVerifyOrder {
|
||||
featureToggles.isFeatureEnabled
|
||||
accountsCRUDRepository.getUserWalletsSync()
|
||||
accountsCRUDRepository.getTotalAccountsCountSync(wallet.walletId)
|
||||
accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet.walletId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -253,7 +254,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
|
||||
every { featureToggles.isFeatureEnabled } returns true
|
||||
every { accountsCRUDRepository.getUserWalletsSync() } returns listOf(wallet)
|
||||
coEvery { accountsCRUDRepository.getTotalAccountsCountSync(wallet.walletId) } returns none()
|
||||
coEvery { accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet.walletId) } returns none()
|
||||
|
||||
// Act
|
||||
val actual = useCase.invokeSync()
|
||||
|
|
@ -264,7 +265,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
coVerifyOrder {
|
||||
featureToggles.isFeatureEnabled
|
||||
accountsCRUDRepository.getUserWalletsSync()
|
||||
accountsCRUDRepository.getTotalAccountsCountSync(wallet.walletId)
|
||||
accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet.walletId)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -276,7 +277,7 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
|
||||
every { featureToggles.isFeatureEnabled } returns true
|
||||
every { accountsCRUDRepository.getUserWalletsSync() } returns listOf(wallet1, wallet2)
|
||||
coEvery { accountsCRUDRepository.getTotalAccountsCountSync(wallet2.walletId) } returns 2.some()
|
||||
coEvery { accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet2.walletId) } returns 2.some()
|
||||
|
||||
// Act
|
||||
val actual = useCase.invokeSync()
|
||||
|
|
@ -287,10 +288,10 @@ class IsAccountsModeEnabledUseCaseTest {
|
|||
coVerifyOrder {
|
||||
featureToggles.isFeatureEnabled
|
||||
accountsCRUDRepository.getUserWalletsSync()
|
||||
accountsCRUDRepository.getTotalAccountsCountSync(wallet2.walletId)
|
||||
accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet2.walletId)
|
||||
}
|
||||
|
||||
coVerify(inverse = true) { accountsCRUDRepository.getTotalAccountsCountSync(wallet1.walletId) }
|
||||
coVerify(inverse = true) { accountsCRUDRepository.getTotalActiveAccountsCountSync(wallet1.walletId) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.tangem.features.account.archived
|
||||
|
||||
import com.tangem.common.ui.account.toUM
|
||||
import com.tangem.core.analytics.api.AnalyticsExceptionHandler
|
||||
import com.tangem.core.analytics.models.ExceptionAnalyticsEvent
|
||||
import com.tangem.core.decompose.model.Model
|
||||
|
|
@ -15,11 +14,8 @@ import com.tangem.core.ui.message.EventMessageAction
|
|||
import com.tangem.core.ui.message.ToastMessage
|
||||
import com.tangem.core.ui.utils.showErrorDialog
|
||||
import com.tangem.domain.account.models.AccountList
|
||||
import com.tangem.domain.account.models.ArchivedAccount
|
||||
import com.tangem.domain.account.usecase.ArchivedAccountList
|
||||
import com.tangem.domain.account.usecase.GetArchivedAccountsUseCase
|
||||
import com.tangem.domain.account.usecase.RecoverCryptoPortfolioUseCase
|
||||
import com.tangem.domain.core.lce.Lce
|
||||
import com.tangem.domain.models.account.AccountId
|
||||
import com.tangem.features.account.ArchivedAccountListComponent
|
||||
import com.tangem.features.account.archived.entity.AccountArchivedUM
|
||||
|
|
@ -30,6 +26,7 @@ import com.tangem.utils.coroutines.JobHolder
|
|||
import com.tangem.utils.coroutines.saveIn
|
||||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
|
|
@ -61,25 +58,32 @@ internal class ArchivedAccountListModel @Inject constructor(
|
|||
.conflate()
|
||||
.distinctUntilChanged()
|
||||
.onEach { lce ->
|
||||
val newState = when (lce) {
|
||||
is Lce.Content<ArchivedAccountList> -> umBuilder.mapContent(
|
||||
accounts = lce.content,
|
||||
onCloseClick = onCloseClick,
|
||||
confirmRecoverDialog = { confirmRecoverDialog(it) },
|
||||
)
|
||||
is Lce.Error<Throwable> -> umBuilder.mapError(
|
||||
throwable = lce.error,
|
||||
onCloseClick = onCloseClick,
|
||||
getArchivedAccounts = { getArchivedAccounts() },
|
||||
)
|
||||
is Lce.Loading<ArchivedAccountList> -> lce.partialContent?.let { content ->
|
||||
val newState = lce.fold(
|
||||
ifLoading = { content ->
|
||||
content ?: return@fold null
|
||||
|
||||
umBuilder.mapContent(
|
||||
accounts = content,
|
||||
onCloseClick = onCloseClick,
|
||||
confirmRecoverDialog = { confirmRecoverDialog(it) },
|
||||
onRecoverClick = { recoverCryptoPortfolio(accountId = it.accountId) },
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
ifContent = { content ->
|
||||
umBuilder.mapContent(
|
||||
accounts = content,
|
||||
onCloseClick = onCloseClick,
|
||||
onRecoverClick = { recoverCryptoPortfolio(accountId = it.accountId) },
|
||||
)
|
||||
},
|
||||
ifError = { error ->
|
||||
umBuilder.mapError(
|
||||
throwable = error,
|
||||
onCloseClick = onCloseClick,
|
||||
getArchivedAccounts = { getArchivedAccounts() },
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
newState?.let { _uiState.value = newState }
|
||||
}
|
||||
.flowOn(dispatchers.default)
|
||||
|
|
@ -87,30 +91,10 @@ internal class ArchivedAccountListModel @Inject constructor(
|
|||
.saveIn(getArchivedAccountsJob)
|
||||
}
|
||||
|
||||
private fun confirmRecoverDialog(account: ArchivedAccount) {
|
||||
val secondAction = EventMessageAction(
|
||||
title = resourceReference(R.string.common_cancel),
|
||||
onClick = {},
|
||||
)
|
||||
val firstAction = EventMessageAction(
|
||||
title = resourceReference(R.string.account_archived_recover),
|
||||
onClick = { recoverCryptoPortfolio(account.accountId) },
|
||||
)
|
||||
messageSender.send(
|
||||
DialogMessage(
|
||||
title = resourceReference(R.string.account_archived_recover_dialog_title),
|
||||
message = resourceReference(
|
||||
id = R.string.account_archived_recover_dialog_description,
|
||||
formatArgs = wrappedList(account.name.toUM().value),
|
||||
),
|
||||
firstActionBuilder = { firstAction },
|
||||
secondActionBuilder = { secondAction },
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
private fun recoverCryptoPortfolio(accountId: AccountId) = modelScope.launch(dispatchers.default) {
|
||||
recoverCryptoPortfolioUseCase(accountId)
|
||||
private fun recoverCryptoPortfolio(accountId: AccountId) = modelScope.launch {
|
||||
withContext(dispatchers.default) {
|
||||
recoverCryptoPortfolioUseCase(accountId)
|
||||
}
|
||||
.onLeft(::handleRecoverError)
|
||||
.onRight {
|
||||
showSuccessRecoverMessage()
|
||||
|
|
@ -122,8 +106,22 @@ internal class ArchivedAccountListModel @Inject constructor(
|
|||
if (error is RecoverCryptoPortfolioUseCase.Error.AccountListRequirementsNotMet &&
|
||||
error.cause is AccountList.Error.ExceedsMaxAccountsCount
|
||||
) {
|
||||
// TODO("account") show alert that max accounts count reached
|
||||
// https://www.figma.com/design/09KKG4ZVuFDZhj8WLv5rGJ/%F0%9F%9A%A7-App-experience?node-id=24765-180563&t=vk6TCy4MkYol1cPb-4
|
||||
val firstAction = EventMessageAction(
|
||||
title = resourceReference(R.string.common_got_it),
|
||||
onClick = { },
|
||||
)
|
||||
|
||||
messageSender.send(
|
||||
DialogMessage(
|
||||
title = resourceReference(R.string.account_recover_limit_dialog_title),
|
||||
message = resourceReference(
|
||||
id = R.string.account_recover_limit_dialog_description,
|
||||
formatArgs = wrappedList(AccountList.MAX_ACCOUNTS_COUNT.toString()),
|
||||
),
|
||||
firstActionBuilder = { firstAction },
|
||||
),
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@ internal class AccountArchivedUMBuilder @Inject constructor() {
|
|||
fun mapContent(
|
||||
accounts: ArchivedAccountList,
|
||||
onCloseClick: () -> Unit,
|
||||
confirmRecoverDialog: (account: ArchivedAccount) -> Unit,
|
||||
onRecoverClick: (account: ArchivedAccount) -> Unit,
|
||||
) = AccountArchivedUM.Content(
|
||||
onCloseClick = onCloseClick,
|
||||
accounts = accounts
|
||||
.map { account -> account.mapArchivedAccountUM(confirmRecoverDialog) }
|
||||
.map { account -> account.mapArchivedAccountUM(onRecoverClick) }
|
||||
.toImmutableList(),
|
||||
)
|
||||
|
||||
fun ArchivedAccount.mapArchivedAccountUM(confirmRecoverDialog: (account: ArchivedAccount) -> Unit) =
|
||||
private fun ArchivedAccount.mapArchivedAccountUM(onRecoverClick: (account: ArchivedAccount) -> Unit) =
|
||||
ArchivedAccountUM(
|
||||
accountId = accountId.value,
|
||||
accountName = name.toUM().value,
|
||||
|
|
@ -38,7 +38,7 @@ internal class AccountArchivedUMBuilder @Inject constructor() {
|
|||
count = networksCount,
|
||||
formatArgs = wrappedList(networksCount),
|
||||
),
|
||||
onClick = { confirmRecoverDialog(this) },
|
||||
onClick = { onRecoverClick(this) },
|
||||
)
|
||||
|
||||
fun mapError(
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ internal class PreviewWalletSettingsComponent : WalletSettingsComponent {
|
|||
onReferralClick = {},
|
||||
isManageTokensAvailable = true,
|
||||
isNotificationsEnabled = true,
|
||||
isNotificationsFeatureEnabled = true,
|
||||
onCheckedNotificationsChanged = {},
|
||||
onNotificationsDescriptionClick = {},
|
||||
isNotificationsPermissionGranted = false,
|
||||
|
|
|
|||
|
|
@ -48,11 +48,13 @@ import com.tangem.hot.sdk.model.HotWalletId
|
|||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import kotlinx.collections.immutable.PersistentList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@Suppress("LongParameterList", "LargeClass")
|
||||
@ModelScoped
|
||||
internal class WalletSettingsModel @Inject constructor(
|
||||
|
|
@ -128,11 +130,11 @@ internal class WalletSettingsModel @Inject constructor(
|
|||
}
|
||||
|
||||
fun combineUI(wallet: UserWallet) = combine(
|
||||
getWalletNFTEnabledUseCase.invoke(params.userWalletId),
|
||||
getWalletNotificationsEnabledUseCase(params.userWalletId),
|
||||
isUpgradeWalletNotificationEnabledUseCase(params.userWalletId),
|
||||
walletCardItemDelegate.cardItemFlow(wallet),
|
||||
accountItemsDelegate.loadAccount(),
|
||||
flow = getWalletNFTEnabledUseCase.invoke(params.userWalletId),
|
||||
flow2 = getWalletNotificationsEnabledUseCase(params.userWalletId),
|
||||
flow3 = isUpgradeWalletNotificationEnabledUseCase(params.userWalletId),
|
||||
flow4 = walletCardItemDelegate.cardItemFlow(wallet),
|
||||
flow5 = accountItemsDelegate.loadAccount(),
|
||||
) { nftEnabled, notificationsEnabled, isUpgradeNotificationEnabled, cardItem, accountList ->
|
||||
val isWalletBackedUp = when (wallet) {
|
||||
is UserWallet.Hot -> wallet.backedUp
|
||||
|
|
@ -145,7 +147,6 @@ internal class WalletSettingsModel @Inject constructor(
|
|||
cardItem = cardItem,
|
||||
isNFTEnabled = nftEnabled,
|
||||
isNotificationsEnabled = notificationsEnabled,
|
||||
isNotificationsFeatureEnabled = true,
|
||||
isNotificationsPermissionGranted = isNotificationsPermissionGranted(),
|
||||
isUpgradeNotificationEnabled = isUpgradeNotificationEnabled,
|
||||
accountList = accountList,
|
||||
|
|
@ -180,7 +181,6 @@ internal class WalletSettingsModel @Inject constructor(
|
|||
userWallet: UserWallet,
|
||||
cardItem: WalletSettingsItemUM.CardBlock,
|
||||
isNFTEnabled: Boolean,
|
||||
isNotificationsFeatureEnabled: Boolean,
|
||||
isNotificationsEnabled: Boolean,
|
||||
isNotificationsPermissionGranted: Boolean,
|
||||
isUpgradeNotificationEnabled: Boolean,
|
||||
|
|
@ -202,7 +202,11 @@ internal class WalletSettingsModel @Inject constructor(
|
|||
is UserWallet.Cold -> userWallet.scanResponse.card.backupStatus == CardDTO.BackupStatus.NoBackup
|
||||
is UserWallet.Hot -> false
|
||||
},
|
||||
isManageTokensAvailable = !accountsFeatureEnabled && isMultiCurrency,
|
||||
isManageTokensAvailable = if (accountsFeatureEnabled) {
|
||||
isMultiCurrency && accountList.count { it is WalletSettingsAccountsUM.Account } == 0
|
||||
} else {
|
||||
isMultiCurrency
|
||||
},
|
||||
isNFTFeatureEnabled = isMultiCurrency,
|
||||
isNFTEnabled = isNFTEnabled,
|
||||
onCheckedNFTChange = ::onCheckedNFTChange,
|
||||
|
|
@ -217,7 +221,6 @@ internal class WalletSettingsModel @Inject constructor(
|
|||
},
|
||||
onReferralClick = { onReferralClick(userWallet) },
|
||||
isNotificationsEnabled = isNotificationsEnabled,
|
||||
isNotificationsFeatureEnabled = isNotificationsFeatureEnabled,
|
||||
isNotificationsPermissionGranted = isNotificationsPermissionGranted,
|
||||
onCheckedNotificationsChanged = ::onCheckedNotificationsChange,
|
||||
onNotificationsDescriptionClick = ::onNotificationsDescriptionClick,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.tangem.domain.account.models.AccountList
|
|||
import com.tangem.domain.account.models.AccountStatusList
|
||||
import com.tangem.domain.account.status.producer.SingleAccountStatusListProducer
|
||||
import com.tangem.domain.account.status.supplier.SingleAccountStatusListSupplier
|
||||
import com.tangem.domain.account.usecase.IsAccountsModeEnabledUseCase
|
||||
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
import com.tangem.domain.balancehiding.GetBalanceHidingSettingsUseCase
|
||||
|
|
@ -40,6 +41,7 @@ internal class AccountItemsDelegate @Inject constructor(
|
|||
private val singleAccountStatusListSupplier: SingleAccountStatusListSupplier,
|
||||
private val getBalanceHidingSettingsUseCase: GetBalanceHidingSettingsUseCase,
|
||||
private val getSelectedAppCurrencyUseCase: GetSelectedAppCurrencyUseCase,
|
||||
private val isAccountsModeEnabledUseCase: IsAccountsModeEnabledUseCase,
|
||||
private val accountsFeatureToggles: AccountsFeatureToggles,
|
||||
) {
|
||||
val userWalletId = paramsContainer.require<WalletSettingsComponent.Params>().userWalletId
|
||||
|
|
@ -51,8 +53,9 @@ internal class AccountItemsDelegate @Inject constructor(
|
|||
flow = singleAccountStatusListSupplier(params),
|
||||
flow2 = getSelectedAppCurrencyUseCase.invokeOrDefault(),
|
||||
flow3 = getBalanceHidingSettingsUseCase.isBalanceHidden(),
|
||||
) { accountStatusList, appCurrency, isBalanceHidden ->
|
||||
buildUiList(accountStatusList, appCurrency, isBalanceHidden)
|
||||
flow4 = isAccountsModeEnabledUseCase(),
|
||||
) { accountStatusList, appCurrency, isBalanceHidden, isAccountsMode ->
|
||||
buildUiList(accountStatusList, appCurrency, isBalanceHidden, isAccountsMode)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -60,6 +63,7 @@ internal class AccountItemsDelegate @Inject constructor(
|
|||
accountStatusList: AccountStatusList,
|
||||
appCurrency: AppCurrency,
|
||||
isBalanceHidden: Boolean,
|
||||
isAccountsMode: Boolean,
|
||||
): List<WalletSettingsAccountsUM> = buildList {
|
||||
fun AccountStatus.CryptoPortfolio.mapCryptoPortfolio(): WalletSettingsAccountsUM {
|
||||
val accountItemUM = AccountPortfolioItemUMConverter(
|
||||
|
|
@ -81,7 +85,9 @@ internal class AccountItemsDelegate @Inject constructor(
|
|||
text = resourceReference(R.string.common_accounts),
|
||||
).let(::add)
|
||||
|
||||
addAll(accounts.map(::mapAccount))
|
||||
if (isAccountsMode) {
|
||||
addAll(accounts.map(::mapAccount))
|
||||
}
|
||||
|
||||
val addAccountEnabled = accounts.size < AccountList.MAX_ACCOUNTS_COUNT
|
||||
val showDescription = accounts.size > 1
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ internal class ItemsBuilder @Inject constructor(
|
|||
isNFTFeatureEnabled: Boolean,
|
||||
isNFTEnabled: Boolean,
|
||||
onCheckedNFTChange: (Boolean) -> Unit,
|
||||
isNotificationsFeatureEnabled: Boolean,
|
||||
isNotificationsEnabled: Boolean,
|
||||
isNotificationsPermissionGranted: Boolean,
|
||||
onCheckedNotificationsChanged: (Boolean) -> Unit,
|
||||
|
|
@ -74,7 +73,6 @@ internal class ItemsBuilder @Inject constructor(
|
|||
)
|
||||
.addAll(
|
||||
buildNotificationItems(
|
||||
isNotificationsFeatureEnabled = isNotificationsFeatureEnabled,
|
||||
isNotificationsPermissionGranted = isNotificationsPermissionGranted,
|
||||
isNotificationsEnabled = isNotificationsEnabled,
|
||||
onCheckedNotificationsChanged = onCheckedNotificationsChanged,
|
||||
|
|
@ -103,13 +101,11 @@ internal class ItemsBuilder @Inject constructor(
|
|||
}
|
||||
|
||||
private fun buildNotificationItems(
|
||||
isNotificationsFeatureEnabled: Boolean,
|
||||
isNotificationsPermissionGranted: Boolean,
|
||||
isNotificationsEnabled: Boolean,
|
||||
onCheckedNotificationsChanged: (Boolean) -> Unit,
|
||||
onNotificationsDescriptionClick: () -> Unit,
|
||||
): List<WalletSettingsItemUM> {
|
||||
if (!isNotificationsFeatureEnabled) return emptyList()
|
||||
return buildList {
|
||||
if (!isNotificationsPermissionGranted) {
|
||||
add(buildNotificationsPermissionItem())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue