diff --git a/core/res/src/main/res/values-ru/strings.xml b/core/res/src/main/res/values-ru/strings.xml index 04c5129fac..e7e9bccc89 100644 --- a/core/res/src/main/res/values-ru/strings.xml +++ b/core/res/src/main/res/values-ru/strings.xml @@ -694,6 +694,7 @@ Отсканируйте карту или кольцо, чтобы изменить ее настройки. Изменения затронут только ту карту или кольцо, которые вы отсканировали, и не повлияют на другие устройства, привязанные к вашему кошельку. Приготовьте свой Tangem! Уведомление безопасности + Да На вашем балансе недостаточно средств для продажи криптовалюты. Пожалуйста, пополните нужный актив, чтобы продолжить. Недостаточно средств Продажа криптовалюты в вашем регионе временно недоступна. Мы активно работаем над тем, чтобы добавить эту возможность. Следите за нашими новостями! @@ -897,6 +898,8 @@ Встречайте Tangem Обменивайте, покупайте NFT, получайте займы и делайте вклады в более чем 100 различных децентрализованных сервисах Поддержка Web 3.0 + Для отправки требуется входящая транзакция на сумму не менее %1$s + Недостаточно средств Комиссия сети за одобрение токена будет взиматься за подтверждение того, что именно вы разрешаете использовать ваш токен для обмена. Обменивайте больше токенов по лучшим курсам прямо в вашем кошельке. Новый провайдер обмена! @@ -1110,6 +1113,7 @@ Нравится Tangem? Вам необходимо провести ассоциацию токена для того, чтобы иметь возможность принимать его Необходима плата за аренду сети + Вы обращались в службу поддержки через приложение в течение 7 дней после создания кошелька? Если обращались или не уверены, нажмите «Да» и следуйте инструкциям. Спасибо! Всё в порядке! Дальнейшие действия не требуются. Вы будете перенаправлены на официальный сайт Tangem. Пожалуйста, прочитайте и выполните указанные там инструкции. Вы когда-либо обращались в службу поддержки Tangem напрямую из этого приложения? diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml index 15e6dcf94d..8efdb73f1b 100644 --- a/core/res/src/main/res/values/strings.xml +++ b/core/res/src/main/res/values/strings.xml @@ -886,6 +886,8 @@ Meet Tangem Exchange, buy NFT\'s, make loans and deposits in more than 100 different decentralized services Web 3.0 Compatible + An incoming transaction of at least %1$s is required to proceed + Insufficient funds The network will charge a token approval fee to verify that you are authorizing the use of your token for the swap. Exchange more tokens at better rates directly in your wallet. New Swap Provider Available! @@ -985,6 +987,9 @@ Rename wallet Unlock all Unlock all with %s + Unlock + Scan your card to unlock access + Needed unlock Blockchain is unreachable. Try later Scan card or ring This wallet has already been activated earlier.\nIf it was not done by you, please contact support.\nTangem never sells wallets along with pre-generated access codes. @@ -1099,7 +1104,7 @@ You must associate your token before receiving tokens Network rent fee required Action required - Did you contact support via the app or email within 7 days of creating a wallet? If you did or are unsure, follow and complete the instructions. + Did you contact support via the app within 7 days of creating your wallet? If yes, or if you\'re unsure, click \'Yes\' and follow the instructions. Thank you! All set! No further actions required. You will now be redirected to the official Tangem website. Please read and follow instructions there. Have you ever contacted the Tangem support team directly through this application? diff --git a/data/visa/src/main/kotlin/com/tangem/data/visa/utils/VisaApiRequestMaker.kt b/data/visa/src/main/kotlin/com/tangem/data/visa/utils/VisaApiRequestMaker.kt index d06d1fb0de..538c665358 100644 --- a/data/visa/src/main/kotlin/com/tangem/data/visa/utils/VisaApiRequestMaker.kt +++ b/data/visa/src/main/kotlin/com/tangem/data/visa/utils/VisaApiRequestMaker.kt @@ -91,6 +91,11 @@ internal class VisaApiRequestMaker @Inject constructor( private suspend fun getAuthTokens(userWalletId: UserWalletId): VisaAuthTokens { val userWallet = findVisaUserWallet(userWalletId) val status = userWallet.scanResponse.visaCardActivationStatus ?: error("Visa card activation status not found") + + if (status is VisaCardActivationStatus.RefreshTokenExpired) { + throw RefreshTokenExpiredException() + } + return (status as? VisaCardActivationStatus.Activated)?.visaAuthTokens ?: error("Visa card is not activated") } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt index cc8e0c9c5e..12a4cf918c 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/analytics/utils/WalletWarningsAnalyticsSender.kt @@ -59,6 +59,7 @@ internal class WalletWarningsAnalyticsSender @Inject constructor( is WalletNotification.Warning.SomeNetworksUnreachable, is WalletNotification.Warning.NetworksUnreachable, is WalletNotification.UsedOutdatedData, + is WalletNotification.UnlockVisaAccess, -> null is WalletNotification.Critical.SeedPhraseNotification -> MainScreen.NoticeSeedPhraseSupport is WalletNotification.Critical.SeedPhraseSecondNotification -> MainScreen.NoticeSeedPhraseSupportSecond diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt index 6cb194fd18..203a35a3a8 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletNotification.kt @@ -191,6 +191,19 @@ sealed class WalletNotification(val config: NotificationConfig) { ), ) + data class UnlockVisaAccess(val onUnlockClick: () -> Unit) : WalletNotification( + config = NotificationConfig( + title = resourceReference(id = R.string.visa_unlock_notification_title), + subtitle = resourceReference(id = R.string.visa_unlock_notification_subtitle), + iconResId = R.drawable.ic_locked_24, + buttonsState = NotificationConfig.ButtonsState.PrimaryButtonConfig( + text = resourceReference(id = R.string.visa_unlock_notification_button), + iconResId = R.drawable.ic_tangem_24, + onClick = onUnlockClick, + ), + ), + ) + data class RateApp( val onLikeClick: () -> Unit, val onDislikeClick: () -> Unit, diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletState.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletState.kt index 885e370725..42b4839fc4 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletState.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/model/WalletState.kt @@ -12,6 +12,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.holder.TxHistor import com.tangem.feature.wallet.presentation.wallet.state.model.holder.WalletStateHolder import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.PersistentList +import kotlinx.collections.immutable.persistentListOf internal const val NOT_INITIALIZED_WALLET_INDEX = -1 @@ -115,5 +116,27 @@ internal sealed interface WalletState : WalletStateHolder { override val balancesAndLimitBlockState: BalancesAndLimitsBlockState? = null } + + data class AccessTokenLocked( + override val walletCardState: WalletCardState, + override val buttons: PersistentList, + override val bottomSheetConfig: TangemBottomSheetConfig?, + val onExploreClick: () -> Unit, + val onUnlockVisaAccessNotificationClick: () -> Unit, + ) : Visa(), + TxHistoryStateHolder by LockedTxHistoryStateHolder(onExploreClick), + WalletStateHolder by LockedWalletStateHolder( + walletCardState = walletCardState, + buttons = buttons, + bottomSheetConfig = bottomSheetConfig, + onUnlockNotificationClick = {}, + ) { + + override val warnings: ImmutableList = persistentListOf( + WalletNotification.UnlockVisaAccess(onUnlockClick = onUnlockVisaAccessNotificationClick), + ) + + override val balancesAndLimitBlockState: BalancesAndLimitsBlockState? = null + } } } \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/CloseBottomSheetTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/CloseBottomSheetTransformer.kt index feeea1a264..8bfcd6adaf 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/CloseBottomSheetTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/CloseBottomSheetTransformer.kt @@ -25,6 +25,9 @@ internal class CloseBottomSheetTransformer(userWalletId: UserWalletId) : WalletS is WalletState.Visa.Locked -> prevState.copy( bottomSheetConfig = updateConfig(prevState), ) + is WalletState.Visa.AccessTokenLocked -> prevState.copy( + bottomSheetConfig = updateConfig(prevState), + ) } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/OpenBottomSheetTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/OpenBottomSheetTransformer.kt index 46ffbf9066..1d3bcc9423 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/OpenBottomSheetTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/OpenBottomSheetTransformer.kt @@ -31,6 +31,9 @@ internal class OpenBottomSheetTransformer( is WalletState.Visa.Locked -> prevState.copy( bottomSheetConfig = updateConfig(), ) + is WalletState.Visa.AccessTokenLocked -> prevState.copy( + bottomSheetConfig = updateConfig(), + ) } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/RenameWalletsTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/RenameWalletsTransformer.kt index 9dd8ccb8f9..d9141b8c48 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/RenameWalletsTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/RenameWalletsTransformer.kt @@ -44,6 +44,7 @@ internal class RenameWalletsTransformer( is WalletState.MultiCurrency.Locked, is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.e("Impossible to rename wallet in locked state") prevState diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetBalancesAndLimitsTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetBalancesAndLimitsTransformer.kt index cd0675560d..421848db63 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetBalancesAndLimitsTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetBalancesAndLimitsTransformer.kt @@ -7,6 +7,7 @@ import com.tangem.core.ui.format.bigdecimal.crypto import com.tangem.core.ui.format.bigdecimal.fiat import com.tangem.core.ui.format.bigdecimal.format import com.tangem.domain.common.util.getCardsCount +import com.tangem.domain.visa.exception.RefreshTokenExpiredException import com.tangem.domain.visa.model.VisaCurrency import com.tangem.domain.wallets.models.UserWallet import com.tangem.feature.wallet.presentation.wallet.state.model.BalancesAndLimitsBlockState @@ -29,6 +30,10 @@ internal class SetBalancesAndLimitsTransformer( override fun transformTyped(prevState: WalletState.Visa.Content): WalletState { val visaCurrency = maybeVisaCurrency.getOrElse { + if (it is RefreshTokenExpiredException) { + return getRefreshTokenExpiredState(prevState) + } + return prevState.copy( walletCardState = getErrorWalletCardState(prevState.walletCardState), depositButtonState = prevState.depositButtonState.copy(isEnabled = false), @@ -100,4 +105,14 @@ internal class SetBalancesAndLimitsTransformer( return WalletAdditionalInfo(hideable = true, infoContent) } + + private fun getRefreshTokenExpiredState(prevState: WalletState.Visa.Content): WalletState { + return WalletState.Visa.AccessTokenLocked( + walletCardState = prevState.walletCardState, + buttons = prevState.buttons, + bottomSheetConfig = prevState.bottomSheetConfig, + onExploreClick = clickIntents::onExploreClick, + onUnlockVisaAccessNotificationClick = clickIntents::onUnlockVisaAccessClick, + ) + } } \ No newline at end of file diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetRefreshStateTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetRefreshStateTransformer.kt index 9977790553..08c92c4139 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetRefreshStateTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetRefreshStateTransformer.kt @@ -35,6 +35,7 @@ internal class SetRefreshStateTransformer( is WalletState.MultiCurrency.Locked, is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> prevState } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountErrorTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountErrorTransformer.kt index 9d97991b83..7f7c2f2a2e 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountErrorTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountErrorTransformer.kt @@ -33,6 +33,7 @@ internal class SetTxHistoryCountErrorTransformer( is WalletState.Visa.Content -> prevState.copy(txHistoryState = createErrorState()) is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.w("Impossible to load transactions history for locked wallet") prevState diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountTransformer.kt index f61b4961fe..e1f2e9145d 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryCountTransformer.kt @@ -26,6 +26,7 @@ internal class SetTxHistoryCountTransformer( ) is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.w("Impossible to load transactions history for locked wallet") prevState diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsErrorTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsErrorTransformer.kt index 5eda4b196e..3dad635156 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsErrorTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsErrorTransformer.kt @@ -2,6 +2,7 @@ package com.tangem.feature.wallet.presentation.wallet.state.transformers import com.tangem.core.ui.components.transactions.state.TxHistoryState import com.tangem.domain.txhistory.models.TxHistoryListError +import com.tangem.domain.visa.exception.RefreshTokenExpiredException import com.tangem.domain.wallets.models.UserWalletId import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState import com.tangem.feature.wallet.presentation.wallet.viewmodels.intents.WalletClickIntents @@ -16,9 +17,10 @@ internal class SetTxHistoryItemsErrorTransformer( override fun transform(prevState: WalletState): WalletState { return when (prevState) { is WalletState.SingleCurrency.Content -> prevState.copy(txHistoryState = createErrorState()) - is WalletState.Visa.Content -> prevState.copy(txHistoryState = createErrorState()) + is WalletState.Visa.Content -> transformVisaContent(prevState) is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.w("Impossible to load transactions history for locked wallet") prevState @@ -30,6 +32,20 @@ internal class SetTxHistoryItemsErrorTransformer( } } + private fun transformVisaContent(prevState: WalletState.Visa.Content): WalletState { + return if (error.cause is RefreshTokenExpiredException) { + WalletState.Visa.AccessTokenLocked( + walletCardState = prevState.walletCardState, + buttons = prevState.buttons, + bottomSheetConfig = prevState.bottomSheetConfig, + onExploreClick = clickIntents::onExploreClick, + onUnlockVisaAccessNotificationClick = clickIntents::onUnlockVisaAccessClick, + ) + } else { + prevState.copy(txHistoryState = createErrorState()) + } + } + private fun createErrorState(): TxHistoryState.Error = when (error) { is TxHistoryListError.DataError -> { TxHistoryState.Error( diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsTransformer.kt index 09c90b2841..712edaa421 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetTxHistoryItemsTransformer.kt @@ -26,6 +26,7 @@ internal class SetTxHistoryItemsTransformer( ) is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.w("Impossible to load transactions history for locked wallet") prevState diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWalletCardDropDownItemsTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWalletCardDropDownItemsTransformer.kt index f538e29f90..f9ea74d599 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWalletCardDropDownItemsTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWalletCardDropDownItemsTransformer.kt @@ -54,6 +54,11 @@ internal class SetWalletCardDropDownItemsTransformer( dropDownItems = constructDropDownItems(prevState.walletCardState.id), ), ) + is WalletState.Visa.AccessTokenLocked -> prevState.copy( + walletCardState = prevState.walletCardState.copySealed( + dropDownItems = constructDropDownItems(prevState.walletCardState.id), + ), + ) } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWarningsTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWarningsTransformer.kt index 7d7246a01e..f47eaa2356 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWarningsTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/SetWarningsTransformer.kt @@ -19,6 +19,7 @@ internal class SetWarningsTransformer( is WalletState.MultiCurrency.Locked, is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.w("Impossible to update notifications for locked wallet") prevState diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UnlockWalletTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UnlockWalletTransformer.kt index 8d4c837f82..32165880b8 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UnlockWalletTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UnlockWalletTransformer.kt @@ -50,8 +50,9 @@ internal class UnlockWalletTransformer( is WalletState.MultiCurrency.Content, is WalletState.SingleCurrency.Content, is WalletState.Visa.Content, + is WalletState.Visa.AccessTokenLocked, -> { - Timber.e("Impossible to unlock wallet with content state") + Timber.e("Impossible to unlock wallet with not locked state") prevState } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UpdateWalletCardsCountTransformer.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UpdateWalletCardsCountTransformer.kt index f350399697..55634425fa 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UpdateWalletCardsCountTransformer.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/state/transformers/UpdateWalletCardsCountTransformer.kt @@ -27,6 +27,7 @@ internal class UpdateWalletCardsCountTransformer( is WalletState.MultiCurrency.Locked, is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> { Timber.e("Impossible to update wallet cards count for locked wallet") prevState diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletClickIntents.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletClickIntents.kt index 1c218be754..289e9a955d 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletClickIntents.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletClickIntents.kt @@ -107,6 +107,7 @@ internal class WalletClickIntents @Inject constructor( is WalletState.MultiCurrency.Locked, is WalletState.SingleCurrency.Locked, is WalletState.Visa.Locked, + is WalletState.Visa.AccessTokenLocked, -> Unit } } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletWarningsClickIntents.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletWarningsClickIntents.kt index 115c9535ab..6926361876 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletWarningsClickIntents.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/intents/WalletWarningsClickIntents.kt @@ -55,6 +55,8 @@ internal interface WalletWarningsClickIntents { fun onUnlockWalletClick() + fun onUnlockVisaAccessClick() + fun onScanToUnlockWalletClick() fun onLikeAppClick() @@ -176,6 +178,10 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor( } } + override fun onUnlockVisaAccessClick() { + openScanCardDialog() + } + private fun handleUnlockWalletsError(error: UnlockWalletsError) { val event = when (error) { is UnlockWalletsError.DataError,