From 3041ce00d72493a217556234ea0ce5c0aa353f67 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 3 Jun 2024 22:18:04 +0100 Subject: [PATCH] Updated on 2026-08-14 --- .../managetokens/presentation/common/state/AlertState.kt | 4 ++-- .../managetokens/viewmodels/ManageTokensViewModel.kt | 1 + .../tokendetails/state/components/TokenDetailsDialogConfig.kt | 3 ++- .../tokendetails/state/factory/TokenDetailsStateFactory.kt | 1 + .../viewmodels/intents/WalletCurrencyActionsClickIntents.kt | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/common/state/AlertState.kt b/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/common/state/AlertState.kt index 6d79799bc2..82ba359079 100644 --- a/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/common/state/AlertState.kt +++ b/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/common/state/AlertState.kt @@ -43,10 +43,10 @@ internal sealed class AlertState { ) } - class CannotHideNetworkWithTokens(tokenName: String, networkName: String) : AlertState() { + class CannotHideNetworkWithTokens(tokenName: String, currencySymbol: String, networkName: String) : AlertState() { override val message: TextReference = resourceReference( id = R.string.token_details_unable_hide_alert_message, - formatArgs = wrappedList(tokenName, networkName), + formatArgs = wrappedList(tokenName, currencySymbol, networkName), ) } diff --git a/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/managetokens/viewmodels/ManageTokensViewModel.kt b/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/managetokens/viewmodels/ManageTokensViewModel.kt index 11467bfa98..caa5ca105b 100644 --- a/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/managetokens/viewmodels/ManageTokensViewModel.kt +++ b/features/manage-tokens/impl/src/main/java/com/tangem/managetokens/presentation/managetokens/viewmodels/ManageTokensViewModel.kt @@ -391,6 +391,7 @@ internal class ManageTokensViewModel @Inject constructor( event = Event.ShowAlert( AlertState.CannotHideNetworkWithTokens( tokenName = cryptoCurrency.name, + currencySymbol = cryptoCurrency.symbol, networkName = cryptoCurrency.network.name, ), ), diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsDialogConfig.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsDialogConfig.kt index dfa224df70..47949f59c7 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsDialogConfig.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsDialogConfig.kt @@ -55,6 +55,7 @@ internal data class TokenDetailsDialogConfig( } data class HasLinkedTokensConfig( + val currencyName: String, val currencySymbol: String, val networkName: String, val onConfirmClick: () -> Unit, @@ -66,7 +67,7 @@ internal data class TokenDetailsDialogConfig( override val message: TextReference = TextReference.Res( id = R.string.token_details_unable_hide_alert_message, - formatArgs = wrappedList(currencySymbol, networkName), + formatArgs = wrappedList(currencyName, currencySymbol, networkName), ) override val cancelButtonConfig: ButtonConfig? diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsStateFactory.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsStateFactory.kt index af67c4e57d..c47c971328 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsStateFactory.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsStateFactory.kt @@ -177,6 +177,7 @@ internal class TokenDetailsStateFactory( isShow = true, onDismissRequest = clickIntents::onDismissDialog, content = TokenDetailsDialogConfig.DialogContentConfig.HasLinkedTokensConfig( + currencyName = currency.name, currencySymbol = currency.symbol, networkName = currency.network.name, onConfirmClick = clickIntents::onDismissDialog, 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 318fddb6c3..bc843df1e7 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 @@ -263,6 +263,7 @@ internal class WalletCurrencyActionsClickIntentsImplementor @Inject constructor( formatArgs = WrappedList( listOf( cryptoCurrencyStatus.currency.name, + cryptoCurrencyStatus.currency.symbol, cryptoCurrencyStatus.currency.network.name, ), ),