diff --git a/data/wallets/src/main/java/com/tangem/data/wallets/hot/DefaultHotWalletAccessor.kt b/data/wallets/src/main/java/com/tangem/data/wallets/hot/DefaultHotWalletAccessor.kt index fdf4a50d73..9fac877712 100644 --- a/data/wallets/src/main/java/com/tangem/data/wallets/hot/DefaultHotWalletAccessor.kt +++ b/data/wallets/src/main/java/com/tangem/data/wallets/hot/DefaultHotWalletAccessor.kt @@ -104,6 +104,7 @@ class DefaultHotWalletAccessor @Inject constructor( return runCatchingSdkErrors(hotWalletId, auth) { block(UnlockHotWallet(hotWalletId, it)).also { + hotWalletPasswordRequester.successfulAuthentication() hotWalletPasswordRequester.dismiss() } } diff --git a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/AccessCodeModel.kt b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/AccessCodeModel.kt index ede26e72e0..40ef51ebc0 100644 --- a/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/AccessCodeModel.kt +++ b/features/hot-wallet/impl/src/main/kotlin/com/tangem/features/hotwallet/accesscode/AccessCodeModel.kt @@ -155,6 +155,7 @@ internal class AccessCodeModel @Inject constructor( if (!shouldAskForBiometry()) return suspendCancellableCoroutine { continuation -> + var buttonClicked = false uiMessageSender.send( DialogMessage( title = resourceReference(R.string.common_attention), @@ -162,6 +163,7 @@ internal class AccessCodeModel @Inject constructor( firstAction = EventMessageAction( title = resourceReference(R.string.common_allow), onClick = { + buttonClicked = true modelScope.launch { setAskBiometryShownUseCase() walletsRepository.setUseBiometricAuthentication(true) @@ -175,6 +177,7 @@ internal class AccessCodeModel @Inject constructor( secondAction = EventMessageAction( title = resourceReference(R.string.save_user_wallet_agreement_dont_allow), onClick = { + buttonClicked = true modelScope.launch { setAskBiometryShownUseCase() if (continuation.isActive) { @@ -184,10 +187,8 @@ internal class AccessCodeModel @Inject constructor( }, ), onDismissRequest = { - modelScope.launch { - if (continuation.isActive) { - continuation.resume(Unit) - } + if (continuation.isActive && buttonClicked.not()) { + continuation.resume(Unit) } }, ), 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 85b018759e..7f83f25401 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 @@ -395,7 +395,7 @@ internal class WalletSettingsModel @Inject constructor( -> modelScope.launch { unlockHotWalletContextualUseCase.invoke(hotWalletId) .onLeft { - Timber.e("Unable to unlock wallet with id ${params.userWalletId}") + Timber.e(it, "Unable to unlock wallet with id ${params.userWalletId}") } .onRight { action() diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 25b1732ddf..ed82bec0bf 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -11,7 +11,7 @@ tangemCardSdk = "develop-561" #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-527" +tangemHotSdk = "develop-528" #tangemHotSdk = "0.0.1" # Keep it! - used for local builds ^