From 54ab95bb11359adaa47e189f79a713ed010b3935 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 23 Jul 2025 12:15:25 +0500 Subject: [PATCH] Updated on 2026-08-14 --- .../connections/entity/WcConnectionsState.kt | 4 +--- .../model/transformers/WcSessionsTransformer.kt | 3 +-- .../walletconnect/connections/ui/WcConnectionsContent.kt | 3 +-- .../connections/ui/preview/WcConnectionsPreviewData.kt | 9 +++++++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/entity/WcConnectionsState.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/entity/WcConnectionsState.kt index 89f1496048..1bdc7df0ae 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/entity/WcConnectionsState.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/entity/WcConnectionsState.kt @@ -2,8 +2,6 @@ package com.tangem.features.walletconnect.connections.entity import com.tangem.core.ui.components.appbar.models.TopAppBarButtonUM import com.tangem.core.ui.components.dropdownmenu.TangemDropdownMenuItem -import com.tangem.core.ui.extensions.TextReference -import com.tangem.core.ui.extensions.stringReference import kotlinx.collections.immutable.ImmutableList internal data class WcConnectionsState( @@ -27,6 +25,6 @@ internal data class WcConnectedAppInfo( val name: String, val iconUrl: String, val verifiedState: VerifiedDAppState, - val subtitle: TextReference = stringReference("Connected App"), + val subtitle: String, val onClick: () -> Unit, ) \ No newline at end of file diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsTransformer.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsTransformer.kt index a29f0d046a..97203a212d 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsTransformer.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/model/transformers/WcSessionsTransformer.kt @@ -1,6 +1,5 @@ package com.tangem.features.walletconnect.connections.model.transformers -import com.tangem.core.ui.extensions.stringReference import com.tangem.domain.walletconnect.model.WcSession import com.tangem.domain.models.wallet.UserWallet import com.tangem.features.walletconnect.connections.entity.WcConnectedAppInfo @@ -25,7 +24,7 @@ internal class WcSessionsTransformer( WcConnectedAppInfo( name = appMetaData.name, iconUrl = appMetaData.icons.firstOrNull().orEmpty(), - subtitle = stringReference(appMetaData.url), + subtitle = WcAppSubtitleConverter.convert(session.sdkModel.appMetaData), verifiedState = WcDAppVerifiedStateConverter {} .convert(session.securityStatus to appMetaData.name), onClick = { openAppInfoModal(session) }, diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/WcConnectionsContent.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/WcConnectionsContent.kt index a426e1026e..5cd3dd24a8 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/WcConnectionsContent.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/WcConnectionsContent.kt @@ -30,7 +30,6 @@ import com.tangem.core.ui.components.PrimaryButton import com.tangem.core.ui.components.dropdownmenu.TangemDropdownItem import com.tangem.core.ui.components.dropdownmenu.TangemDropdownMenu import com.tangem.core.ui.components.snackbar.TangemSnackbarHost -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 @@ -227,7 +226,7 @@ private fun AppInfoItem(appInfo: WcConnectedAppInfo, modifier: Modifier = Modifi } } Text( - text = appInfo.subtitle.resolveReference(), + text = appInfo.subtitle, color = TangemTheme.colors.text.tertiary, style = TangemTheme.typography.caption2, ) diff --git a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/preview/WcConnectionsPreviewData.kt b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/preview/WcConnectionsPreviewData.kt index 279c79a78c..62530a542a 100644 --- a/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/preview/WcConnectionsPreviewData.kt +++ b/features/walletconnect/impl/src/main/kotlin/com/tangem/features/walletconnect/connections/ui/preview/WcConnectionsPreviewData.kt @@ -23,12 +23,14 @@ internal object WcConnectionsPreviewData { WcConnectedAppInfo( name = "Moralis", iconUrl = "$BASE_URL/satoshi.png", + subtitle = "https://react-app.walletconnect.com/", verifiedState = VerifiedDAppState.Verified {}, onClick = { Timber.d("Moralis clicked") }, ), WcConnectedAppInfo( name = "website.com", iconUrl = "$BASE_URL/doge_again_lol.jpg", + subtitle = "https://react-app.walletconnect.com/", onClick = { Timber.d("website.com clicked") }, verifiedState = VerifiedDAppState.Unknown, ), @@ -41,6 +43,7 @@ internal object WcConnectionsPreviewData { WcConnectedAppInfo( name = "React app", iconUrl = "$BASE_URL/LiteCoin.png", + subtitle = "https://react-app.walletconnect.com/", verifiedState = VerifiedDAppState.Verified {}, onClick = { Timber.d("React app clicked") }, ), @@ -53,12 +56,14 @@ internal object WcConnectionsPreviewData { WcConnectedAppInfo( name = "Moralis", iconUrl = "$BASE_URL/satoshi.png", + subtitle = "https://react-app.walletconnect.com/", verifiedState = VerifiedDAppState.Verified {}, onClick = { Timber.d("Moralis clicked") }, ), WcConnectedAppInfo( name = "website.com", iconUrl = "$BASE_URL/doge_again_lol.jpg", + subtitle = "https://react-app.walletconnect.com/", verifiedState = VerifiedDAppState.Unknown, onClick = { Timber.d("website.com clicked") }, ), @@ -71,6 +76,7 @@ internal object WcConnectionsPreviewData { WcConnectedAppInfo( name = "React app", iconUrl = "$BASE_URL/LiteCoin.png", + subtitle = "https://react-app.walletconnect.com/", onClick = { Timber.d("React app clicked") }, verifiedState = VerifiedDAppState.Verified {}, ), @@ -83,12 +89,14 @@ internal object WcConnectionsPreviewData { WcConnectedAppInfo( name = "Moralis", iconUrl = "$BASE_URL/satoshi.png", + subtitle = "https://react-app.walletconnect.com/", verifiedState = VerifiedDAppState.Verified {}, onClick = { Timber.d("Moralis clicked") }, ), WcConnectedAppInfo( name = "website.com", iconUrl = "$BASE_URL/doge_again_lol.jpg", + subtitle = "https://react-app.walletconnect.com/", onClick = { Timber.d("website.com clicked") }, verifiedState = VerifiedDAppState.Unknown, ), @@ -101,6 +109,7 @@ internal object WcConnectionsPreviewData { WcConnectedAppInfo( name = "React app", iconUrl = "$BASE_URL/LiteCoin.png", + subtitle = "https://react-app.walletconnect.com/", verifiedState = VerifiedDAppState.Verified {}, onClick = { Timber.d("React app clicked") }, ),