Updated on 2026-08-14
This commit is contained in:
parent
8d5c607bcf
commit
2a641624a2
4 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ object ScanResponseMockFactory {
|
|||
batchId = "NEVER-MIND",
|
||||
cardPublicKey = ByteArray(0),
|
||||
firmwareVersion = when (cardConfig) {
|
||||
GenericCardConfig -> genericFirmwareVersion
|
||||
is GenericCardConfig -> genericFirmwareVersion
|
||||
MultiWalletCardConfig -> walletFirmwareVersion
|
||||
Wallet2CardConfig -> wallet2FirmwareVersion
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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<EllipticCurve> = buildList {
|
||||
add(EllipticCurve.Secp256k1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue