Updated on 2026-08-14

This commit is contained in:
Tangem 2021-04-21 14:57:56 +03:00
parent 261ad51bbd
commit 033b8fb4e4
2 changed files with 15 additions and 5 deletions

View file

@ -28,10 +28,11 @@ object TapWorkarounds {
private const val START_2_COIN_ISSUER = "start2coin"
private val excludedBatches = listOf(
"0027",
"0030",
"0031",
) // Tangem tags
"0027",
"0030",
"0031",
"0035"
) // Tangem tags
private val excludedIssuers = listOf(
"TTM BANK"

View file

@ -1,6 +1,7 @@
package com.tangem.tap.domain.tasks
import com.tangem.*
import com.tangem.blockchain.common.Blockchain
import com.tangem.blockchain.common.BlockchainSdkConfig
import com.tangem.blockchain.common.WalletManager
import com.tangem.blockchain.common.WalletManagerFactory
@ -14,6 +15,7 @@ import com.tangem.common.CompletionResult
import com.tangem.common.extensions.toHexString
import com.tangem.tap.domain.TapSdkError
import com.tangem.tap.domain.TapWorkarounds.isExcluded
import com.tangem.tap.domain.isMultiwalletAllowed
import com.tangem.tap.domain.twins.TwinCardsManager
import com.tangem.tap.domain.twins.isTwinCard
import com.tangem.tap.store
@ -54,7 +56,14 @@ class ScanNoteTask(val card: Card? = null) : CardSessionRunnable<ScanNoteRespons
val walletManager = try {
getWalletManagerFactory().makeWalletManager(card)
} catch (exception: Exception) {
return@run callback(CompletionResult.Success(ScanNoteResponse(null, card)))
if (card.isMultiwalletAllowed) {
// Create default Bitcoin WalletManager
getWalletManagerFactory().makeWalletManager(card, Blockchain.Bitcoin)
} else {
return@run callback(CompletionResult.Success(
ScanNoteResponse(null, card)
))
}
}
verifyCard(walletManager, card, null, session, callback)
}