Updated on 2026-08-14

This commit is contained in:
Tangem 2024-01-31 14:20:41 +03:00
commit 907e239a8a
32 changed files with 152 additions and 96 deletions

View file

@ -83,7 +83,7 @@ sealed class WalletScreenAnalyticsEvent {
object BackupYourWallet : MainScreen(event = "Notice - Backup Your Wallet")
object UnlockAllWithFaceID : MainScreen(event = "Button - Unlock All With Face ID")
object UnlockAllWithBiometrics : MainScreen(event = "Button - Unlock All With Biometrics")
object UnlockWithCardScan : MainScreen(event = "Button - Unlock With Card Scan")

View file

@ -1,9 +1,6 @@
package com.tangem.feature.wallet.presentation.wallet.domain
import arrow.core.Either
import arrow.core.getOrElse
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.tokens.GetPrimaryCurrencyStatusUpdatesUseCase
import com.tangem.domain.tokens.error.CurrencyStatusError
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
@ -38,15 +35,6 @@ internal suspend fun GetPrimaryCurrencyStatusUpdatesUseCase.unwrap(userWalletId:
)
}
internal suspend fun GetSelectedAppCurrencyUseCase.unwrap(): AppCurrency {
return this()
.map { maybeAppCurrency ->
maybeAppCurrency.getOrElse { AppCurrency.Default }
}
.firstOrNull()
?: AppCurrency.Default
}
internal suspend fun GetPrimaryCurrencyStatusUpdatesUseCase.collectLatest(
userWalletId: UserWalletId,
onRight: suspend (CryptoCurrencyStatus) -> Unit,

View file

@ -211,7 +211,7 @@ internal class WalletsUpdateActionResolverV2 @Inject constructor(
override fun toString(): String {
return """
Initialize(
InitializeWallets(
selectedWalletIndex = $selectedWalletIndex,
selectedWallet = ${selectedWallet.walletId},
wallets = ${wallets.joinToString { it.walletId.toString() }}

View file

@ -10,6 +10,7 @@ import com.tangem.core.ui.components.bottomsheets.tokenreceive.mapToAddressModel
import com.tangem.core.ui.extensions.WrappedList
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
import com.tangem.domain.appcurrency.extenstions.unwrap
import com.tangem.domain.common.util.cardTypesResolver
import com.tangem.domain.demo.IsDemoCardUseCase
import com.tangem.domain.redux.ReduxStateHolder

View file

@ -231,7 +231,7 @@ internal class WalletWarningsClickIntentsImplementer @Inject constructor(
}
override fun onUnlockWalletClick() {
analyticsEventHandler.send(MainScreen.UnlockAllWithFaceID)
analyticsEventHandler.send(MainScreen.UnlockAllWithBiometrics)
viewModelScope.launch(dispatchers.main) {
unlockWalletsUseCase(throwIfNotAllWalletsUnlocked = true)