From ab6589083e1c05a6e0ad7d4ba388fdc52edc4c1f Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 1 Jun 2026 18:34:35 +0300 Subject: [PATCH 1/3] Updated on 2026-08-14 --- .../supply/YieldSupplyEstimateEnterFeeUseCaseTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/domain/yield-supply/src/test/java/com/tangem/domain/yield/supply/YieldSupplyEstimateEnterFeeUseCaseTest.kt b/domain/yield-supply/src/test/java/com/tangem/domain/yield/supply/YieldSupplyEstimateEnterFeeUseCaseTest.kt index 94016321e9..22a3c0dbb5 100644 --- a/domain/yield-supply/src/test/java/com/tangem/domain/yield/supply/YieldSupplyEstimateEnterFeeUseCaseTest.kt +++ b/domain/yield-supply/src/test/java/com/tangem/domain/yield/supply/YieldSupplyEstimateEnterFeeUseCaseTest.kt @@ -316,9 +316,9 @@ class YieldSupplyEstimateEnterFeeUseCaseTest { val deployFee = txs.first().fee as Fee.Ethereum.EIP1559 val approveFee = txs[1].fee as Fee.Ethereum.EIP1559 val enterFee = txs.last().fee as Fee.Ethereum.EIP1559 - Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_200)) - Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_400)) - Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(3_600)) + Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_400)) + Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_800)) + Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(4_200)) } @Test @@ -355,9 +355,9 @@ class YieldSupplyEstimateEnterFeeUseCaseTest { val deployFee = txs.first().fee as Fee.Ethereum.Legacy val approveFee = txs[1].fee as Fee.Ethereum.Legacy val enterFee = txs.last().fee as Fee.Ethereum.Legacy - Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_200)) - Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_400)) - Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(3_600)) + Truth.assertThat(deployFee.gasLimit).isEqualTo(BigInteger.valueOf(1_400)) + Truth.assertThat(approveFee.gasLimit).isEqualTo(BigInteger.valueOf(2_800)) + Truth.assertThat(enterFee.gasLimit).isEqualTo(BigInteger.valueOf(4_200)) } private fun getDeployTx() = uncompiled( From 14d1adb29e767f0b8ca7064c116536cf87e3dbaf Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 1 Jun 2026 18:45:47 +0300 Subject: [PATCH 2/3] Updated on 2026-08-14 --- .../deeplink/DefaultPromoDeeplinkHandler.kt | 7 ++- .../DefaultPromoDeeplinkHandlerTest.kt | 53 ++++++++++--------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt index 0321bc421a..89fe896c13 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/deeplink/DefaultPromoDeeplinkHandler.kt @@ -1,6 +1,7 @@ package com.tangem.feature.wallet.deeplink import com.tangem.blockchain.common.Blockchain +import com.tangem.blockchainsdk.utils.toNetworkId import com.tangem.common.routing.deeplink.DeeplinkConst import com.tangem.common.routing.deeplink.DeeplinkConst.PROMO_CODE_KEY import com.tangem.core.analytics.api.AnalyticsEventHandler @@ -91,7 +92,7 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor( multiNetworkStatusSupplier .invoke(MultiNetworkStatusProducer.Params(userWallet.walletId)) .first { statuses -> - statuses.any { status -> status.network.rawId == Blockchain.Bitcoin.id } + statuses.any { status -> status.network.rawId == Blockchain.Bitcoin.toNetworkId() } } }, ) @@ -104,7 +105,9 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor( TangemLogger.withTag(LOG_TAG).d("All user cryptoCurrencies on main ${cryptoCurrencies?.size}") - val bitcoinCurrency = cryptoCurrencies?.firstOrNull { it.id.rawNetworkId == Blockchain.Bitcoin.id } + val bitcoinCurrency = cryptoCurrencies?.firstOrNull { + it.id.rawNetworkId == Blockchain.Bitcoin.toNetworkId() + } TangemLogger.withTag(LOG_TAG).d("BitcoinCurrency $bitcoinCurrency") val bitcoinStatus = networkStatuses?.firstOrNull { status -> diff --git a/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt b/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt index a2e0fbda2f..16a9f088b1 100644 --- a/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt +++ b/features/wallet/impl/src/test/kotlin/com/tangem/feature/wallet/presentation/wallet/deeplink/DefaultPromoDeeplinkHandlerTest.kt @@ -5,6 +5,7 @@ package com.tangem.feature.wallet.presentation.wallet.deeplink import arrow.core.Either import com.google.common.truth.Truth import com.tangem.blockchain.common.Blockchain +import com.tangem.blockchainsdk.utils.toNetworkId import com.tangem.common.routing.deeplink.DeeplinkConst import com.tangem.core.analytics.api.AnalyticsEventHandler import com.tangem.core.decompose.ui.UiMessage @@ -92,13 +93,13 @@ class DefaultPromoDeeplinkHandlerTest { every { getSelectedWalletSyncUseCase.invoke() } returns Either.Right(userWallet) val ethStatus = buildNetworkStatus(rawNetworkId = "ethereum", address = "0x123") - val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.id, address = "bc1qxyz") + val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qxyz") coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flow { emit(emptySet()) emit(setOf(ethStatus)) emit(setOf(btcStatus)) } - val btcCoin = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id) + val btcCoin = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId()) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCoin) coEvery { activateBitcoinPromocodeUseCase.invoke(any(), "bc1qxyz", promoCode) } returns Either.Right("ok") val dispatcherProvider = testDispatcherProvider(testScheduler) @@ -203,9 +204,9 @@ class DefaultPromoDeeplinkHandlerTest { val queryParams = mapOf(DeeplinkConst.PROMO_CODE_KEY to "PROMO123") val userWallet = mockUserWallet("ABCDEF") every { getSelectedWalletSyncUseCase.invoke() } returns Either.Right(userWallet) - val btcUnreachable = buildUnreachableNetworkStatus(rawNetworkId = Blockchain.Bitcoin.id) + val btcUnreachable = buildUnreachableNetworkStatus(rawNetworkId = Blockchain.Bitcoin.toNetworkId()) coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcUnreachable)) - val btcCoin = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id) + val btcCoin = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId()) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCoin) val dispatcherProvider = testDispatcherProvider(testScheduler) @@ -245,9 +246,9 @@ class DefaultPromoDeeplinkHandlerTest { val queryParams = mapOf(DeeplinkConst.PROMO_CODE_KEY to promoCode) val userWallet = mockUserWallet("ABCDEF") every { getSelectedWalletSyncUseCase.invoke() } returns Either.Right(userWallet) - val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.id, address = "bc1qxyz") + val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qxyz") coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatus)) - val btcCoin = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id) + val btcCoin = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId()) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCoin) coEvery { activateBitcoinPromocodeUseCase.invoke(any(), "bc1qxyz", promoCode) } returns Either.Right("ok") val dispatcherProvider = testDispatcherProvider(testScheduler) @@ -363,9 +364,9 @@ class DefaultPromoDeeplinkHandlerTest { val queryParams = mapOf(DeeplinkConst.PROMO_CODE_KEY to promoCode) val userWallet = mockUserWallet("ABCDEF") every { getSelectedWalletSyncUseCase.invoke() } returns Either.Right(userWallet) - val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.id, address = "bc1qxyz") + val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qxyz") coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatus)) - val btcCurrency = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id) + val btcCurrency = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId()) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCurrency) coEvery { activateBitcoinPromocodeUseCase.invoke(any(), "bc1qxyz", promoCode) } returns Either.Left(error) val dispatcherProvider = testDispatcherProvider(testScheduler) @@ -397,7 +398,7 @@ class DefaultPromoDeeplinkHandlerTest { val queryParams = mapOf(DeeplinkConst.PROMO_CODE_KEY to "PROMO123") val userWallet = mockUserWallet("ABCDEF") every { getSelectedWalletSyncUseCase.invoke() } returns Either.Right(userWallet) - val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.id, address = "bc1qxyz") + val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qxyz") coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatus)) val ethOnly = buildCryptoCurrency(rawNetworkId = "ethereum") coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(ethOnly) @@ -433,7 +434,7 @@ class DefaultPromoDeeplinkHandlerTest { every { getSelectedWalletSyncUseCase.invoke() } returns Either.Right(userWallet) val ethStatus = buildNetworkStatus(rawNetworkId = "ethereum", address = "0x123") - val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.id, address = "bc1qxyz") + val btcStatus = buildNetworkStatus(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qxyz") coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flow { emit(emptySet()) emit(setOf(ethStatus)) @@ -487,19 +488,19 @@ class DefaultPromoDeeplinkHandlerTest { val dpCustom = Network.DerivationPath.Custom("m/84'/0'/0'") val btcStatusCard = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcard", derivationPath = dpCard, ) val btcStatusCustom = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcustom", derivationPath = dpCustom, ) coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatusCard, btcStatusCustom)) - val btcCoinCustom = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCustom) - val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCard) + val btcCoinCustom = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCustom) + val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCard) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf( btcCoinCustom, btcCoinCard, @@ -544,18 +545,18 @@ class DefaultPromoDeeplinkHandlerTest { val dpCustom = Network.DerivationPath.Custom("m/84'/0'/0'") val btcStatusCard = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcard", derivationPath = dpCard, ) val btcStatusCustom = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcustom", derivationPath = dpCustom, ) coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatusCard, btcStatusCustom)) - val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCard) + val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCard) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCoinCard) coEvery { activateBitcoinPromocodeUseCase.invoke(any(), "bc1qcard", promoCode) } returns Either.Right("ok") @@ -607,12 +608,12 @@ class DefaultPromoDeeplinkHandlerTest { val dpCustom = Network.DerivationPath.Custom("m/84'/0'/0'") val btcStatusCard = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcard", derivationPath = dpCard, ) val btcStatusCustom = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcustom", derivationPath = dpCustom, ) @@ -666,14 +667,14 @@ class DefaultPromoDeeplinkHandlerTest { val dpCustom = Network.DerivationPath.Custom("m/84'/0'/0'") val btcStatusCard = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcard", derivationPath = dpCard, ) coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatusCard)) - val btcCoinCustom = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCustom) - val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCard) + val btcCoinCustom = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCustom) + val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCard) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf( btcCoinCustom, btcCoinCard, @@ -725,13 +726,13 @@ class DefaultPromoDeeplinkHandlerTest { val dpCustom = Network.DerivationPath.Custom("m/84'/0'/0'") val btcStatusCustom = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcustom", derivationPath = dpCustom, ) coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatusCustom)) - val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCard) + val btcCoinCard = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCard) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCoinCard) val dispatcherProvider = testDispatcherProvider(testScheduler) @@ -780,13 +781,13 @@ class DefaultPromoDeeplinkHandlerTest { val dpCustom = Network.DerivationPath.Custom("m/84'/0'/0'") val btcStatusCard = buildNetworkStatus( - rawNetworkId = Blockchain.Bitcoin.id, + rawNetworkId = Blockchain.Bitcoin.toNetworkId(), address = "bc1qcard", derivationPath = dpCard, ) coEvery { multiNetworkStatusSupplier.invoke(any()) } returns flowOf(setOf(btcStatusCard)) - val btcCoinCustom = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.id, derivationPath = dpCustom) + val btcCoinCustom = buildCryptoCurrency(rawNetworkId = Blockchain.Bitcoin.toNetworkId(), derivationPath = dpCustom) coEvery { multiWalletCryptoCurrenciesSupplier.getSyncOrNull(any()) } returns setOf(btcCoinCustom) val dispatcherProvider = testDispatcherProvider(testScheduler) From 1164736a6c5b704cebadbfa5f40789f59a012cfe Mon Sep 17 00:00:00 2001 From: Tangem Date: Tue, 2 Jun 2026 11:08:20 +0000 Subject: [PATCH 3/3] Updated on 2026-08-14 --- gradle/tangem_dependencies.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/tangem_dependencies.toml b/gradle/tangem_dependencies.toml index 6741f7e5f8..0ab9e14901 100644 --- a/gradle/tangem_dependencies.toml +++ b/gradle/tangem_dependencies.toml @@ -5,9 +5,9 @@ # https://github.com/tangem/tangem-sdk-android/ # https://github.com/tangem/vico -tangemBlockchainSdk = "releases-5.38-1523" +tangemBlockchainSdk = "releases-5.39-1533" #tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds -tangemCardSdk = "releases-5.38-615" +tangemCardSdk = "releases-5.39-623" #tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^ tangemVico = "tangem-master-21" #tangemVico = "0.0.1" # Keep it! - used for local builds ^