Updated on 2026-08-14
This commit is contained in:
parent
14135be555
commit
2d6bce9eb3
4 changed files with 70 additions and 25 deletions
|
|
@ -882,10 +882,13 @@ internal class WalletViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
override fun onTokenItemLongClick(cryptoCurrencyStatus: CryptoCurrencyStatus) {
|
||||
val state = uiState as? WalletState.ContentState ?: return
|
||||
val userWallet = getWallet(state.walletsListConfig.selectedWalletIndex)
|
||||
val userWallet = getSelectedWallet()
|
||||
viewModelScope.launch(dispatchers.io) {
|
||||
getCryptoCurrencyActionsUseCase(userWallet.walletId, cryptoCurrencyStatus)
|
||||
getCryptoCurrencyActionsUseCase(
|
||||
userWalletId = userWallet.walletId,
|
||||
cryptoCurrencyStatus = cryptoCurrencyStatus,
|
||||
isSingleWalletWithTokens = userWallet.scanResponse.cardTypesResolver.isSingleWalletWithToken(),
|
||||
)
|
||||
.take(count = 1)
|
||||
.collectLatest {
|
||||
uiState = stateFactory.getStateWithTokenActionBottomSheet(it)
|
||||
|
|
@ -1262,8 +1265,13 @@ internal class WalletViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun updateButtons(userWalletId: UserWalletId, currencyStatus: CryptoCurrencyStatus) {
|
||||
getCryptoCurrencyActionsUseCase(userWalletId = userWalletId, cryptoCurrencyStatus = currencyStatus)
|
||||
private suspend fun updateButtons(userWalletId: UserWalletId, currencyStatus: CryptoCurrencyStatus) {
|
||||
val userWallet = getSelectedWallet()
|
||||
getCryptoCurrencyActionsUseCase(
|
||||
userWalletId = userWalletId,
|
||||
cryptoCurrencyStatus = currencyStatus,
|
||||
isSingleWalletWithTokens = userWallet.scanResponse.cardTypesResolver.isSingleWalletWithToken(),
|
||||
)
|
||||
.conflate()
|
||||
.distinctUntilChanged()
|
||||
.onEach { uiState = stateFactory.getSingleCurrencyManageButtonsState(actionsState = it) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue