Updated on 2026-08-14
This commit is contained in:
parent
8b75e37e30
commit
a9bca131c3
386 changed files with 1369 additions and 1347 deletions
|
|
@ -37,7 +37,6 @@ dependencies {
|
|||
implementation(deps.kotlin.coroutines)
|
||||
implementation(deps.moshi)
|
||||
implementation(deps.moshi.kotlin)
|
||||
implementation(deps.timber)
|
||||
ksp(deps.moshi.kotlin.codegen)
|
||||
kaptForObfuscatingVariants(deps.retrofit.response.type.keeper)
|
||||
// endregion
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.tangem.blockchain.common.WalletManagerFactory
|
|||
import com.tangem.blockchain.common.datastorage.BlockchainDataStorage
|
||||
import com.tangem.blockchain.common.logging.BlockchainSDKLogger
|
||||
import com.tangem.blockchainsdk.providers.BlockchainProviderTypes
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
|
|
@ -26,7 +26,7 @@ internal class WalletManagerFactoryCreator @Inject constructor(
|
|||
) {
|
||||
|
||||
fun create(config: BlockchainSdkConfig, blockchainProviderTypes: BlockchainProviderTypes): WalletManagerFactory {
|
||||
Timber.i("Create WalletManagerFactory")
|
||||
TangemLogger.i("Create WalletManagerFactory")
|
||||
|
||||
return WalletManagerFactory(
|
||||
config = config,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.tangem.blockchainsdk.providers.BlockchainProviderTypes
|
|||
import com.tangem.blockchainsdk.utils.fromNetworkId
|
||||
import com.tangem.blockchainsdk.utils.toNetworkId
|
||||
import com.tangem.utils.converter.TwoWayConverter
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
/**
|
||||
* Converts [BlockchainProvidersResponse] to [BlockchainProviderTypes] and vice versa
|
||||
|
|
@ -23,7 +23,7 @@ internal object BlockchainProviderTypesConverter :
|
|||
val providerTypes = ProviderTypeConverter.convertList(input = blockchainProviders)
|
||||
|
||||
providerTypes.forEach {
|
||||
if (it == null) Timber.e("$blockchain provider type is not supported")
|
||||
if (it == null) TangemLogger.e("$blockchain provider type is not supported")
|
||||
}
|
||||
|
||||
blockchain to providerTypes.filterNotNull()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.tangem.datasource.api.tangemTech.TangemTechApi
|
|||
import com.tangem.datasource.local.config.providers.BlockchainProvidersStorage
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import com.tangem.utils.coroutines.runCatching
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ internal class BlockchainProvidersResponseLoader @Inject constructor(
|
|||
)
|
||||
},
|
||||
onFailure = { throwable ->
|
||||
Timber.e(throwable, "Failed to load blockchain provider types from backend")
|
||||
TangemLogger.e("Failed to load blockchain provider types from backend", throwable)
|
||||
localResponse.ifEmpty { null }
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import com.tangem.blockchainsdk.BlockchainProvidersResponse
|
|||
import com.tangem.core.analytics.api.AnalyticsExceptionHandler
|
||||
import com.tangem.core.analytics.models.ExceptionAnalyticsEvent
|
||||
import com.tangem.datasource.local.config.providers.models.ProviderModel
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
|
|
@ -81,7 +81,7 @@ internal class BlockchainProvidersResponseMerger @Inject internal constructor(
|
|||
"Remote config does not contain some blockchains or providers information",
|
||||
)
|
||||
|
||||
Timber.e(exception)
|
||||
TangemLogger.e("Error", exception)
|
||||
|
||||
analyticsExceptionHandler.sendException(
|
||||
ExceptionAnalyticsEvent(
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.tangem.blockchainsdk.converters.BlockchainProviderTypesConverter
|
|||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.firstOrNull
|
||||
import kotlinx.coroutines.flow.map
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
/**
|
||||
* Implementation of [BlockchainProvidersTypesManager] in DEV environment
|
||||
|
|
@ -36,7 +36,7 @@ internal class DevBlockchainProvidersTypesManager(
|
|||
val changed = changedBlockchainProvidersStore.data.firstOrNull().orEmpty()
|
||||
|
||||
if (changed.isEmpty()) {
|
||||
Timber.i("Initialize ChangedBlockchainProvidersStore")
|
||||
TangemLogger.i("Initialize ChangedBlockchainProvidersStore")
|
||||
changedBlockchainProvidersStore.updateData {
|
||||
BlockchainProviderTypesConverter.convertBack(initial)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.tangem.blockchainsdk.providers
|
|||
|
||||
import com.tangem.blockchainsdk.converters.BlockchainProviderTypesConverter
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
|
@ -26,11 +26,11 @@ internal class ProdBlockchainProvidersTypesManager @Inject constructor(
|
|||
val response = blockchainProvidersResponseLoader.load()
|
||||
|
||||
if (response == null) {
|
||||
Timber.e("Error loading BlockchainProviderTypes")
|
||||
TangemLogger.e("Error loading BlockchainProviderTypes")
|
||||
return
|
||||
}
|
||||
|
||||
Timber.i("Update BlockchainProviderTypes")
|
||||
TangemLogger.i("Update BlockchainProviderTypes")
|
||||
|
||||
blockchainProviderTypesStore.store(
|
||||
value = BlockchainProviderTypesConverter.convert(response),
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ dependencies {
|
|||
|
||||
// region Other deps
|
||||
implementation(deps.kotlin.coroutines)
|
||||
implementation(deps.timber)
|
||||
// endregion
|
||||
|
||||
// region Test libraries
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ dependencies {
|
|||
}
|
||||
|
||||
/** Other libraries */
|
||||
implementation(deps.timber)
|
||||
|
||||
/** DI */
|
||||
implementation(deps.hilt.android)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue