From f54d7eaa5787d969d88d8c75df2b4a4ca73ef414 Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 3 Jun 2025 12:59:53 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../tokens/model/warnings/CryptoCurrencyWarning.kt | 2 -- .../tangem/domain/tokens/GetCurrencyWarningsUseCase.kt | 10 ---------- .../TokenDetailsNotificationsAnalyticsSender.kt | 1 - .../state/components/TokenDetailsNotification.kt | 5 ----- .../state/factory/TokenDetailsNotificationConverter.kt | 1 - gradle/tangem_dependencies.toml | 1 + .../main/java/com/tangem/lib/crypto/BlockchainUtils.kt | 5 ----- 7 files changed, 1 insertion(+), 24 deletions(-) diff --git a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt index 18a43c9689..f76e272a6b 100644 --- a/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt +++ b/domain/tokens/models/src/main/java/com/tangem/domain/tokens/model/warnings/CryptoCurrencyWarning.kt @@ -60,7 +60,5 @@ sealed class CryptoCurrencyWarning { val maxAmount: BigDecimal?, ) : CryptoCurrencyWarning() - data object TokensInBetaWarning : CryptoCurrencyWarning() - data object UsedOutdatedDataWarning : CryptoCurrencyWarning() } \ No newline at end of file diff --git a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt index 33a7220706..fbc6e1efdc 100644 --- a/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt +++ b/domain/tokens/src/main/kotlin/com/tangem/domain/tokens/GetCurrencyWarningsUseCase.kt @@ -93,7 +93,6 @@ class GetCurrencyWarningsUseCase( tokenStatus != null && coinStatus != null -> { buildList { getUsedOutdatedDataWarning(tokenStatus)?.let(::add) - getIsBetaTokensWarning(tokenStatus.currency)?.let(::add) getFeeWarning( userWalletId = userWalletId, coinStatus = coinStatus, @@ -146,15 +145,6 @@ class GetCurrencyWarningsUseCase( } } - private fun getIsBetaTokensWarning(currency: CryptoCurrency): CryptoCurrencyWarning? { - val isTokenBetaFunctionality = BlockchainUtils.isTokenBetaFunctionality(currency.network.rawId) - return if (currency is CryptoCurrency.Token && isTokenBetaFunctionality) { - CryptoCurrencyWarning.TokensInBetaWarning - } else { - null - } - } - private suspend fun constructTokenBalanceNotEnoughWarning( userWalletId: UserWalletId, tokenStatus: CryptoCurrencyStatus, diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt index 6766dfcd64..b28e14d171 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/analytics/TokenDetailsNotificationsAnalyticsSender.kt @@ -53,7 +53,6 @@ internal class TokenDetailsNotificationsAnalyticsSender( is TokenDetailsNotification.HederaAssociateWarning, is TokenDetailsNotification.KoinosMana, is TokenDetailsNotification.MigrationMaticToPol, - is TokenDetailsNotification.TokensInBeta, is TokenDetailsNotification.UsedOutdatedData, -> null } diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt index e1763d6e19..74eaebd01d 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/components/TokenDetailsNotification.kt @@ -230,11 +230,6 @@ internal sealed class TokenDetailsNotification(val config: NotificationConfig) { subtitle = resourceReference(id = R.string.warning_matic_migration_message), ) - data object TokensInBeta : Warning( - title = resourceReference(id = R.string.beta_mode_warning_title), - subtitle = resourceReference(id = R.string.beta_mode_warning_message), - ) - data object UsedOutdatedData : TokenDetailsNotification( config = NotificationConfig( subtitle = resourceReference(R.string.warning_some_token_balances_not_updated), diff --git a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt index 380cdcdf39..c6faec47ad 100644 --- a/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt +++ b/features/tokendetails/impl/src/main/kotlin/com/tangem/feature/tokendetails/presentation/tokendetails/state/factory/TokenDetailsNotificationConverter.kt @@ -135,7 +135,6 @@ internal class TokenDetailsNotificationConverter( }, ) is CryptoCurrencyWarning.MigrationMaticToPol -> MigrationMaticToPol - is CryptoCurrencyWarning.TokensInBetaWarning -> TokensInBeta is CryptoCurrencyWarning.UsedOutdatedDataWarning -> UsedOutdatedData } } diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 645294cb9e..d8a177ea6c 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -5,6 +5,7 @@ # https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/vico + tangemBlockchainSdk = "develop-1076" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds tangemCardSdk = "develop-475" diff --git a/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt b/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt index 993226dafd..3f12cb37cb 100644 --- a/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt +++ b/libs/crypto/src/main/java/com/tangem/lib/crypto/BlockchainUtils.kt @@ -166,9 +166,4 @@ object BlockchainUtils { private fun getNetworkNameWithoutTestnet(blockchain: Blockchain): String { return blockchain.fullName.replace(oldValue = " Testnet", newValue = "") } - - fun isTokenBetaFunctionality(blockchainId: String): Boolean { - val blockchain = Blockchain.fromId(blockchainId) - return blockchain == Blockchain.Kaspa - } } \ No newline at end of file