diff --git a/core/res/src/main/res/values-de/strings.xml b/core/res/src/main/res/values-de/strings.xml index 7d74f429b0..1dd56ca271 100644 --- a/core/res/src/main/res/values-de/strings.xml +++ b/core/res/src/main/res/values-de/strings.xml @@ -1,12 +1,13 @@ - Token nicht in Deinem Portfolio gefunden? Überprüfe die Märkte, um es zu finden und zum Kauf hinzuzufügen - Token nicht in Ihrem Portfolio gefunden? Überprüfe die Märkte, um es zu finden und zum Verkauf hinzuzufügen + Du kannst Deinen Token nicht finden? Gehe zum Bereich „Markt“ auf der Hauptseite und fügen diesen zum kaufen im Portfolio hinzu. + Du kannst Deinen Token nicht finden? Gehe zum Bereich „Markt“ auf der Hauptseite und fügen diesen zum verkaufen im Portfolio hinzu. + Verkaufen Wähle den Token - Token nicht in Deinem Portfolio gefunden? Überprüfe die Märkte, um es für Swaps zu finden und hinzuzufügen + Du kannst Deinen Token nicht finden? Gehe zum Bereich „Markt“ auf der Hauptseite und fügen diesen zum tauschen im Portfolio hinzu. Es gibt keine verfügbaren Token, die mit dem ausgewählten Token getauscht werden können. Bitte wähle einen anderen. Kein verfügbares Paar - Wähle den Token aus, das Du erhalten möchtest + Wähle den Token aus, den Du erhalten möchtest Wähle den Token, den Du tauschen möchtest Netzwerk wählen Token anlegen @@ -650,6 +651,10 @@ Karte oder Ring scannen Scanne die Karte oder Ring, um ihre Einstellungen zu ändern. Die Änderungen wirken sich nur auf die von dir gescannte Karte oder Ring aus und haben keine Auswirkungen auf andere mit deiner Wallet verknüpften Geräte. Halte deine Karte oder Ring bereit! + Dein Konto verfügt nicht über genügend Guthaben, um diese Kryptowährung zu verkaufen. Bitte zahle den gewünschten Vermögenswert ein, um fortzufahren. + Unzureichendes Guthaben + Der Verkauf von Kryptowährung ist in Deiner Region derzeit nicht möglich. Wir arbeiten aktiv daran, Ihnen diese Option bald anzubieten – bleib dran! + Regionale Einschränkung Bereits in der eingegebenen Adresse enthalten Der Provisionsbetrag ist %s mal der empfohlene Betrag. Stelle sicher, dass die benutzerdefinierten Einstellungen korrekt sind. Du hast eine Kommission angegeben, die unter dem empfohlenen Betrag liegt, was zu einer Verzögerung Ihrer Transaktion führen könnte. Weiter? diff --git a/core/res/src/main/res/values-es/strings.xml b/core/res/src/main/res/values-es/strings.xml index d4817e7fdf..ec232c3607 100644 --- a/core/res/src/main/res/values-es/strings.xml +++ b/core/res/src/main/res/values-es/strings.xml @@ -2,10 +2,13 @@ ¿No encuentra el token en su billetera? Consulte los mercados para encontrarlo y añadirlo a la compra ¿No encuentra el token en su billetera? Consulte los mercados para encontrarlo y añadirlo a la venta + Vender Elige el token ¿No encuentras el token en tu billetera? Consulte los mercados para encontrarlo y agregarlo al intercambio No hay tokens disponibles para intercambiar con el token seleccionado. Por favor elige otro. No hay par disponible + Seleccione el token que desea recibir + Seleccione el token que desea intercambiar Elige red Agregue un token personalizado Gestionar tokens @@ -642,6 +645,10 @@ Escanee su tarjeta Escanee la tarjeta para cambiar sus ajustes. Los cambios afectarán solo a la tarjeta que has escaneado y no afectarán a otras tarjetas vinculadas a su billetera. ¡Prepare su tarjeta! + No tiene fondos suficientes en su saldo para vender esta criptomoneda. Deposite el activo deseado para continuar. + Saldo insuficiente + La venta de criptomonedas no está disponible en su región en este momento. Estamos trabajando activamente para ofrecerle esta opción pronto. ¡Manténgase conectado! + Restricción Regional Ya incluido en la dirección ingresada El monto de la comisión es %s veces el monto recomendado. Asegúrese de que la configuración personalizada sea correcta. Ha especificado una comisión inferior a la cantidad recomendada, lo que podría provocar un retraso en su transacción. ¿Continuar? @@ -883,6 +890,7 @@ No disponible para compra No disponible para vender No disponible para cambio desde %s + No disponible para intercambio contacto: %s Aún no tiene ninguna transacción Error al cargar el historial de transacciones.\nHaga clic en el botón de recarga para actualizar la información. diff --git a/core/res/src/main/res/values-fr/strings.xml b/core/res/src/main/res/values-fr/strings.xml index 4cbdce726e..f57331a0f4 100644 --- a/core/res/src/main/res/values-fr/strings.xml +++ b/core/res/src/main/res/values-fr/strings.xml @@ -2,10 +2,13 @@ Jeton non trouvé dans votre portefeuille ? Consultez les marchés pour le trouver et l\'ajouter à l\'achat Jeton non trouvé dans votre portefeuille ? Consultez les marchés pour le trouver et l\'ajouter à la vente + Vendre Choisissez le jeton Jeton non trouvé dans votre portefeuille ? Consultez les marchés pour le trouver et l\'ajouter à l\'échange Il n\'y a pas de token disponible pour échanger avec le token sélectionné. Veuillez en choisir un autre. Aucune paire disponible + Sélectionnez le jeton que vous souhaitez recevoir + Sélectionnez le jeton que vous souhaitez échanger Choisissez le réseau Ajouter un jeton personnalisé Gérer les jetons @@ -642,6 +645,10 @@ Scannez votre carte Scannez la carte pour modifier ses paramètres. Les modifications n\'affecteront que la carte que vous avez scannée et n\'affecteront pas les autres cartes liées à votre portefeuille. Préparez votre carte ! + Vous n\'avez pas assez de fonds sur votre solde pour vendre cette cryptomonnaie. Veuillez déposer l\'actif souhaité pour continuer. + Solde insuffisant + La vente de cryptomonnaies n\'est pas disponible dans votre région pour le moment. Nous travaillons activement pour vous proposer cette option prochainement. Restez connecté ! + Restriction Régionale Déjà inclus dans l\'adresse saisie Le montant de la commission est %s fois le montant recommandé. Assurez-vous que les paramètres personnalisés sont corrects. Vous avez spécifié une commission inférieure au montant recommandé, ce qui pourrait entraîner un retard dans votre transaction. Continuer? @@ -883,6 +890,7 @@ Non disponible à l\'achat Indisponible à la vente Non disponible pour l\'échange de %s + Indisponible pour un échange contrat : %s Vous n\'avez pas encore de transactions Échec du chargement de l\'historique des transactions.\nCliquez sur le bouton de rechargement pour mettre à jour les informations. diff --git a/core/res/src/main/res/values-ja/strings.xml b/core/res/src/main/res/values-ja/strings.xml index 1b346bf8cf..871580ab2e 100644 --- a/core/res/src/main/res/values-ja/strings.xml +++ b/core/res/src/main/res/values-ja/strings.xml @@ -1,10 +1,10 @@ - ポートフォリオにトークンが見つかりませんか?マーケットから見つけ、買付のために追加してください - ポートフォリオにトークンが見つかりませんか?マーケットから見つけ、売却のために追加してください - 暗号資産を売却 + トークンが見つかりませんか?メインページのマーケットセクションに移動し、ポートフォリオに追加して買付できるようにします。 + トークンが見つかりませんか?メインページのマーケットセクションに移動し、ポートフォリオに追加して売却できるようにします。 + 売却 トークンを選択 - ポートフォリオにトークンが見つかりませんか?マーケットから見つけ、スワップのために追加してください + トークンが見つかりませんか?メインページのマーケットセクションに移動し、ポートフォリオに追加してスワップできるようにします。 選択したトークンと交換できるトークンがありません。別のトークンを選択してください。 利用可能なペアがありません 受け取りたいトークンを選択します @@ -641,6 +641,10 @@ カードまたはリングをスキャン カードまたはリングをスキャンして設定を変更します。変更はスキャンしたカードまたはリングにのみ影響し、ウォレットに関連付けられている他のデバイスには影響しません。 Tangemを準備してください! + この暗号資産を売却するのに十分な資金が残高にありません。続行するには、希望の資産を入金してください。 + 残高不足 + 現在、お住まいの地域では暗号資産の売却はご利用いただけません。このオプションをすぐにご利用いただけるよう積極的に取り組んでいますので、お楽しみに! + 地域制限 入力したアドレスにすでに含まれています 手数料額が推奨額の%s倍となっています。設定を再度確認し、調整してください。 推奨手数料を下回る手数料が指定されたため、取引に遅れが生じる可能性があります。続行しますか? diff --git a/core/res/src/main/res/values-ru/strings.xml b/core/res/src/main/res/values-ru/strings.xml index 7b9a25c8cd..4a4acfb3b9 100644 --- a/core/res/src/main/res/values-ru/strings.xml +++ b/core/res/src/main/res/values-ru/strings.xml @@ -2,11 +2,17 @@ Не нашли свой токен? Перейдите в раздел «Рынок» на главной странице и добавьте его в свой портфель для покупки. Не нашли свой токен? Перейдите в раздел «Рынок» на главной странице и добавьте его в свой портфель для продажи. - Продать криптовалюту + Продать + Подключение может занять несколько секунд. Пожалуйста, подождите. + Соединение + Действие в данный момент недоступно, пожалуйста попробуйте позже или обновить данные, сделав свайп экрана вниз. + Кнопка недоступна Выберите токен Не нашли свой токен? Перейдите в раздел «Рынок» на главной странице и добавьте его в свой портфель для обмена. Нет доступных вариантов для обмена с выбранным токеном, пожалуйста, выберите другой. Нет доступных пар + Для использования функции обмена ваш портфель должен содержать минимум 2 токена. + Добавьте токены Выберите токен для получения Выберите токен для обмена Выберите сеть diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml index 18cf4fecf0..5410db20c5 100644 --- a/core/res/src/main/res/values/strings.xml +++ b/core/res/src/main/res/values/strings.xml @@ -2,11 +2,17 @@ Can’t find your token? Go to the Market section on the main page and add it to your portfolio for purchase Can’t find your token? Go to the Market section on the main page and add it to your portfolio for selling. - Sell crypto + Sell + Connection may take a few seconds. Please wait. + Connection + The action is currently unavailable. Please try again later or refresh the data by swiping down on the screen. + Button is unavailable Choose the Token Can’t find your token? Go to the Market section on the main page and add it to your portfolio for swapping. There are no available tokens to swap with the selected token. Please choose another one. No available pair + To use the exchange feature, your portfolio must contain at least 2 tokens. + Add tokens Choose the token you want to receive Choose the token you want to swap Choose network diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertState.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertState.kt index f43173acd0..6103f851d0 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertState.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletAlertState.kt @@ -85,14 +85,14 @@ internal sealed interface WalletAlertState { } data object ProvidersStillLoading : Basic() { - override val title: TextReference = stringReference(value = "Providers are still loading") - override val message: TextReference = resourceReference(R.string.wallet_connect_toast_awaiting_session_proposal) + override val title: TextReference = resourceReference(R.string.action_buttons_service_loading_alert_title) + override val message: TextReference = resourceReference(R.string.action_buttons_service_loading_alert_message) override val onConfirmClick: (() -> Unit)? = null } data object UnavailableOperation : Basic() { - override val title: TextReference = stringReference(value = "This operation is currently unavailable") - override val message: TextReference = resourceReference(R.string.warning_some_networks_unreachable_message) + override val title: TextReference = resourceReference(R.string.action_buttons_something_wrong_alert_title) + override val message: TextReference = resourceReference(R.string.action_buttons_something_wrong_alert_message) override val onConfirmClick: (() -> Unit)? = null } @@ -111,4 +111,14 @@ internal sealed interface WalletAlertState { override val onConfirmClick: (() -> Unit)? = null } + + data object InsufficientTokensCountForSwapping : Basic() { + override val title: TextReference = + resourceReference(id = R.string.action_buttons_swap_no_tokens_added_alert_title) + + override val message: TextReference = + resourceReference(id = R.string.action_buttons_swap_no_tokens_added_alert_message) + + override val onConfirmClick: (() -> Unit)? = null + } } \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletCurrencyActionsClickIntents.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletCurrencyActionsClickIntents.kt index 3f7c720582..94496713c9 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletCurrencyActionsClickIntents.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletCurrencyActionsClickIntents.kt @@ -13,6 +13,7 @@ import com.tangem.core.ui.components.bottomsheets.chooseaddress.ChooseAddressBot import com.tangem.core.ui.components.bottomsheets.tokenreceive.AddressModel import com.tangem.core.ui.components.bottomsheets.tokenreceive.TokenReceiveBottomSheetConfig import com.tangem.core.ui.components.bottomsheets.tokenreceive.mapToAddressModels +import com.tangem.core.ui.components.tokenlist.state.TokensListItemUM import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.WrappedList import com.tangem.core.ui.extensions.resourceReference @@ -47,10 +48,7 @@ import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase import com.tangem.feature.wallet.impl.R import com.tangem.feature.wallet.presentation.wallet.domain.unwrap import com.tangem.feature.wallet.presentation.wallet.state.WalletStateController -import com.tangem.feature.wallet.presentation.wallet.state.model.WalletAlertState -import com.tangem.feature.wallet.presentation.wallet.state.model.WalletCardState -import com.tangem.feature.wallet.presentation.wallet.state.model.WalletEvent -import com.tangem.feature.wallet.presentation.wallet.state.model.WalletManageButton +import com.tangem.feature.wallet.presentation.wallet.state.model.* import com.tangem.feature.wallet.presentation.wallet.state.transformers.CloseBottomSheetTransformer import com.tangem.feature.wallet.presentation.wallet.state.transformers.DisableActionTransformer import com.tangem.feature.wallet.presentation.wallet.state.utils.WalletEventSender @@ -492,6 +490,20 @@ internal class WalletCurrencyActionsClickIntentsImplementor @Inject constructor( } override fun onMultiWalletSwapClick(userWalletId: UserWalletId) { + val selectedWallet = stateHolder.getSelectedWallet() as? WalletState.MultiCurrency.Content ?: return + val tokenListState = selectedWallet.tokensListState as? WalletTokensListState.ContentState.Content ?: return + + if (tokenListState.items.count { it is TokensListItemUM.Token } < 2) { + handleError( + userWalletId = userWalletId, + actionKClass = WalletManageButton.Swap::class, + alertState = WalletAlertState.InsufficientTokensCountForSwapping, + eventCreator = MainScreenAnalyticsEvent::ButtonSwap, + ) + + return + } + onMultiWalletActionClick( userWalletId = userWalletId, statusFlow = rampStateManager.getSwapInitializationStatus(userWalletId),