Updated on 2026-08-14
This commit is contained in:
parent
0e86fd8553
commit
3b51b657fe
1 changed files with 12 additions and 7 deletions
|
|
@ -738,15 +738,20 @@ internal class TokenDetailsModel @Inject constructor(
|
|||
analyticsEventsHandler.send(TokenScreenAnalyticsEvent.ButtonRemoveToken(cryptoCurrency.symbol))
|
||||
|
||||
modelScope.launch {
|
||||
val canHide = cryptoCurrency is CryptoCurrency.Coin && isCryptoCurrencyCoinCouldHideUseCase(
|
||||
userWalletId = userWalletId,
|
||||
cryptoCurrencyCoin = cryptoCurrency,
|
||||
)
|
||||
val canHide = when (cryptoCurrency) {
|
||||
is CryptoCurrency.Coin -> {
|
||||
isCryptoCurrencyCoinCouldHideUseCase(
|
||||
userWalletId = userWalletId,
|
||||
cryptoCurrencyCoin = cryptoCurrency,
|
||||
)
|
||||
}
|
||||
is CryptoCurrency.Token -> true
|
||||
}
|
||||
|
||||
internalUiState.value = if (!canHide) {
|
||||
stateFactory.getStateWithLinkedTokensDialog(cryptoCurrency)
|
||||
} else {
|
||||
internalUiState.value = if (canHide) {
|
||||
stateFactory.getStateWithConfirmHideTokenDialog(cryptoCurrency)
|
||||
} else {
|
||||
stateFactory.getStateWithLinkedTokensDialog(cryptoCurrency)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue