From 5bffc604dbf4d5a5c9695810de0bf98d3eca0d19 Mon Sep 17 00:00:00 2001 From: Tangem Date: Wed, 23 Aug 2023 13:22:33 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../domain/common/extensions/WalletManagerFactory.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/domain/legacy/src/main/java/com/tangem/domain/common/extensions/WalletManagerFactory.kt b/domain/legacy/src/main/java/com/tangem/domain/common/extensions/WalletManagerFactory.kt index 551f75119b..b46153ff06 100644 --- a/domain/legacy/src/main/java/com/tangem/domain/common/extensions/WalletManagerFactory.kt +++ b/domain/legacy/src/main/java/com/tangem/domain/common/extensions/WalletManagerFactory.kt @@ -15,7 +15,6 @@ import com.tangem.domain.common.configs.Wallet2CardConfig import com.tangem.domain.common.util.cardTypesResolver import com.tangem.domain.models.scan.CardDTO import com.tangem.domain.models.scan.ScanResponse -import com.tangem.blockchain.common.CardanoAddressConfig fun WalletManagerFactory.makeWalletManagerForApp( scanResponse: ScanResponse, @@ -57,7 +56,7 @@ fun WalletManagerFactory.makeWalletManagerForApp( derivationPath = derivationPath ?: return null, derivedWalletKeys = derivedKeys ?: return null, isWallet2 = scanResponse.cardTypesResolver.isWallet2(), - ) + ) ?: return null createWalletManager( blockchain = environmentBlockchain, @@ -80,8 +79,8 @@ private fun makePublicKey( derivationPath: DerivationPath, derivedWalletKeys: Map, isWallet2: Boolean, -): Wallet.PublicKey { - val derivedKey = derivedWalletKeys[derivationPath] ?: error("No derivation found") +): Wallet.PublicKey? { + val derivedKey = derivedWalletKeys[derivationPath] ?: return null val derivationKey = Wallet.HDKey( path = derivationPath,