Updated on 2026-08-14

This commit is contained in:
Tangem 2026-03-20 21:54:46 +04:00
parent 8b75e37e30
commit a9bca131c3
386 changed files with 1369 additions and 1347 deletions

View file

@ -28,7 +28,6 @@ dependencies {
// region Other deps
implementation(deps.kotlin.coroutines)
implementation(deps.timber)
// endregion
// region Test libraries

View file

@ -4,7 +4,7 @@ import com.tangem.blockchain.common.Blockchain
import com.tangem.blockchain.common.isUTXO
import com.tangem.crypto.hdWallet.DerivationPath
import com.tangem.domain.models.network.Network
import timber.log.Timber
import com.tangem.utils.logging.TangemLogger
/**
* Utility class to recognize the account node in a derivation path based on the blockchain type.
@ -36,7 +36,7 @@ class AccountNodeRecognizer(private val blockchain: Blockchain) {
.takeIf { nodesCount >= it }
if (index == null) {
Timber.e("Cannot determine account node index for ${blockchain.fullName}: ${derivationPath.rawPath}")
TangemLogger.e("Cannot determine account node index for ${blockchain.fullName}: ${derivationPath.rawPath}")
}
return index
@ -63,7 +63,7 @@ class AccountNodeRecognizer(private val blockchain: Blockchain) {
fun recognize(derivationPath: DerivationPath): Long? {
return runCatching {
if (!blockchain.isAccountsSupported()) {
Timber.e("Account derivation is not supported for blockchain: ${blockchain.fullName}")
TangemLogger.e("Account derivation is not supported for blockchain: ${blockchain.fullName}")
return null
}

View file

@ -3,7 +3,7 @@ package com.tangem.lib.crypto.derivation
import com.tangem.blockchain.common.Blockchain
import com.tangem.crypto.hdWallet.DerivationNode
import com.tangem.crypto.hdWallet.DerivationPath
import timber.log.Timber
import com.tangem.utils.logging.TangemLogger
/** Extension function to convert a [DerivationPath] into a [MutableDerivationPath] */
fun DerivationPath.toMutable(): MutableDerivationPath = MutableDerivationPath(value = this)
@ -33,7 +33,7 @@ class MutableDerivationPath internal constructor(val value: DerivationPath) {
is DerivationNode.NonHardened -> DerivationNode.NonHardened(value)
}
} else {
Timber.e("Account node not found in the derivation path: ${this@MutableDerivationPath.value}")
TangemLogger.e("Account node not found in the derivation path: ${this@MutableDerivationPath.value}")
}
return DerivationPath(path = mutableNodes).toMutable()