From a527c4706a6f411bdf1f1143587a3f1c6678d2d5 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 5 May 2025 16:17:10 +0700 Subject: [PATCH] Updated on 2026-08-14 --- features/walletconnect/impl/build.gradle.kts | 4 ++++ .../walletconnect/connections/routing/WcRoutingModel.kt | 8 ++++++-- gradle/tangem_dependencies.toml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/features/walletconnect/impl/build.gradle.kts b/features/walletconnect/impl/build.gradle.kts index 88f123d6cd..02b082fd94 100644 --- a/features/walletconnect/impl/build.gradle.kts +++ b/features/walletconnect/impl/build.gradle.kts @@ -47,9 +47,13 @@ dependencies { implementation(deps.compose.ui) implementation(deps.compose.ui.tooling) + /** Data */ + implementation(projects.data.card) + /** Other */ implementation(deps.arrow.core) implementation(deps.decompose.ext.compose) implementation(deps.kotlin.immutable.collections) implementation(deps.timber) + implementation(tangemDeps.card.core) } \ No newline at end of file diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/WcRoutingModel.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/WcRoutingModel.kt index 114e0b1e39..c6bbdf5da3 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/WcRoutingModel.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/routing/WcRoutingModel.kt @@ -4,6 +4,7 @@ import com.arkivanov.decompose.router.slot.SlotNavigation import com.tangem.common.routing.AppRoute import com.tangem.core.decompose.di.ModelScoped import com.tangem.core.decompose.model.Model +import com.tangem.data.card.sdk.CardSdkProvider import com.tangem.domain.walletconnect.WcPairService import com.tangem.domain.walletconnect.WcRequestService import com.tangem.domain.walletconnect.model.WcEthMethodName @@ -18,6 +19,7 @@ import javax.inject.Inject internal class WcRoutingModel @Inject constructor( private val requestService: WcRequestService, private val pairService: WcPairService, + private val cardSdkProvider: CardSdkProvider, override val dispatchers: CoroutineDispatcherProvider, private val featureToggles: WalletConnectFeatureToggles, ) : Model() { @@ -70,8 +72,10 @@ internal class WcRoutingModel @Inject constructor( private suspend fun awaitQueueReady() = combine( isSlotEmpty, permittedAppRoute, - ) { isSlotEmpty, permittedAppRoute -> isSlotEmpty && permittedAppRoute } - .first { it } + cardSdkProvider.sdk.uiVisibility(), + ) { isSlotEmpty, permittedAppRoute, isCardSdkVisible -> + isSlotEmpty && permittedAppRoute && !isCardSdkVisible + }.first { it } fun onAppRouteChange(appRoute: AppRoute) { permittedAppRoute.value = when (appRoute) { diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 8a6f485b07..5fbfb3c5e8 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -7,7 +7,7 @@ tangemBlockchainSdk = "develop-1052" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "develop-463" +tangemCardSdk = "develop-464" #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 ^