Updated on 2026-08-14
This commit is contained in:
parent
f5d9dab282
commit
2baf713fef
293 changed files with 369 additions and 377 deletions
|
|
@ -9,7 +9,7 @@ import com.tangem.domain.common.TapWorkarounds.isTestCard
|
|||
import com.tangem.domain.common.configs.CardConfig
|
||||
import com.tangem.domain.common.util.cardTypesResolver
|
||||
import com.tangem.domain.models.scan.CardDTO
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
|
||||
// TODO: refactor [REDACTED_JIRA]
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,14 @@ import com.tangem.blockchain.common.Blockchain
|
|||
import com.tangem.common.card.EllipticCurve
|
||||
import com.tangem.common.extensions.toMapKey
|
||||
import com.tangem.crypto.hdWallet.DerivationPath
|
||||
import com.tangem.domain.common.CardTypesResolver
|
||||
import com.tangem.domain.common.DerivationStyleProvider
|
||||
import com.tangem.domain.common.TangemCardTypesResolver
|
||||
import com.tangem.domain.common.TangemDerivationStyleProvider
|
||||
import com.tangem.domain.common.TangemHotDerivationStyleProvider
|
||||
import com.tangem.domain.common.*
|
||||
import com.tangem.domain.common.TapWorkarounds.isTangemTwins
|
||||
import com.tangem.domain.common.TapWorkarounds.isTestCard
|
||||
import com.tangem.domain.common.configs.CardConfig
|
||||
import com.tangem.domain.common.configs.Wallet2CardConfig
|
||||
import com.tangem.domain.models.scan.CardDTO
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
|
||||
val ScanResponse.cardTypesResolver: CardTypesResolver
|
||||
get() = TangemCardTypesResolver(
|
||||
|
|
@ -51,7 +47,7 @@ private fun ScanResponse.hasDerivation(blockchain: Blockchain, derivationPath: D
|
|||
return if (config is Wallet2CardConfig) {
|
||||
// new logic for wallet2
|
||||
val primaryCurve = config.primaryCurve(blockchain)
|
||||
primaryCurve?.let { hasDerivation(it, derivationPath) } ?: false
|
||||
primaryCurve?.let { hasDerivation(it, derivationPath) } == true
|
||||
} else {
|
||||
// leave logic for legacy wallets
|
||||
when {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.tangem.domain.common.util
|
||||
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
|
||||
/**
|
||||
* Get total cards count in wallets set for a card that was saved in [UserWallet]
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ package com.tangem.domain.exchange
|
|||
import arrow.core.Either
|
||||
import com.tangem.domain.core.lce.Lce
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.tokens.model.ScenarioUnavailabilityReason
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.tangem.domain.redux
|
||||
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import org.rekotlin.Action
|
||||
|
||||
interface ReduxStateHolder {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import com.tangem.domain.demo.DemoConfig
|
|||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.network.Network
|
||||
import com.tangem.domain.models.network.TxInfo
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.transaction.models.AssetRequirementsCondition
|
||||
import com.tangem.domain.txhistory.models.PaginationWrapper
|
||||
|
|
@ -40,7 +41,6 @@ import com.tangem.domain.walletmanager.model.SmartContractMethod
|
|||
import com.tangem.domain.walletmanager.model.TokenInfo
|
||||
import com.tangem.domain.walletmanager.utils.*
|
||||
import com.tangem.domain.walletmanager.utils.WalletManagerFactory
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.sync.Mutex
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import com.tangem.domain.common.extensions.makePublicKey
|
|||
import com.tangem.domain.common.extensions.makeWalletManagerForApp
|
||||
import com.tangem.domain.common.util.derivationStyleProvider
|
||||
import com.tangem.domain.models.scan.ScanResponse
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import timber.log.Timber
|
||||
|
||||
internal class WalletManagerFactory(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue