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

@ -47,7 +47,6 @@ dependencies {
implementation(deps.kotlin.immutable.collections)
implementation(deps.moshi)
implementation(deps.moshi.kotlin)
implementation(deps.timber)
ksp(deps.moshi.kotlin.codegen)
kaptForObfuscatingVariants(deps.retrofit.response.type.keeper)
implementation(deps.kotlin.serialization)

View file

@ -22,19 +22,15 @@ import com.tangem.domain.card.common.extensions.canHandleToken
import com.tangem.domain.common.wallets.UserWalletsListRepository
import com.tangem.domain.common.wallets.getSyncStrict
import com.tangem.domain.common.wallets.loadAndGet
import com.tangem.utils.coroutines.AppCoroutineScope
import com.tangem.domain.models.wallet.UserWallet
import com.tangem.domain.models.wallet.UserWalletId
import com.tangem.domain.onramp.model.HotCryptoCurrency
import com.tangem.domain.onramp.repositories.HotCryptoRepository
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import com.tangem.utils.coroutines.JobHolder
import com.tangem.utils.coroutines.runCatching
import com.tangem.utils.coroutines.saveIn
import com.tangem.utils.coroutines.*
import com.tangem.utils.logging.TangemLogger
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.plus
import timber.log.Timber
/**
* Default implementation of [HotCryptoRepository]
@ -123,9 +119,9 @@ internal class DefaultHotCryptoRepository(
return runCatching(dispatchers.io) {
tangemTechApi.getHotCrypto(currencyId = appCurrencyId).getOrThrow()
}
.onSuccess { Timber.d("HotCrypto is successfully updated") }
.onSuccess { TangemLogger.d("HotCrypto is successfully updated") }
.onFailure { throwable ->
Timber.e(throwable, "Unable to fetch hot crypto")
TangemLogger.e("Unable to fetch hot crypto", throwable)
val httpException = throwable as? ApiResponseError.HttpException
analyticsEventHandler.send(

View file

@ -50,6 +50,7 @@ import com.tangem.domain.onramp.repositories.OnrampRepository
import com.tangem.domain.tokens.model.Amount
import com.tangem.domain.walletmanager.WalletManagersFacade
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import com.tangem.utils.logging.TangemLogger
import kotlinx.coroutines.NonCancellable
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
@ -57,7 +58,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.withContext
import org.joda.time.DateTime
import timber.log.Timber
import java.util.UUID
@Suppress("LongParameterList", "LargeClass", "TooManyFunctions")
@ -221,7 +221,7 @@ internal class DefaultOnrampRepository(
).bind()
},
onError = { error ->
Timber.w(error, "Unable to fetch onramp payment methods")
TangemLogger.w("Unable to fetch onramp payment methods", error)
throw error
},
)
@ -256,7 +256,7 @@ internal class DefaultOnrampRepository(
).bind()
},
onError = { error ->
Timber.w(error, "Unable to fetch onramp pairs")
TangemLogger.w("Unable to fetch onramp pairs", error)
throw error
},
)
@ -273,7 +273,7 @@ internal class DefaultOnrampRepository(
).bind()
},
onError = { error ->
Timber.w(error, "Unable to fetch express providers")
TangemLogger.w("Unable to fetch express providers", error)
throw error
},
)
@ -321,7 +321,7 @@ internal class DefaultOnrampRepository(
).bind()
},
onError = { error ->
Timber.w(error, "Unable to fetch onramp pairs")
TangemLogger.w("Unable to fetch onramp pairs", error)
throw error
},
)
@ -455,7 +455,7 @@ internal class DefaultOnrampRepository(
).bind()
},
onError = { e ->
Timber.e(e)
TangemLogger.e("Error", e)
throw e
},
)
@ -478,7 +478,7 @@ internal class DefaultOnrampRepository(
throw OnrampRedirectError.VerificationFailed
}
} catch (e: Exception) {
Timber.e(e)
TangemLogger.e("Error", e)
throw e
}
}
@ -602,7 +602,7 @@ internal class DefaultOnrampRepository(
countryCode = countryCode,
)
} else {
Timber.w(error, "Unable to fetch onramp quotes for ${provider.id}. $error")
TangemLogger.w("Unable to fetch onramp quotes for ${provider.id}. $error", error)
OnrampQuote.Error(
paymentMethod = paymentMethod,
provider = provider,
@ -612,7 +612,7 @@ internal class DefaultOnrampRepository(
)
}
} else {
Timber.w(error, "Unable to fetch onramp quotes for ${provider.id}. $error")
TangemLogger.w("Unable to fetch onramp quotes for ${provider.id}. $error", error)
null
}