From 2a641624a20a9ace9e28f6ee1e5cb06e461d48c7 Mon Sep 17 00:00:00 2001 From: Tangem Date: Fri, 9 Feb 2024 11:00:48 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../tap/domain/card/DefaultDerivationsRepositoryTest.kt | 2 +- .../tangem/tap/domain/card/MissedDerivationsFinderTest.kt | 6 +++--- .../com/tangem/tap/domain/card/ScanResponseMockFactory.kt | 2 +- .../com/tangem/domain/common/configs/GenericCardConfig.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/test/kotlin/com/tangem/tap/domain/card/DefaultDerivationsRepositoryTest.kt b/app/src/test/kotlin/com/tangem/tap/domain/card/DefaultDerivationsRepositoryTest.kt index e818b118ab..730ddb8d96 100644 --- a/app/src/test/kotlin/com/tangem/tap/domain/card/DefaultDerivationsRepositoryTest.kt +++ b/app/src/test/kotlin/com/tangem/tap/domain/card/DefaultDerivationsRepositoryTest.kt @@ -36,7 +36,7 @@ internal class DefaultDerivationsRepositoryTest { artworkUrl = "", cardsInWallet = setOf(), isMultiCurrency = false, - scanResponse = ScanResponseMockFactory.create(cardConfig = GenericCardConfig, derivedKeys = emptyMap()), + scanResponse = ScanResponseMockFactory.create(cardConfig = GenericCardConfig(2), derivedKeys = emptyMap()), ) @Test diff --git a/app/src/test/kotlin/com/tangem/tap/domain/card/MissedDerivationsFinderTest.kt b/app/src/test/kotlin/com/tangem/tap/domain/card/MissedDerivationsFinderTest.kt index 2506e539a5..7091e26f4f 100644 --- a/app/src/test/kotlin/com/tangem/tap/domain/card/MissedDerivationsFinderTest.kt +++ b/app/src/test/kotlin/com/tangem/tap/domain/card/MissedDerivationsFinderTest.kt @@ -20,7 +20,7 @@ internal class MissedDerivationsFinderTest { @Test fun `empty derivations for empty currencies`() { - val scanResponse = ScanResponseMockFactory.create(cardConfig = GenericCardConfig, derivedKeys = emptyMap()) + val scanResponse = ScanResponseMockFactory.create(cardConfig = GenericCardConfig(2), derivedKeys = emptyMap()) val finder = MissedDerivationsFinder(scanResponse) val actual = finder.find(emptyList()) @@ -31,7 +31,7 @@ internal class MissedDerivationsFinderTest { @Test fun `empty derivations for non supported blockchains`() { // Bls is not supported - val scanResponse = ScanResponseMockFactory.create(cardConfig = GenericCardConfig, derivedKeys = emptyMap()) + val scanResponse = ScanResponseMockFactory.create(cardConfig = GenericCardConfig(2), derivedKeys = emptyMap()) val finder = MissedDerivationsFinder(scanResponse) val currencies = CryptoCurrenciesMocks(scanResponse).chia @@ -44,7 +44,7 @@ internal class MissedDerivationsFinderTest { fun `derivations ONLY for supported blockchains`() { // Bls is not supported val scanResponse = ScanResponseMockFactory.create( - cardConfig = GenericCardConfig, + cardConfig = GenericCardConfig(2), derivedKeys = emptyMap(), ).let { it.copy( diff --git a/app/src/test/kotlin/com/tangem/tap/domain/card/ScanResponseMockFactory.kt b/app/src/test/kotlin/com/tangem/tap/domain/card/ScanResponseMockFactory.kt index 359cde99df..71f1514668 100644 --- a/app/src/test/kotlin/com/tangem/tap/domain/card/ScanResponseMockFactory.kt +++ b/app/src/test/kotlin/com/tangem/tap/domain/card/ScanResponseMockFactory.kt @@ -47,7 +47,7 @@ object ScanResponseMockFactory { batchId = "NEVER-MIND", cardPublicKey = ByteArray(0), firmwareVersion = when (cardConfig) { - GenericCardConfig -> genericFirmwareVersion + is GenericCardConfig -> genericFirmwareVersion MultiWalletCardConfig -> walletFirmwareVersion Wallet2CardConfig -> wallet2FirmwareVersion }, diff --git a/domain/legacy/src/main/java/com/tangem/domain/common/configs/GenericCardConfig.kt b/domain/legacy/src/main/java/com/tangem/domain/common/configs/GenericCardConfig.kt index 547bfe780d..e75ff6da09 100644 --- a/domain/legacy/src/main/java/com/tangem/domain/common/configs/GenericCardConfig.kt +++ b/domain/legacy/src/main/java/com/tangem/domain/common/configs/GenericCardConfig.kt @@ -4,7 +4,7 @@ import com.tangem.blockchain.common.Blockchain import com.tangem.common.card.EllipticCurve import timber.log.Timber -internal class GenericCardConfig(maxWalletCount: Int) : CardConfig { +class GenericCardConfig(maxWalletCount: Int) : CardConfig { override val mandatoryCurves: List = buildList { add(EllipticCurve.Secp256k1)