Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-25 14:02:02 +03:00
parent c7fddb24a0
commit 504d0276f9
3 changed files with 11 additions and 11 deletions

View file

@ -135,9 +135,8 @@ internal class TokenDetailsViewModel @Inject constructor(
private suspend fun updateButtons(userWalletId: UserWalletId, currencyStatus: CryptoCurrencyStatus) {
val userWallet = getUserWalletUseCase(userWalletId).getOrElse { return }
getCryptoCurrencyActionsUseCase(
userWalletId = userWallet.walletId,
userWallet = userWallet,
cryptoCurrencyStatus = currencyStatus,
isSingleWalletWithTokens = userWallet.scanResponse.cardTypesResolver.isSingleWalletWithToken(),
)
.conflate()
.distinctUntilChanged()

View file

@ -920,9 +920,8 @@ internal class WalletViewModel @Inject constructor(
val userWallet = getSelectedWallet()
viewModelScope.launch(dispatchers.io) {
getCryptoCurrencyActionsUseCase(
userWalletId = userWallet.walletId,
userWallet = userWallet,
cryptoCurrencyStatus = cryptoCurrencyStatus,
isSingleWalletWithTokens = userWallet.scanResponse.cardTypesResolver.isSingleWalletWithToken(),
)
.take(count = 1)
.collectLatest {
@ -1302,9 +1301,8 @@ internal class WalletViewModel @Inject constructor(
private suspend fun updateButtons(userWallet: UserWallet, currencyStatus: CryptoCurrencyStatus) {
getCryptoCurrencyActionsUseCase(
userWalletId = userWallet.walletId,
userWallet = userWallet,
cryptoCurrencyStatus = currencyStatus,
isSingleWalletWithTokens = userWallet.scanResponse.cardTypesResolver.isSingleWalletWithToken(),
)
.conflate()
.distinctUntilChanged()