From b6f31df9d110792980603e0fdd279fe0172625a9 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 29 Apr 2026 14:38:02 +0400 Subject: [PATCH] Updated on 2026-08-14 --- .../deeplink/DefaultWalletConnectDeepLinkHandler.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/deeplink/DefaultWalletConnectDeepLinkHandler.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/deeplink/DefaultWalletConnectDeepLinkHandler.kt index bc3e83159d..2d91b8cf70 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/deeplink/DefaultWalletConnectDeepLinkHandler.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/deeplink/DefaultWalletConnectDeepLinkHandler.kt @@ -5,10 +5,10 @@ import com.tangem.domain.walletconnect.WcPairService import com.tangem.domain.walletconnect.model.WcPairRequest import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase import com.tangem.features.walletconnect.components.deeplink.WalletConnectDeepLinkHandler +import com.tangem.utils.logging.TangemLogger import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import com.tangem.utils.logging.TangemLogger import java.net.URLDecoder internal class DefaultWalletConnectDeepLinkHandler @AssistedInject constructor( @@ -18,8 +18,12 @@ internal class DefaultWalletConnectDeepLinkHandler @AssistedInject constructor( ) : WalletConnectDeepLinkHandler { init { - val wcUri = uri.toString() - if (uri.toString().isNotBlank()) { + val wcUri = + // deeplink type "tangem://wc/?uri=wc:..." + runCatching { uri.getQueryParameter("uri") }.getOrNull() + // direct deeplink "wc:..." + ?: uri.toString() + if (wcUri.isNotBlank()) { try { // It is okay here, we are navigating from outside, and there is no other way to getting UserWallet getSelectedWalletSyncUseCase().fold(