From 52311652f1da61177a5e3e343cdf14ba221a9567 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 12 Jan 2026 14:00:26 +0500 Subject: [PATCH 1/7] Updated on 2026-08-14 --- .../singlecurrency/TangemPayCardMainBlock.kt | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/singlecurrency/TangemPayCardMainBlock.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/singlecurrency/TangemPayCardMainBlock.kt index 0c7551a2b4..c155df8fd4 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/singlecurrency/TangemPayCardMainBlock.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/singlecurrency/TangemPayCardMainBlock.kt @@ -1,5 +1,6 @@ package com.tangem.feature.wallet.presentation.wallet.ui.components.singlecurrency +import android.content.res.Configuration import androidx.compose.foundation.Image import androidx.compose.foundation.layout.* import androidx.compose.material3.Surface @@ -9,13 +10,17 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.tangem.common.ui.R +import com.tangem.core.ui.extensions.TextReference import com.tangem.core.ui.extensions.orMaskWithStars import com.tangem.core.ui.extensions.resolveReference import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.TangemTheme +import com.tangem.core.ui.res.TangemThemePreview import com.tangem.feature.wallet.presentation.wallet.state.model.TangemPayState +import com.tangem.feature.wallet.presentation.wallet.ui.components.visa.TangemPayMainScreenBlock @Composable internal fun TangemPayCardMainBlock( @@ -33,8 +38,9 @@ internal fun TangemPayCardMainBlock( modifier = Modifier .fillMaxWidth() .height(IntrinsicSize.Min) - .padding(horizontal = 16.dp, vertical = 12.dp), + .padding(horizontal = 12.dp, vertical = 16.dp), verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(12.dp), ) { Image( painter = painterResource(R.drawable.img_visa_36), @@ -42,20 +48,15 @@ internal fun TangemPayCardMainBlock( modifier = Modifier.size(36.dp), ) - Spacer(Modifier.width(12.dp)) - Column( modifier = Modifier.weight(1f), - verticalArrangement = Arrangement.Center, + verticalArrangement = Arrangement.spacedBy(2.dp), ) { Text( text = stringResourceSafe(R.string.tangempay_payment_account), style = TangemTheme.typography.subtitle2, color = TangemTheme.colors.text.primary1, ) - - Spacer(Modifier.height(6.dp)) - Text( text = state.lastFourDigits.resolveReference(), style = TangemTheme.typography.caption2, @@ -64,6 +65,7 @@ internal fun TangemPayCardMainBlock( } Column( modifier = Modifier.fillMaxHeight(), + verticalArrangement = Arrangement.spacedBy(2.dp), horizontalAlignment = Alignment.End, ) { Text( @@ -72,14 +74,30 @@ internal fun TangemPayCardMainBlock( color = TangemTheme.colors.text.primary1, textAlign = TextAlign.End, ) - Text( text = state.balanceSymbol.resolveReference(), - style = TangemTheme.typography.body2, + style = TangemTheme.typography.caption2, color = TangemTheme.colors.text.tertiary, textAlign = TextAlign.End, ) } } } +} + +@Preview(showBackground = true) +@Preview(showBackground = true, uiMode = Configuration.UI_MODE_NIGHT_YES) +@Composable +private fun TangemPayCardMainBlockPreview() { + TangemThemePreview { + TangemPayMainScreenBlock( + TangemPayState.Card( + lastFourDigits = TextReference.Str("*1234"), + balanceText = TextReference.Str("$ 0.00"), + balanceSymbol = TextReference.Str("USDC"), + onClick = {}, + ), + isBalanceHidden = false, + ) + } } \ No newline at end of file From 80d66f252ec14aeae394dbce224c383bab9a915f Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 12 Jan 2026 19:57:31 +0300 Subject: [PATCH 2/7] Updated on 2026-08-14 --- .../appsflyer/AppsFlyerAnalyticsClient.kt | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt b/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt index 7fab19081f..4638a88856 100644 --- a/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt +++ b/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt @@ -1,6 +1,7 @@ package com.tangem.tap.common.analytics.handlers.appsflyer import android.content.Context +import com.appsflyer.AppsFlyerConversionListener import com.appsflyer.AppsFlyerLib import com.appsflyer.attribution.AppsFlyerRequestListener import com.tangem.core.analytics.api.EventLogger @@ -17,18 +18,39 @@ internal class AppsFlyerClient( private val appsFlyerLib: AppsFlyerLib = AppsFlyerLib.getInstance() private val eventConverter = UnderscoreAnalyticsEventConverter() + private val logEventListener = object : AppsFlyerRequestListener { + override fun onSuccess() { + Timber.tag("AppsFlyerClient").i("AppsFlyerRequestListener send") + } + + override fun onError(p0: Int, p1: String) { + Timber.tag("AppsFlyerClient").e("AppsFlyerRequestListener onError: $p0, $p1") + } + } init { - appsFlyerLib.init(key, null, context) - appsFlyerLib.start(context, key, object : AppsFlyerRequestListener { - override fun onSuccess() { - Timber.d("AppsFlyer initialized successfully") - } + val conversionListener = object : AppsFlyerConversionListener { + override fun onConversionDataSuccess(p0: Map?) {} + override fun onConversionDataFail(p0: String?) {} + override fun onAppOpenAttribution(p0: Map?) {} + override fun onAttributionFailure(p0: String?) {} + } - override fun onError(p0: Int, p1: String) { - Timber.e("AppsFlyer initialization error: $p0, $p1") - } - }) + appsFlyerLib.run { + setAppId(context.packageName) + setDebugLog(true) + + init(key, conversionListener, context) + start(context, key, object : AppsFlyerRequestListener { + override fun onSuccess() { + Timber.i("AppsFlyer initialized successfully") + } + + override fun onError(p0: Int, p1: String) { + Timber.e("AppsFlyer initialization error: $p0, $p1") + } + }) + } } override fun setUserId(userId: String) { @@ -44,6 +66,7 @@ internal class AppsFlyerClient( context, event, eventConverter.convertEventParams(params), + logEventListener, ) } } \ No newline at end of file From c703edde8ee28a896cf3b98c7036b21a1ecc7381 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 13 Jan 2026 07:31:15 +0300 Subject: [PATCH 3/7] Updated on 2026-08-14 --- .../appsflyer/AppsFlyerAnalyticsClient.kt | 19 +++++++++++++++---- .../appsflyer/AppsFlyerAnalyticsHandler.kt | 13 +++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt b/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt index 4638a88856..231660ff27 100644 --- a/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt +++ b/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsClient.kt @@ -30,10 +30,18 @@ internal class AppsFlyerClient( init { val conversionListener = object : AppsFlyerConversionListener { - override fun onConversionDataSuccess(p0: Map?) {} - override fun onConversionDataFail(p0: String?) {} - override fun onAppOpenAttribution(p0: Map?) {} - override fun onAttributionFailure(p0: String?) {} + override fun onConversionDataSuccess(p0: Map?) { + Timber.i("AppsFlyer conversion data success: ${p0.orEmpty()}") + } + override fun onConversionDataFail(p0: String?) { + Timber.e("AppsFlyer conversion data failure: ${p0.orEmpty()}") + } + override fun onAppOpenAttribution(p0: Map?) { + Timber.i("AppsFlyer app open attribution: ${p0.orEmpty()}") + } + override fun onAttributionFailure(p0: String?) { + Timber.e("AppsFlyer attribution failure: ${p0.orEmpty()}") + } } appsFlyerLib.run { @@ -41,6 +49,7 @@ internal class AppsFlyerClient( setDebugLog(true) init(key, conversionListener, context) + Timber.i("Starting AppsFlyer SDK") start(context, key, object : AppsFlyerRequestListener { override fun onSuccess() { Timber.i("AppsFlyer initialized successfully") @@ -50,6 +59,7 @@ internal class AppsFlyerClient( Timber.e("AppsFlyer initialization error: $p0, $p1") } }) + Timber.i("AppsFlyer SDK started") } } @@ -62,6 +72,7 @@ internal class AppsFlyerClient( } override fun logEvent(event: String, params: Map) { + Timber.tag("AppsFlyer").i("Logging event: $event with params: $params") appsFlyerLib.logEvent( context, event, diff --git a/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsHandler.kt b/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsHandler.kt index cda56807ee..14a35c89cd 100644 --- a/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsHandler.kt +++ b/app/src/main/java/com/tangem/tap/common/analytics/handlers/appsflyer/AppsFlyerAnalyticsHandler.kt @@ -6,19 +6,26 @@ import com.tangem.core.analytics.models.AnalyticsEvent import com.tangem.core.analytics.models.AppsFlyerIncludedEvent import com.tangem.core.analytics.models.AppsFlyerOnlyEvent import com.tangem.tap.common.analytics.api.AnalyticsHandlerBuilder +import timber.log.Timber class AppsFlyerAnalyticsHandler( private val client: AppsFlyerAnalyticsClient, ) : AnalyticsHandler, AnalyticsUserIdHandler { + init { + Timber.tag("AppsFlyer").i("AppsFlyer Analytics Handler created") + } + override fun id(): String = ID override fun send(event: AnalyticsEvent) { when (event) { is AppsFlyerOnlyEvent -> { + Timber.tag("AppsFlyer").i("Sending event to AppsFlyer: ${event.id} with params: ${event.params}") client.logEvent(event.id, event.params) } is AppsFlyerIncludedEvent -> { + Timber.tag("AppsFlyer").i("Sending event to AppsFlyer: ${event.id} with params: ${event.params}") client.logEvent( event = AnalyticsEvent(category = event.category, event = event.appsFlyerReplacedEvent).id, params = event.params, @@ -40,10 +47,16 @@ class AppsFlyerAnalyticsHandler( } class Builder : AnalyticsHandlerBuilder { + init { + Timber.tag("AppsFlyer").i("AppsFlyer Analytics Handler Builder created") + } + override fun build(data: AnalyticsHandlerBuilder.Data): AnalyticsHandler = AppsFlyerAnalyticsHandler( client = if (data.logConfig.isAppsflyerLogEnabled) { + Timber.tag("AppsFlyer").i("AppsFlyer log enabled, mock client created") AppsFlyerLogClient(data.jsonConverter) } else { + Timber.tag("AppsFlyer").i("AppsFlyer log disabled, real client created") AppsFlyerClient(data.application, data.config.appsFlyerApiKey) }, ) From 8e77f5b2d3c79352f17a8656e9a83f0625a10c84 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 13 Jan 2026 14:17:00 +0500 Subject: [PATCH 4/7] Updated on 2026-08-14 --- .../tap/di/domain/WalletsDomainModule.kt | 20 ------------- .../data/wallets/DefaultWalletsRepository.kt | 13 --------- .../wallets/repository/WalletsRepository.kt | 4 --- ...DismissUpgradeWalletNotificationUseCase.kt | 12 -------- ...UpgradeWalletNotificationEnabledUseCase.kt | 13 --------- .../hotwallet/accesscode/ui/AccessCode.kt | 2 +- .../forgetwallet/ForgetWalletModel.kt | 28 ++++++------------- .../forgetwallet/entity/ForgetWalletUM.kt | 6 ++-- .../forgetwallet/ui/ForgetWalletContent.kt | 17 +++-------- .../preview/PreviewWalletSettingsComponent.kt | 2 -- .../entity/WalletSettingsItemUM.kt | 1 - .../model/WalletSettingsModel.kt | 19 ++----------- .../walletsettings/ui/WalletSettingsScreen.kt | 2 -- .../walletsettings/utils/ItemsBuilder.kt | 27 ++++++------------ .../welcome/impl/ui/WelcomeSelectWallet.kt | 2 +- 15 files changed, 27 insertions(+), 141 deletions(-) delete mode 100644 domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/DismissUpgradeWalletNotificationUseCase.kt delete mode 100644 domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/IsUpgradeWalletNotificationEnabledUseCase.kt diff --git a/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt b/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt index f6d5141d1e..374af96dd0 100644 --- a/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt +++ b/app/src/main/java/com/tangem/tap/di/domain/WalletsDomainModule.kt @@ -396,26 +396,6 @@ internal object WalletsDomainModule { ) } - @Provides - @Singleton - fun providesIsUpgradeWalletNotificationEnabledUseCase( - walletsRepository: WalletsRepository, - ): IsUpgradeWalletNotificationEnabledUseCase { - return IsUpgradeWalletNotificationEnabledUseCase( - walletsRepository = walletsRepository, - ) - } - - @Provides - @Singleton - fun providesDismissUpgradeWalletNotificationUseCase( - walletsRepository: WalletsRepository, - ): DismissUpgradeWalletNotificationUseCase { - return DismissUpgradeWalletNotificationUseCase( - walletsRepository = walletsRepository, - ) - } - @Provides @Singleton fun providesUnlockHotWalletContextualUseCase( diff --git a/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt b/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt index 45b444d02f..def9a96402 100644 --- a/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt +++ b/data/wallets/src/main/java/com/tangem/data/wallets/DefaultWalletsRepository.kt @@ -50,9 +50,6 @@ internal class DefaultWalletsRepository( private val moshi: com.squareup.moshi.Moshi, ) : WalletsRepository { - private val upgradeWalletNotificationDisabled: MutableStateFlow> = - MutableStateFlow(mutableSetOf()) - @Deprecated("Hot wallet feature makes app always save user wallets. Do not use this method") override suspend fun shouldSaveUserWalletsSync(): Boolean { return appPreferencesStore.getSyncOrDefault(key = PreferencesKeys.SAVE_USER_WALLETS_KEY, default = false) @@ -339,16 +336,6 @@ internal class DefaultWalletsRepository( } } - override fun isUpgradeWalletNotificationEnabled(userWalletId: UserWalletId): Flow { - return upgradeWalletNotificationDisabled.map { - it.contains(userWalletId) - } - } - - override suspend fun dismissUpgradeWalletNotification(userWalletId: UserWalletId) { - upgradeWalletNotificationDisabled.update { it.plus(userWalletId) } - } - override suspend fun setWalletName(walletId: UserWalletId, walletName: String) = withContext(dispatchers.io) { val userWallet = userWalletsStore.getSyncOrNull(key = walletId) diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt index 430653e85c..1431dc5e6f 100644 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt +++ b/domain/wallets/src/main/java/com/tangem/domain/wallets/repository/WalletsRepository.kt @@ -60,10 +60,6 @@ interface WalletsRepository { suspend fun setNotificationsEnabled(userWalletId: UserWalletId, isEnabled: Boolean) - fun isUpgradeWalletNotificationEnabled(userWalletId: UserWalletId): Flow - - suspend fun dismissUpgradeWalletNotification(userWalletId: UserWalletId) - @Throws suspend fun setWalletName(walletId: UserWalletId, walletName: String) diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/DismissUpgradeWalletNotificationUseCase.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/DismissUpgradeWalletNotificationUseCase.kt deleted file mode 100644 index 2aeb755fba..0000000000 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/DismissUpgradeWalletNotificationUseCase.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.tangem.domain.wallets.usecase - -import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.domain.wallets.repository.WalletsRepository - -class DismissUpgradeWalletNotificationUseCase( - private val walletsRepository: WalletsRepository, -) { - suspend operator fun invoke(userWalletId: UserWalletId) { - walletsRepository.dismissUpgradeWalletNotification(userWalletId) - } -} \ No newline at end of file diff --git a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/IsUpgradeWalletNotificationEnabledUseCase.kt b/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/IsUpgradeWalletNotificationEnabledUseCase.kt deleted file mode 100644 index d38fec4fe2..0000000000 --- a/domain/wallets/src/main/java/com/tangem/domain/wallets/usecase/IsUpgradeWalletNotificationEnabledUseCase.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.tangem.domain.wallets.usecase - -import com.tangem.domain.models.wallet.UserWalletId -import com.tangem.domain.wallets.repository.WalletsRepository -import kotlinx.coroutines.flow.Flow - -class IsUpgradeWalletNotificationEnabledUseCase( - private val walletsRepository: WalletsRepository, -) { - operator fun invoke(userWalletId: UserWalletId): Flow { - return walletsRepository.isUpgradeWalletNotificationEnabled(userWalletId) - } -} \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/ui/AccessCode.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/ui/AccessCode.kt index f92f63bdfe..0be023b18b 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/ui/AccessCode.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/ui/AccessCode.kt @@ -104,7 +104,7 @@ internal fun AccessCode( ) { PinTextField( length = state.accessCodeLength, - isPasswordVisual = state.isConfirmMode, + isPasswordVisual = true, value = state.accessCode, pinTextColor = state.accessCodeColor, onValueChange = state.onAccessCodeChange, diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ForgetWalletModel.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ForgetWalletModel.kt index 88fc9882cd..a4d9c89ffb 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ForgetWalletModel.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ForgetWalletModel.kt @@ -38,31 +38,19 @@ internal class ForgetWalletModel @Inject constructor( field = MutableStateFlow( ForgetWalletUM( onBackClick = { router.pop() }, - firstCheckboxChecked = false, - secondCheckboxChecked = false, - onFirstCheckboxClick = ::onFirstCheckboxClick, - onSecondCheckboxClick = ::onSecondCheckboxClick, + isCheckboxChecked = false, + onCheckboxClick = ::onCheckboxClick, onForgetWalletClick = ::onForgetWalletClick, isForgetButtonEnabled = false, ), ) - private fun onFirstCheckboxClick() { - uiState.update { - val newValue = !it.firstCheckboxChecked - it.copy( - firstCheckboxChecked = newValue, - isForgetButtonEnabled = newValue && it.secondCheckboxChecked, - ) - } - } - - private fun onSecondCheckboxClick() { - uiState.update { - val newValue = !it.secondCheckboxChecked - it.copy( - secondCheckboxChecked = newValue, - isForgetButtonEnabled = it.firstCheckboxChecked && newValue, + private fun onCheckboxClick() { + uiState.update { currentState -> + val newValue = !currentState.isCheckboxChecked + currentState.copy( + isCheckboxChecked = newValue, + isForgetButtonEnabled = newValue, ) } } diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/entity/ForgetWalletUM.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/entity/ForgetWalletUM.kt index 0cb0af23d1..f84f77d5c5 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/entity/ForgetWalletUM.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/entity/ForgetWalletUM.kt @@ -2,10 +2,8 @@ package com.tangem.features.hotwallet.forgetwallet.entity internal data class ForgetWalletUM( val onBackClick: () -> Unit, - val firstCheckboxChecked: Boolean, - val secondCheckboxChecked: Boolean, - val onFirstCheckboxClick: () -> Unit, - val onSecondCheckboxClick: () -> Unit, + val isCheckboxChecked: Boolean, + val onCheckboxClick: () -> Unit, val onForgetWalletClick: () -> Unit, val isForgetButtonEnabled: Boolean, ) \ No newline at end of file diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ui/ForgetWalletContent.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ui/ForgetWalletContent.kt index 5e4d2f42ec..5dfc22b13c 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ui/ForgetWalletContent.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/forgetwallet/ui/ForgetWalletContent.kt @@ -70,15 +70,8 @@ internal fun ForgetWalletContent(state: ForgetWalletUM, modifier: Modifier = Mod Spacer(modifier = Modifier.height(48.dp)) CheckboxItem( modifier = Modifier.padding(horizontal = 16.dp), - checked = state.firstCheckboxChecked, - onCheckedChange = state.onFirstCheckboxClick, - text = stringResourceSafe(R.string.hw_remove_wallet_warning_device), - ) - Spacer(modifier = Modifier.height(16.dp)) - CheckboxItem( - modifier = Modifier.padding(horizontal = 16.dp), - checked = state.secondCheckboxChecked, - onCheckedChange = state.onSecondCheckboxClick, + checked = state.isCheckboxChecked, + onCheckedChange = state.onCheckboxClick, text = stringResourceSafe(R.string.hw_remove_wallet_warning_access), ) Spacer(modifier = Modifier.height(32.dp)) @@ -142,10 +135,8 @@ private fun PreviewForgetWalletContent() { ForgetWalletContent( state = ForgetWalletUM( onBackClick = {}, - firstCheckboxChecked = true, - secondCheckboxChecked = false, - onFirstCheckboxClick = {}, - onSecondCheckboxClick = {}, + isCheckboxChecked = false, + onCheckboxClick = {}, onForgetWalletClick = {}, isForgetButtonEnabled = false, ), diff --git a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/component/preview/PreviewWalletSettingsComponent.kt b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/component/preview/PreviewWalletSettingsComponent.kt index bdf3f94838..34449ac010 100644 --- a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/component/preview/PreviewWalletSettingsComponent.kt +++ b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/component/preview/PreviewWalletSettingsComponent.kt @@ -65,9 +65,7 @@ internal class PreviewWalletSettingsComponent : WalletSettingsComponent { onNotificationsDescriptionClick = {}, isNotificationsPermissionGranted = false, onAccessCodeClick = {}, - walletUpgradeDismissed = false, onUpgradeWalletClick = {}, - onDismissUpgradeWalletClick = {}, onBackupClick = {}, onCardSettingsClick = {}, accountsUM = previewAccounts(), diff --git a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/entity/WalletSettingsItemUM.kt b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/entity/WalletSettingsItemUM.kt index 668efd566b..a495db9417 100644 --- a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/entity/WalletSettingsItemUM.kt +++ b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/entity/WalletSettingsItemUM.kt @@ -52,7 +52,6 @@ internal sealed class WalletSettingsItemUM { val title: TextReference, val description: TextReference, val onClick: () -> Unit, - val onDismissClick: () -> Unit, ) : WalletSettingsItemUM() } diff --git a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/model/WalletSettingsModel.kt b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/model/WalletSettingsModel.kt index b5ba400298..8e97fb4927 100644 --- a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/model/WalletSettingsModel.kt +++ b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/model/WalletSettingsModel.kt @@ -86,8 +86,6 @@ internal class WalletSettingsModel @Inject constructor( private val settingsManager: SettingsManager, private val permissionsRepository: PermissionRepository, private val notificationsRepository: NotificationsRepository, - private val isUpgradeWalletNotificationEnabledUseCase: IsUpgradeWalletNotificationEnabledUseCase, - private val dismissUpgradeWalletNotificationUseCase: DismissUpgradeWalletNotificationUseCase, private val unlockHotWalletContextualUseCase: UnlockHotWalletContextualUseCase, private val accountsFeatureToggles: AccountsFeatureToggles, private val isAccountsModeEnabledUseCase: IsAccountsModeEnabledUseCase, @@ -140,10 +138,9 @@ internal class WalletSettingsModel @Inject constructor( flow2 = getWalletNotificationsEnabledUseCase(params.userWalletId) .distinctUntilChanged() .conflate(), - flow3 = isUpgradeWalletNotificationEnabledUseCase(params.userWalletId), - flow4 = walletCardItemDelegate.cardItemFlow(wallet), - flow5 = accountItemsDelegate.loadAccount(wallet), - ) { nftEnabled, notificationsEnabled, isUpgradeNotificationEnabled, cardItem, accountList -> + flow3 = walletCardItemDelegate.cardItemFlow(wallet), + flow4 = accountItemsDelegate.loadAccount(wallet), + ) { nftEnabled, notificationsEnabled, cardItem, accountList -> val isWalletBackedUp = when (wallet) { is UserWallet.Hot -> wallet.backedUp is UserWallet.Cold -> true @@ -156,7 +153,6 @@ internal class WalletSettingsModel @Inject constructor( isNFTEnabled = nftEnabled, isNotificationsEnabled = notificationsEnabled, isNotificationsPermissionGranted = isNotificationsPermissionGranted(), - isUpgradeNotificationEnabled = isUpgradeNotificationEnabled, accountList = accountList, ), accountReorderUM = AccountReorderUM( @@ -197,7 +193,6 @@ internal class WalletSettingsModel @Inject constructor( isNFTEnabled: Boolean, isNotificationsEnabled: Boolean, isNotificationsPermissionGranted: Boolean, - isUpgradeNotificationEnabled: Boolean, accountList: List, ): PersistentList { val isAccountsFeatureEnabled = accountsFeatureToggles.isFeatureEnabled @@ -254,9 +249,7 @@ internal class WalletSettingsModel @Inject constructor( onCheckedNotificationsChanged = ::onCheckedNotificationsChange, onNotificationsDescriptionClick = ::onNotificationsDescriptionClick, onAccessCodeClick = { onAccessCodeClick(userWallet) }, - walletUpgradeDismissed = isUpgradeNotificationEnabled, onUpgradeWalletClick = { onUpgradeWalletClick() }, - onDismissUpgradeWalletClick = ::onDismissUpgradeWalletClick, onBackupClick = ::onBackupClick, onCardSettingsClick = ::onCardSettingsClick, accountsUM = accountList, @@ -411,12 +404,6 @@ internal class WalletSettingsModel @Inject constructor( } } - private fun onDismissUpgradeWalletClick() { - modelScope.launch { - dismissUpgradeWalletNotificationUseCase.invoke(params.userWalletId) - } - } - private fun onBackupClick() { analyticsEventHandler.send(WalletSettingsAnalyticEvents.ButtonBackup()) router.push(AppRoute.WalletBackup(params.userWalletId)) diff --git a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/ui/WalletSettingsScreen.kt b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/ui/WalletSettingsScreen.kt index 3041a0c1c6..7f9cb9d418 100644 --- a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/ui/WalletSettingsScreen.kt +++ b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/ui/WalletSettingsScreen.kt @@ -281,7 +281,6 @@ private fun UpgradeWalletBlock(model: WalletSettingsItemUM.UpgradeWallet, modifi iconResId = R.drawable.ic_hardware_backup_36, iconSize = 36.dp, onClick = model.onClick, - onCloseClick = model.onDismissClick, shouldShowArrowIcon = false, ), modifier = modifier, @@ -493,7 +492,6 @@ private fun Preview_WalletSettingsScreen1() { title = stringReference("Upgrade wallet with a hardware backup"), description = stringReference("Keep your crypto safe with Tangem’s best-in-class hardware wallet."), onClick = {}, - onDismissClick = {}, ), ) } diff --git a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/utils/ItemsBuilder.kt b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/utils/ItemsBuilder.kt index ed3c42d51e..86b1637320 100644 --- a/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/utils/ItemsBuilder.kt +++ b/features/wallet-settings/impl/src/main/kotlin/com/tangem/feature/walletsettings/utils/ItemsBuilder.kt @@ -38,9 +38,7 @@ internal class ItemsBuilder @Inject constructor() { onReferralClick: () -> Unit, onManageTokensClick: () -> Unit, onAccessCodeClick: () -> Unit, - walletUpgradeDismissed: Boolean, onUpgradeWalletClick: () -> Unit, - onDismissUpgradeWalletClick: () -> Unit, onBackupClick: () -> Unit, onCardSettingsClick: () -> Unit, ): PersistentList = persistentListOf() @@ -48,9 +46,7 @@ internal class ItemsBuilder @Inject constructor() { .addAll( buildUpgradeWalletItem( userWallet = userWallet, - walletUpgradeDismissed = walletUpgradeDismissed, onUpgradeWalletClick = onUpgradeWalletClick, - onDismissUpgradeWalletClick = onDismissUpgradeWalletClick, ), ) .addAll(buildAccessCodeItem(userWallet, onAccessCodeClick)) @@ -122,24 +118,17 @@ internal class ItemsBuilder @Inject constructor() { private fun buildUpgradeWalletItem( userWallet: UserWallet, - walletUpgradeDismissed: Boolean, onUpgradeWalletClick: () -> Unit, - onDismissUpgradeWalletClick: () -> Unit, ): List = when (userWallet) { is UserWallet.Cold -> emptyList() - is UserWallet.Hot -> if (!walletUpgradeDismissed) { - listOf( - WalletSettingsItemUM.UpgradeWallet( - id = "upgrade_wallet", - title = resourceReference(id = R.string.hw_upgrade_to_cold_banner_title), - description = resourceReference(id = R.string.hw_upgrade_to_cold_banner_description), - onClick = onUpgradeWalletClick, - onDismissClick = onDismissUpgradeWalletClick, - ), - ) - } else { - emptyList() - } + is UserWallet.Hot -> listOf( + WalletSettingsItemUM.UpgradeWallet( + id = "upgrade_wallet", + title = resourceReference(id = R.string.hw_upgrade_to_cold_banner_title), + description = resourceReference(id = R.string.hw_upgrade_to_cold_banner_description), + onClick = onUpgradeWalletClick, + ), + ) } private fun buildNotificationsPermissionItem() = WalletSettingsItemUM.NotificationPermission( diff --git a/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt b/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt index 17c774d9ad..0ede259e38 100644 --- a/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt +++ b/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt @@ -83,7 +83,7 @@ internal fun AnimatedContentScope.WelcomeSelectWallet(state: WelcomeUM.SelectWal BottomFade(modifier = Modifier.align(Alignment.BottomCenter)) if (state.showUnlockWithBiometricButton) { - SecondaryButton( + PrimaryButton( modifier = Modifier .align(Alignment.BottomCenter) .fillMaxWidth() From c9962706e325927a95b7f300d8322c48baf24184 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 14 Jan 2026 18:43:48 +0300 Subject: [PATCH 5/7] Updated on 2026-08-14 --- .../tangem/feature/swap/model/SwapModel.kt | 56 ++++++++++++------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt b/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt index cbed111a44..38d591dd72 100644 --- a/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt +++ b/features/swap/impl/src/main/java/com/tangem/feature/swap/model/SwapModel.kt @@ -1039,6 +1039,7 @@ internal class SwapModel @Inject constructor( } } + @Suppress("LongMethod") private fun onTokenSelect(id: String) { val tokens = dataState.tokensDataState ?: return val (foundToken, foundAccount) = getSelectedTokenAndAccount(tokens, id) @@ -1069,6 +1070,8 @@ internal class SwapModel @Inject constructor( coin = newToken, isFromCurrency = true, ) + } else { + fromTokenBalanceJobHolder.cancel() } } else { fromToken = initialFromStatus @@ -1087,6 +1090,8 @@ internal class SwapModel @Inject constructor( coin = newToken, isFromCurrency = false, ) + } else { + toTokenBalanceJobHolder.cancel() } } @@ -1141,6 +1146,7 @@ internal class SwapModel @Inject constructor( } } + @Suppress("LongMethod", "CyclomaticComplexMethod") private fun subscribeToCoinBalanceUpdates( userWalletId: UserWalletId, coin: CryptoCurrency.Coin, @@ -1163,20 +1169,25 @@ internal class SwapModel @Inject constructor( ).getOrNull() ?: currencyStatus, ) - uiState = if (isFromCurrency) { - dataState = dataState.copy( - fromCryptoCurrency = currencyStatus, - fromAccount = account, - ) - stateBuilder.updateSendCurrencyBalance(uiState, currencyStatus) - } else { - dataState = dataState.copy( - toCryptoCurrency = currencyStatus, - toAccount = account, - ) - stateBuilder.updateReceiveCurrencyBalance(uiState, currencyStatus) + uiState = when { + isFromCurrency && currencyStatus.currency.id == dataState.fromCryptoCurrency?.currency?.id -> { + dataState = dataState.copy( + fromCryptoCurrency = currencyStatus, + fromAccount = account, + ) + stateBuilder.updateSendCurrencyBalance(uiState, currencyStatus) + } + !isFromCurrency && currencyStatus.currency.id == dataState.toCryptoCurrency?.currency?.id -> { + dataState = dataState.copy( + toCryptoCurrency = currencyStatus, + toAccount = account, + ) + stateBuilder.updateReceiveCurrencyBalance(uiState, currencyStatus) + } + else -> { + uiState + } } - startLoadingQuotesFromLastState(isSilent = true) } } else { @@ -1196,14 +1207,19 @@ internal class SwapModel @Inject constructor( ).getOrNull() ?: status, ) - uiState = if (isFromCurrency) { - dataState = dataState.copy(fromCryptoCurrency = status) - stateBuilder.updateSendCurrencyBalance(uiState, status) - } else { - dataState = dataState.copy(toCryptoCurrency = status) - stateBuilder.updateReceiveCurrencyBalance(uiState, status) + uiState = when { + isFromCurrency && status.currency.id == dataState.fromCryptoCurrency?.currency?.id -> { + dataState = dataState.copy(fromCryptoCurrency = status) + stateBuilder.updateSendCurrencyBalance(uiState, status) + } + !isFromCurrency && status.currency.id == dataState.toCryptoCurrency?.currency?.id -> { + dataState = dataState.copy(toCryptoCurrency = status) + stateBuilder.updateReceiveCurrencyBalance(uiState, status) + } + else -> { + uiState + } } - startLoadingQuotesFromLastState(isSilent = true) } }.flowOn(dispatchers.main) From af99b446cd9bbc7a50c8b846e719d8449f4ddddf Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 16 Jan 2026 11:45:36 +0300 Subject: [PATCH 6/7] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 21f77fa638..9f09031069 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -11,7 +11,7 @@ tangemCardSdk = "releases-5.32-574" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ tangemVico = "2.0.0-alpha.25-tangem12" #tangemVico = "0.0.1" # Keep it! - used for local builds ^ -tangemHotSdk = "develop-539" +tangemHotSdk = "develop-541" #tangemHotSdk = "0.0.1" # Keep it! - used for local builds ^ From c55b834b86a574444e7d8f385709ba2a0987d360 Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 16 Jan 2026 09:53:17 +0000 Subject: [PATCH 7/7] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 9f09031069..fdc2399973 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -5,13 +5,13 @@ # https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/vico -tangemBlockchainSdk = "releases-5.32-1335" +tangemBlockchainSdk = "develop-1365" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "releases-5.32-574" +tangemCardSdk = "develop-573" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ tangemVico = "2.0.0-alpha.25-tangem12" #tangemVico = "0.0.1" # Keep it! - used for local builds ^ -tangemHotSdk = "develop-541" +tangemHotSdk = "develop-539" #tangemHotSdk = "0.0.1" # Keep it! - used for local builds ^