Updated on 2026-08-14

This commit is contained in:
Tangem 2024-07-03 23:40:06 +08:00
parent 2ccf6ba96e
commit 7789f437fa
3 changed files with 11 additions and 1 deletions

View file

@ -17,6 +17,7 @@ import kotlinx.collections.immutable.persistentListOf
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.update
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Singleton
@ -41,6 +42,7 @@ internal class WalletStateController @Inject constructor(
}
fun update(transformer: WalletScreenStateTransformer) {
Timber.d("Applying: ${transformer::class.simpleName}")
mutableUiState.update(function = transformer::transform)
}

View file

@ -216,6 +216,14 @@ internal class WalletViewModel @Inject constructor(
is WalletsUpdateActionResolver.Action.DeleteWallet -> deleteWallet(action)
is WalletsUpdateActionResolver.Action.UnlockWallet -> unlockWallet(action)
is WalletsUpdateActionResolver.Action.UpdateWalletCardCount -> {
// refresh loader to use actual user wallet
walletScreenContentLoader.load(
userWallet = action.selectedWallet,
clickIntents = clickIntents,
isRefresh = true,
coroutineScope = viewModelScope,
)
stateHolder.update(transformer = UpdateWalletCardsCountTransformer(action.selectedWallet))
}
is WalletsUpdateActionResolver.Action.UpdateWalletName -> {

View file

@ -87,7 +87,7 @@ markdown = "0.7.2"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "release-app_5.12-691"
tangemBlockchainSdk = "release-app_5.12-694"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "release-app_5.12-367"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^