Updated on 2026-08-14

This commit is contained in:
Tangem 2024-06-03 22:18:04 +01:00
parent 86c4eb07dd
commit 3041ce00d7
5 changed files with 7 additions and 3 deletions

View file

@ -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),
)
}

View file

@ -391,6 +391,7 @@ internal class ManageTokensViewModel @Inject constructor(
event = Event.ShowAlert(
AlertState.CannotHideNetworkWithTokens(
tokenName = cryptoCurrency.name,
currencySymbol = cryptoCurrency.symbol,
networkName = cryptoCurrency.network.name,
),
),

View file

@ -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?

View file

@ -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,

View file

@ -263,6 +263,7 @@ internal class WalletCurrencyActionsClickIntentsImplementor @Inject constructor(
formatArgs = WrappedList(
listOf(
cryptoCurrencyStatus.currency.name,
cryptoCurrencyStatus.currency.symbol,
cryptoCurrencyStatus.currency.network.name,
),
),