Updated on 2026-08-14

This commit is contained in:
Tangem 2022-03-02 19:35:14 +03:00
parent 0ba9f528e1
commit 5a1828e9bd
2 changed files with 15 additions and 3 deletions

View file

@ -145,7 +145,20 @@ private class CreateWalletTangemWallet : ProductCommandProcessor<CreateProductWa
when (result) {
is CompletionResult.Success -> {
primaryCard = result.data
deriveKeys(createWalletResponse, session, callback)
when {
card.settings.isHDWalletAllowed -> {
deriveKeys(createWalletResponse, session, callback)
}
else -> {
callback(
CompletionResult.Success(
CreateProductWalletTaskResponse(
card = session.environment.card!!, primaryCard = primaryCard
)
)
)
}
}
}
is CompletionResult.Failure -> {
callback(CompletionResult.Failure(result.error))

View file

@ -1,6 +1,5 @@
package com.tangem.tap.domain.tasks.product
import com.tangem.*
import com.tangem.blockchain.common.Blockchain
import com.tangem.blockchain.common.Token
import com.tangem.common.CompletionResult
@ -241,7 +240,7 @@ private class ScanWalletProcessor(
callback: (result: CompletionResult<ScanResponse>) -> Unit
) {
val derivations = collectDerivations(card)
if (derivations.isEmpty()) {
if (derivations.isEmpty() || !card.settings.isHDWalletAllowed) {
callback(
CompletionResult.Success(
ScanResponse(