Updated on 2026-08-14
This commit is contained in:
parent
8b75e37e30
commit
a9bca131c3
386 changed files with 1369 additions and 1347 deletions
|
|
@ -68,7 +68,7 @@ import com.tangem.utils.coroutines.*
|
|||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.channels.awaitClose
|
||||
import kotlinx.coroutines.flow.*
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
|
||||
private const val TANGEM_PAY_UPDATE_INTERVAL = 60_000L
|
||||
|
|
@ -157,7 +157,7 @@ internal class WalletModel @Inject constructor(
|
|||
|
||||
modelScope.launch {
|
||||
bindRefcodeWithWalletUseCase.retry()
|
||||
.onLeft { Timber.e("Failed to bind refcode with wallets: $it") }
|
||||
.onLeft { TangemLogger.e("Failed to bind refcode with wallets: $it") }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ internal class WalletModel @Inject constructor(
|
|||
val shouldAskNotificationPermissionsViaBs = notificationsRepository.shouldAskNotificationPermissionsViaBs()
|
||||
val shouldShow = notificationsRepository.shouldShowSubscribeOnNotificationsAfterUpdate()
|
||||
val isHuaweiDevice = getIsHuaweiDeviceWithoutGoogleServicesUseCase()
|
||||
Timber.d(
|
||||
TangemLogger.d(
|
||||
"push BS afterUpdate: $shouldShow," +
|
||||
"isHuaweiDevice $isHuaweiDevice",
|
||||
)
|
||||
|
|
@ -454,7 +454,7 @@ internal class WalletModel @Inject constructor(
|
|||
awaitAll(
|
||||
async {
|
||||
refreshMultiCurrencyWalletQuotesUseCase(wallet.walletCardState.id).getOrElse {
|
||||
Timber.e("Failed to refreshMultiCurrencyWalletQuotesUseCase $it")
|
||||
TangemLogger.e("Failed to refreshMultiCurrencyWalletQuotesUseCase $it")
|
||||
}
|
||||
},
|
||||
async {
|
||||
|
|
@ -497,10 +497,10 @@ internal class WalletModel @Inject constructor(
|
|||
}
|
||||
is WalletsUpdateActionResolver.Action.ReorderWallets -> reorderWallets(action)
|
||||
WalletsUpdateActionResolver.Action.EmptyWallets -> {
|
||||
Timber.w("Wallets list is empty!")
|
||||
TangemLogger.w("Wallets list is empty!")
|
||||
}
|
||||
is WalletsUpdateActionResolver.Action.Unknown -> {
|
||||
Timber.w("Unable to perform action: $action")
|
||||
TangemLogger.w("Unable to perform action: $action")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -820,7 +820,7 @@ internal class WalletModel @Inject constructor(
|
|||
setNotificationsEnabledUseCase(userWalletId, true).onRight {
|
||||
notificationsRepository.setNotificationsWasEnabledAutomatically(userWalletId.stringValue)
|
||||
}.onLeft {
|
||||
Timber.e(it)
|
||||
TangemLogger.e("Error", it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletNotificat
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletScreenState
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletType
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
|
|
@ -42,7 +42,7 @@ internal class WalletsUpdateActionResolver @Inject constructor(
|
|||
getUpdateContentAction(currentState, wallets, selectedWallet)
|
||||
}
|
||||
|
||||
Timber.i("Resolved action: $action")
|
||||
TangemLogger.i("Resolved action: $action")
|
||||
|
||||
return action
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.feature.wallet.child.wallet.model.intents
|
||||
|
||||
import arrow.core.getOrElse
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import com.tangem.common.ui.expressStatus.ExpressStatusBottomSheetConfig
|
||||
import com.tangem.common.ui.tokens.TokenItemStateConverter.ApySource
|
||||
import com.tangem.core.analytics.api.AnalyticsEventHandler
|
||||
|
|
@ -40,7 +41,6 @@ import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
|||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.flow.take
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
|
|
@ -131,12 +131,12 @@ internal class WalletContentClickIntentsImplementor @Inject constructor(
|
|||
override fun onTokenItemLongClick(accountId: AccountId, cryptoCurrencyStatus: CryptoCurrencyStatus) {
|
||||
modelScope.launch(dispatchers.main) {
|
||||
val userWalletId = accountId.userWalletId
|
||||
val userWallet = getUserWalletUseCase(userWalletId).getOrElse {
|
||||
Timber.e(
|
||||
val userWallet = getUserWalletUseCase(userWalletId).getOrElse { error ->
|
||||
TangemLogger.e(
|
||||
"""
|
||||
Unable to get user wallet
|
||||
|- ID: $userWalletId
|
||||
|- Exception: $it
|
||||
|- Exception: $error
|
||||
""".trimIndent(),
|
||||
)
|
||||
|
||||
|
|
@ -287,7 +287,7 @@ internal class WalletContentClickIntentsImplementor @Inject constructor(
|
|||
txHash = txHash,
|
||||
currency = currency,
|
||||
).fold(
|
||||
ifLeft = { Timber.e(it.toString()) },
|
||||
ifLeft = { TangemLogger.e(it.toString()) },
|
||||
ifRight = { router.openUrl(url = it) },
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.tangem.feature.wallet.child.wallet.model.intents
|
||||
|
||||
import arrow.core.getOrElse
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import com.tangem.common.TangemBlogUrlBuilder
|
||||
import com.tangem.common.routing.AppRoute.*
|
||||
import com.tangem.common.routing.AppRouter
|
||||
|
|
@ -11,8 +12,8 @@ import com.tangem.core.analytics.models.AnalyticsParam
|
|||
import com.tangem.core.analytics.models.Basic.ButtonSupport
|
||||
import com.tangem.core.decompose.di.ModelScoped
|
||||
import com.tangem.core.decompose.ui.UiMessageSender
|
||||
import com.tangem.core.navigation.url.UrlOpener
|
||||
import com.tangem.core.navigation.review.ReviewManager
|
||||
import com.tangem.core.navigation.url.UrlOpener
|
||||
import com.tangem.domain.card.SetCardWasScannedUseCase
|
||||
import com.tangem.domain.common.wallets.UserWalletsListRepository
|
||||
import com.tangem.domain.feedback.GetWalletMetaInfoUseCase
|
||||
|
|
@ -53,7 +54,6 @@ import kotlinx.coroutines.async
|
|||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
|
|
@ -187,7 +187,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
userWalletId = userWallet.walletId,
|
||||
currencies = missedAddressCurrencies,
|
||||
).fold(
|
||||
ifLeft = { Timber.e(it, "Failed to derive public keys") },
|
||||
ifLeft = { TangemLogger.e("Failed to derive public keys", it) },
|
||||
ifRight = {
|
||||
fetchCryptoCurrencies(userWalletId = userWallet.walletId, currencies = missedAddressCurrencies)
|
||||
},
|
||||
|
|
@ -485,7 +485,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
networks = currencies.map(CryptoCurrency::network).toSet(),
|
||||
),
|
||||
)
|
||||
.onLeft { Timber.e("Unable to fetch networks: $it") }
|
||||
.onLeft { TangemLogger.e("Unable to fetch networks: $it") }
|
||||
},
|
||||
async {
|
||||
multiQuoteStatusFetcher(
|
||||
|
|
@ -494,7 +494,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
appCurrencyId = null,
|
||||
),
|
||||
)
|
||||
.onLeft { Timber.e("Unable to fetch quotes: $it") }
|
||||
.onLeft { TangemLogger.e("Unable to fetch quotes: $it") }
|
||||
},
|
||||
async {
|
||||
val stakingIds = currencies.mapNotNullTo(hashSetOf()) {
|
||||
|
|
@ -507,7 +507,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
stakingIds = stakingIds,
|
||||
),
|
||||
)
|
||||
.onLeft { Timber.e("Unable to fetch yield balances: $it") }
|
||||
.onLeft { TangemLogger.e("Unable to fetch yield balances: $it") }
|
||||
},
|
||||
)
|
||||
.awaitAll()
|
||||
|
|
@ -516,12 +516,12 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
|
||||
private fun getSelectedUserWallet(): UserWallet? {
|
||||
val userWalletId = stateHolder.getSelectedWalletId()
|
||||
return getUserWalletUseCase(userWalletId).getOrElse {
|
||||
Timber.e(
|
||||
return getUserWalletUseCase(userWalletId).getOrElse { error ->
|
||||
TangemLogger.e(
|
||||
"""
|
||||
Unable to get user wallet
|
||||
|- ID: $userWalletId
|
||||
|- Exception: $it
|
||||
|- Exception: $error
|
||||
""".trimIndent(),
|
||||
)
|
||||
|
||||
|
|
@ -538,7 +538,7 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
setNotificationsEnabledUseCase(userWalletId, true).onRight {
|
||||
notificationsRepository.setNotificationsWasEnabledAutomatically(userWalletId.stringValue)
|
||||
}.onLeft {
|
||||
Timber.e(it)
|
||||
TangemLogger.e("Error", it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import kotlinx.coroutines.delay
|
|||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
|
|
@ -72,12 +72,12 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
|
||||
private fun findSelectedWallet(promoCode: String) {
|
||||
getSelectedWalletSyncUseCase().fold(
|
||||
ifLeft = {
|
||||
Timber.tag(LOG_TAG).e("Error on getting user wallet: $it")
|
||||
ifLeft = { error ->
|
||||
TangemLogger.withTag(LOG_TAG).e("Error on getting user wallet: $error")
|
||||
showAlert(Failed)
|
||||
},
|
||||
ifRight = { userWallet ->
|
||||
Timber.tag(LOG_TAG).d("SelectedUserWallet ${userWallet.walletId.stringValue.mask()}")
|
||||
TangemLogger.withTag(LOG_TAG).d("SelectedUserWallet ${userWallet.walletId.stringValue.mask()}")
|
||||
findBitcoinAddress(userWallet = userWallet, promoCode = promoCode)
|
||||
},
|
||||
)
|
||||
|
|
@ -96,24 +96,24 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
},
|
||||
)
|
||||
|
||||
Timber.tag(LOG_TAG).d("All user network statuses ${networkStatuses?.size}")
|
||||
TangemLogger.withTag(LOG_TAG).d("All user network statuses ${networkStatuses?.size}")
|
||||
|
||||
val cryptoCurrencies = multiWalletCryptoCurrenciesSupplier.getSyncOrNull(
|
||||
MultiWalletCryptoCurrenciesProducer.Params(userWallet.walletId),
|
||||
)
|
||||
|
||||
Timber.tag(LOG_TAG).d("All user cryptoCurrencies on main ${cryptoCurrencies?.size}")
|
||||
TangemLogger.withTag(LOG_TAG).d("All user cryptoCurrencies on main ${cryptoCurrencies?.size}")
|
||||
|
||||
val bitcoinCurrency = cryptoCurrencies?.firstOrNull { it.id.rawNetworkId == Blockchain.Bitcoin.id }
|
||||
Timber.tag(LOG_TAG).d("BitcoinCurrency $bitcoinCurrency")
|
||||
TangemLogger.withTag(LOG_TAG).d("BitcoinCurrency $bitcoinCurrency")
|
||||
|
||||
val bitcoinStatus = networkStatuses?.firstOrNull { status ->
|
||||
status.network.id == bitcoinCurrency?.network?.id
|
||||
}
|
||||
Timber.tag(LOG_TAG).d("BitcoinStatus $bitcoinStatus")
|
||||
TangemLogger.withTag(LOG_TAG).d("BitcoinStatus $bitcoinStatus")
|
||||
|
||||
if (bitcoinStatus == null) {
|
||||
Timber.tag(LOG_TAG).d("No bitcoin, bitcoin network status == null")
|
||||
TangemLogger.withTag(LOG_TAG).d("No bitcoin, bitcoin network status == null")
|
||||
showAlert(NoBitcoinAddress)
|
||||
} else {
|
||||
val networkAddress = when (bitcoinStatus.value) {
|
||||
|
|
@ -126,7 +126,7 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
?.defaultAddress?.value
|
||||
|
||||
if (bitcoinAddress != null) {
|
||||
Timber.tag(LOG_TAG).d(
|
||||
TangemLogger.withTag(LOG_TAG).d(
|
||||
"Start activation promoCode ${promoCode.mask()} address ${bitcoinAddress.mask()}",
|
||||
)
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
} else {
|
||||
uiMessageSender.send(GlobalLoadingMessage(false))
|
||||
delay(DEFAULT_MESSAGE_SENDER_DELAY)
|
||||
Timber.tag(LOG_TAG).d("No Bitcoin address $bitcoinStatus.value")
|
||||
TangemLogger.withTag(LOG_TAG).d("No Bitcoin address $bitcoinStatus.value")
|
||||
showAlert(NoBitcoinAddress)
|
||||
}
|
||||
}
|
||||
|
|
@ -155,13 +155,15 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
delay(DEFAULT_MESSAGE_SENDER_DELAY)
|
||||
uiMessageSender.send(GlobalLoadingMessage(false))
|
||||
delay(DEFAULT_MESSAGE_SENDER_DELAY)
|
||||
Timber.tag(LOG_TAG).d("${promoCode.mask()} activation success on address ${bitcoinAddress.mask()}")
|
||||
TangemLogger.withTag(
|
||||
LOG_TAG,
|
||||
).d("${promoCode.mask()} activation success on address ${bitcoinAddress.mask()}")
|
||||
showAlert(Activated)
|
||||
}.onLeft { error ->
|
||||
delay(DEFAULT_MESSAGE_SENDER_DELAY)
|
||||
uiMessageSender.send(GlobalLoadingMessage(false))
|
||||
delay(DEFAULT_MESSAGE_SENDER_DELAY)
|
||||
Timber.tag(LOG_TAG).d("${promoCode.mask()} activation failed $error")
|
||||
TangemLogger.withTag(LOG_TAG).d("${promoCode.mask()} activation failed $error")
|
||||
val alertType = when (error) {
|
||||
ActivatePromoCodeError.ActivationFailed -> Failed
|
||||
ActivatePromoCodeError.InvalidPromoCode -> InvalidPromoCode
|
||||
|
|
@ -203,7 +205,7 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
@Suppress("NullableToStringCall")
|
||||
private fun saveAndBindRefcode() {
|
||||
scope.launch(dispatchers.default) {
|
||||
Timber.i("saveAndBindRefcode: refcode = $refcode, campaign = $campaign")
|
||||
TangemLogger.i("saveAndBindRefcode: refcode = $refcode, campaign = $campaign")
|
||||
|
||||
if (!refcode.isNullOrBlank()) {
|
||||
val conversionData = AppsFlyerConversionData(refcode = refcode, campaign = campaign)
|
||||
|
|
@ -211,7 +213,7 @@ internal class DefaultPromoDeeplinkHandler @AssistedInject constructor(
|
|||
appsFlyerStore.storeIfAbsent(value = conversionData)
|
||||
|
||||
bindRefcodeWithWalletUseCase(conversionData)
|
||||
.onLeft { Timber.e("Failed to bind refcode with wallets: $it") }
|
||||
.onLeft { TangemLogger.e("Failed to bind refcode with wallets: $it") }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import com.tangem.domain.demo.models.DemoConfig
|
|||
import com.tangem.domain.models.network.Network
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import com.tangem.domain.walletmanager.WalletManagersFacade
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
@ModelScoped
|
||||
|
|
@ -42,7 +42,7 @@ class HasSingleWalletSignedHashesUseCase @Inject constructor(
|
|||
},
|
||||
)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Timber.w(e, "Unable to validate signature count: user wallet not found")
|
||||
TangemLogger.w("Unable to validate signature count: user wallet not found", e)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
|||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
|
||||
@ModelScoped
|
||||
|
|
@ -58,7 +58,7 @@ internal class OnrampStatusFactory @Inject constructor(
|
|||
if (!onrampTx.activeStatus.isTerminal) {
|
||||
getOnrampStatusUseCase(userWallet = userWallet, onrampTx.info.txId).fold(
|
||||
ifLeft = {
|
||||
Timber.e("Couldn't update onramp status. $it")
|
||||
TangemLogger.e("Couldn't update onramp status. $it")
|
||||
},
|
||||
ifRight = { statusModel ->
|
||||
val txId = statusModel.txId
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
package com.tangem.feature.wallet.presentation.wallet.domain
|
||||
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import com.tangem.domain.account.status.producer.SingleAccountStatusListProducer
|
||||
import com.tangem.domain.account.status.supplier.SingleAccountStatusListSupplier
|
||||
import com.tangem.domain.models.currency.CryptoCurrencyStatus
|
||||
import com.tangem.domain.models.wallet.UserWallet
|
||||
import com.tangem.domain.models.wallet.UserWalletId
|
||||
import com.tangem.domain.wallets.usecase.GetSelectedWalletSyncUseCase
|
||||
import timber.log.Timber
|
||||
|
||||
internal fun GetSelectedWalletSyncUseCase.unwrap(): UserWallet? {
|
||||
return this().fold(
|
||||
ifLeft = {
|
||||
Timber.e("Impossible to get selected wallet $it")
|
||||
ifLeft = { error ->
|
||||
TangemLogger.e("Impossible to get selected wallet $error")
|
||||
null
|
||||
},
|
||||
ifRight = { it },
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import kotlinx.coroutines.supervisorScope
|
|||
import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.sync.withLock
|
||||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
|
@ -45,7 +45,7 @@ internal class WalletContentFetcher @Inject constructor(
|
|||
* (doesn't matter if it is active or not), then skip the update process.
|
||||
*/
|
||||
if (!forceUpdate && savedJobHolder != null && !savedJobHolder.isEmpty()) {
|
||||
Timber.d("Skip fetching for $userWalletId")
|
||||
TangemLogger.d("Skip fetching for $userWalletId")
|
||||
|
||||
return@withContext
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ internal class WalletContentFetcher @Inject constructor(
|
|||
* then cancel the previous update.
|
||||
*/
|
||||
if (forceUpdate && savedJobHolder?.isActive == true) {
|
||||
Timber.d("Cancel old fetching for $userWalletId")
|
||||
TangemLogger.d("Cancel old fetching for $userWalletId")
|
||||
|
||||
savedJobHolder.cancel()
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ internal class WalletContentFetcher @Inject constructor(
|
|||
JobHolder().also { fetchingJobMap[userWalletId] = it }
|
||||
}
|
||||
|
||||
Timber.d("Start fetching for $userWalletId")
|
||||
TangemLogger.d("Start fetching for $userWalletId")
|
||||
|
||||
val maybeResult = launch {
|
||||
walletBalanceFetcher(
|
||||
|
|
@ -71,11 +71,11 @@ internal class WalletContentFetcher @Inject constructor(
|
|||
userWalletId = userWalletId,
|
||||
isPaymentAccountRefactorEnabled = tangemPayFeatureToggles.isTangemPayAccountsRefactorEnabled,
|
||||
),
|
||||
).onLeft(Timber::e)
|
||||
).onLeft { TangemLogger.e("Error", it) }
|
||||
}
|
||||
.saveInAndJoin(jobHolder)
|
||||
|
||||
Timber.d("Finish fetching with result $maybeResult for $userWalletId")
|
||||
TangemLogger.d("Finish fetching with result $maybeResult for $userWalletId")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ package com.tangem.feature.wallet.presentation.wallet.domain
|
|||
import com.tangem.domain.common.wallets.UserWalletsListRepository
|
||||
import com.tangem.domain.models.wallet.copy
|
||||
import com.tangem.domain.wallets.repository.WalletNamesMigrationRepository
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
class WalletNameMigrationUseCase(
|
||||
private val userWalletsListRepository: UserWalletsListRepository,
|
||||
|
|
@ -17,13 +17,13 @@ class WalletNameMigrationUseCase(
|
|||
|
||||
val wallets = userWalletsListRepository.userWalletsSync()
|
||||
val existingNames: MutableSet<String> = mutableSetOf()
|
||||
wallets.forEach {
|
||||
val defaultName = it.name
|
||||
wallets.forEach { wallet ->
|
||||
val defaultName = wallet.name
|
||||
val suggestedWalletName = suggestedWalletName(defaultName, existingNames)
|
||||
if (defaultName != suggestedWalletName) {
|
||||
userWalletsListRepository.saveWithoutLock(it.copy(name = suggestedWalletName), canOverride = true)
|
||||
userWalletsListRepository.saveWithoutLock(wallet.copy(name = suggestedWalletName), canOverride = true)
|
||||
}
|
||||
Timber.tag("Migrated names").e(it.walletId.toString() + " " + suggestedWalletName)
|
||||
TangemLogger.withTag("Migrated names").e(wallet.walletId.toString() + " " + suggestedWalletName)
|
||||
}
|
||||
|
||||
walletNamesMigrationRepository.setMigrationDone()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.tangem.domain.models.wallet.isLocked
|
|||
import kotlinx.coroutines.CloseableCoroutineDispatcher
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.newSingleThreadContext
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
|
|
@ -45,19 +45,19 @@ internal class WalletScreenContentLoader @Inject constructor(
|
|||
storage.remove(id)
|
||||
loadInternal(userWallet, coroutineScope, isRefresh = true)
|
||||
} else {
|
||||
Timber.d("$id content loading has already started")
|
||||
TangemLogger.d("$id content loading has already started")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Cancel loading by [id] */
|
||||
fun cancel(id: UserWalletId) {
|
||||
Timber.d("$id content loading is canceled")
|
||||
TangemLogger.d("$id content loading is canceled")
|
||||
storage.remove(id)
|
||||
}
|
||||
|
||||
fun cancelAll() {
|
||||
Timber.d("All content loading is canceled")
|
||||
TangemLogger.d("All content loading is canceled")
|
||||
storage.clear()
|
||||
singleBackgroundDispatcher.close()
|
||||
}
|
||||
|
|
@ -69,11 +69,11 @@ internal class WalletScreenContentLoader @Inject constructor(
|
|||
)
|
||||
|
||||
if (loader == null) {
|
||||
Timber.e("Impossible to create loader for $userWallet")
|
||||
TangemLogger.e("Impossible to create loader for $userWallet")
|
||||
return
|
||||
}
|
||||
|
||||
Timber.d("${userWallet.walletId} content loading is ${if (isRefresh) "re" else ""}started")
|
||||
TangemLogger.d("${userWallet.walletId} content loading is ${if (isRefresh) "re" else ""}started")
|
||||
|
||||
loader.subscribers
|
||||
.map { it.subscribe(coroutineScope, singleBackgroundDispatcher) }
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import kotlinx.collections.immutable.persistentListOf
|
|||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ internal class WalletStateController @Inject constructor(
|
|||
}
|
||||
|
||||
fun update(transformer: WalletScreenStateTransformer) {
|
||||
Timber.d("Applying: ${transformer::class.simpleName}")
|
||||
TangemLogger.d("Applying: ${transformer::class.simpleName}")
|
||||
mutableUiState.update(function = transformer::transform)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletScreenSta
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class DeleteWalletTransformer(
|
||||
private val selectedWalletIndex: Int,
|
||||
|
|
@ -31,7 +31,7 @@ internal class DeleteWalletTransformer(
|
|||
wallets = (prevState.wallets - deletedWalletState).toImmutableList(),
|
||||
)
|
||||
else -> {
|
||||
Timber.e("Wallets does not contain deleted wallet")
|
||||
TangemLogger.e("Wallets does not contain deleted wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
/**
|
||||
* Transformer that renames wallets
|
||||
|
|
@ -51,7 +51,7 @@ internal class RenameWalletsTransformer(
|
|||
is WalletState.MultiCurrency.Locked,
|
||||
is WalletState.SingleCurrency.Locked,
|
||||
-> {
|
||||
Timber.e("Impossible to rename wallet in locked state")
|
||||
TangemLogger.e("Impossible to rename wallet in locked state")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ internal class RenameWalletsTransformer(
|
|||
prevState.copy(walletsBalanceUM = prevState.walletsBalanceUM.copySealed(name = newName))
|
||||
}
|
||||
is WalletUM.Locked -> {
|
||||
Timber.e("Impossible to rename wallet in locked state")
|
||||
TangemLogger.e("Impossible to rename wallet in locked state")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import kotlinx.collections.immutable.PersistentList
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetCryptoCurrencyActionsTransformer(
|
||||
private val tokenActionsState: TokenActionsState,
|
||||
|
|
@ -26,11 +26,11 @@ internal class SetCryptoCurrencyActionsTransformer(
|
|||
prevState.copy(buttons = tokenActionsState.toManageButtons())
|
||||
}
|
||||
is WalletState.SingleCurrency.Locked -> {
|
||||
Timber.w("Impossible to load primary currency status for locked wallet")
|
||||
TangemLogger.w("Impossible to load primary currency status for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.MultiCurrency -> {
|
||||
Timber.w("Impossible to load crypto currency actions for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load crypto currency actions for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.SingleWalletOnrampTransactionConverter
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetExpressStatusesTransformer(
|
||||
userWalletId: UserWalletId,
|
||||
|
|
@ -47,11 +47,11 @@ internal class SetExpressStatusesTransformer(
|
|||
)
|
||||
}
|
||||
is WalletState.SingleCurrency.Locked -> {
|
||||
Timber.w("Impossible to load express statuses for locked wallet")
|
||||
TangemLogger.w("Impossible to load express statuses for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.MultiCurrency -> {
|
||||
Timber.w("Impossible to load express statuses for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load express statuses for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.SingleWalletCardStateConverter
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.SingleWalletMarketPriceConverter
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
@Deprecated("Remove with main toggle [DesignFeatureToggles.isRedesignEnabled]")
|
||||
internal class SetPrimaryCurrencyTransformer(
|
||||
|
|
@ -27,11 +27,11 @@ internal class SetPrimaryCurrencyTransformer(
|
|||
)
|
||||
}
|
||||
is WalletState.SingleCurrency.Locked -> {
|
||||
Timber.w("Impossible to load primary currency status for locked wallet")
|
||||
TangemLogger.w("Impossible to load primary currency status for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.MultiCurrency -> {
|
||||
Timber.w("Impossible to load primary currency status for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load primary currency status for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import com.tangem.feature.wallet.child.wallet.model.intents.WalletClickIntents
|
|||
import com.tangem.feature.wallet.presentation.wallet.domain.WalletAdditionalInfoFactory
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.*
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.utils.disableButtons
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import java.math.BigDecimal
|
||||
|
||||
internal class SetTokenListErrorTransformer(
|
||||
|
|
@ -39,11 +39,11 @@ internal class SetTokenListErrorTransformer(
|
|||
)
|
||||
}
|
||||
is WalletState.MultiCurrency.Locked -> {
|
||||
Timber.w("Impossible to load tokens list for locked wallet")
|
||||
TangemLogger.w("Impossible to load tokens list for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.SingleCurrency -> {
|
||||
Timber.w("Impossible to load tokens list for single-currency wallet")
|
||||
TangemLogger.w("Impossible to load tokens list for single-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ internal class SetTokenListErrorTransformer(
|
|||
)
|
||||
}
|
||||
is WalletUM.Locked -> {
|
||||
Timber.w("Impossible to load tokens list for locked wallet")
|
||||
TangemLogger.w("Impossible to load tokens list for locked wallet")
|
||||
walletUM
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.transformers.converte
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.TokenListStateConverter
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.WalletTokensListUMConverter
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.utils.enableButtons
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import java.math.BigDecimal
|
||||
|
||||
internal class SetTokenListTransformer(
|
||||
|
|
@ -35,12 +35,12 @@ internal class SetTokenListTransformer(
|
|||
)
|
||||
}
|
||||
is WalletState.MultiCurrency.Locked -> {
|
||||
Timber.w("Impossible to load tokens list for locked wallet")
|
||||
TangemLogger.w("Impossible to load tokens list for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.SingleCurrency,
|
||||
-> {
|
||||
Timber.w("Impossible to load tokens list for single-currency wallet")
|
||||
TangemLogger.w("Impossible to load tokens list for single-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ internal class SetTokenListTransformer(
|
|||
)
|
||||
}
|
||||
is WalletUM.Locked -> {
|
||||
Timber.w("Impossible to load tokens list for locked wallet")
|
||||
TangemLogger.w("Impossible to load tokens list for locked wallet")
|
||||
walletUM
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.TxHistoryItemStateConverter
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetTxHistoryCountErrorTransformer(
|
||||
private val userWallet: UserWallet,
|
||||
|
|
@ -46,7 +46,7 @@ internal class SetTxHistoryCountErrorTransformer(
|
|||
is WalletState.SingleCurrency.Locked,
|
||||
is WalletState.MultiCurrency,
|
||||
-> {
|
||||
Timber.w("Impossible to load transactions history for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetTxHistoryCountTransformer(
|
||||
userWalletId: UserWalletId,
|
||||
|
|
@ -24,11 +24,11 @@ internal class SetTxHistoryCountTransformer(
|
|||
)
|
||||
is WalletState.SingleCurrency.Locked,
|
||||
-> {
|
||||
Timber.w("Impossible to load transactions history for locked wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.MultiCurrency -> {
|
||||
Timber.w("Impossible to load transactions history for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ internal class SetTxHistoryCountTransformer(
|
|||
|
||||
private fun TxHistoryState.toLoadingState(): TxHistoryState {
|
||||
return if (this is TxHistoryState.Content) {
|
||||
Timber.d("Load transactions history: $transactionsCount")
|
||||
TangemLogger.d("Load transactions history: $transactionsCount")
|
||||
|
||||
copy(
|
||||
contentItems = contentItems.apply {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.tangem.domain.txhistory.models.TxHistoryListError
|
|||
import com.tangem.feature.wallet.child.wallet.model.intents.WalletClickIntents
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetTxHistoryItemsErrorTransformer(
|
||||
userWalletId: UserWalletId,
|
||||
|
|
@ -18,11 +18,11 @@ internal class SetTxHistoryItemsErrorTransformer(
|
|||
return when (prevState) {
|
||||
is WalletState.SingleCurrency.Content -> prevState.copy(txHistoryState = createErrorState())
|
||||
is WalletState.SingleCurrency.Locked -> {
|
||||
Timber.w("Impossible to load transactions history for locked wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.MultiCurrency -> {
|
||||
Timber.w("Impossible to load transactions history for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.converter.TxHistoryItemFlowConverter
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetTxHistoryItemsTransformer(
|
||||
userWallet: UserWallet,
|
||||
|
|
@ -23,11 +23,11 @@ internal class SetTxHistoryItemsTransformer(
|
|||
txHistoryState = prevState.txHistoryState.toContentState(),
|
||||
)
|
||||
is WalletState.SingleCurrency.Locked -> {
|
||||
Timber.w("Impossible to load transactions history for locked wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for locked wallet")
|
||||
prevState
|
||||
}
|
||||
is WalletState.MultiCurrency -> {
|
||||
Timber.w("Impossible to load transactions history for multi-currency wallet")
|
||||
TangemLogger.w("Impossible to load transactions history for multi-currency wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class SetWarningsTransformer(
|
||||
userWalletId: UserWalletId,
|
||||
|
|
@ -23,7 +23,7 @@ internal class SetWarningsTransformer(
|
|||
is WalletState.MultiCurrency.Locked,
|
||||
is WalletState.SingleCurrency.Locked,
|
||||
-> {
|
||||
Timber.w("Impossible to update notifications for locked wallet")
|
||||
TangemLogger.w("Impossible to update notifications for locked wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ internal class SetWarningsTransformer(
|
|||
notificationsCarousel = notificationsCarousel,
|
||||
)
|
||||
is WalletUM.Locked -> {
|
||||
Timber.w("Impossible to update notifications for locked wallet")
|
||||
TangemLogger.w("Impossible to update notifications for locked wallet")
|
||||
walletUM
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.utils.WalletLoadingStateFactory
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class UnlockWalletTransformer(
|
||||
private val unlockedWallets: List<UserWallet>,
|
||||
|
|
@ -65,7 +65,7 @@ internal class UnlockWalletTransformer(
|
|||
is WalletState.MultiCurrency.Content,
|
||||
is WalletState.SingleCurrency.Content,
|
||||
-> {
|
||||
Timber.e("Impossible to unlock wallet with not locked state")
|
||||
TangemLogger.e("Impossible to unlock wallet with not locked state")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ internal class UnlockWalletTransformer(
|
|||
userWallet = unlockedWallet,
|
||||
)
|
||||
is WalletUM.Content -> {
|
||||
Timber.e("Impossible to unlock wallet with not locked state")
|
||||
TangemLogger.e("Impossible to unlock wallet with not locked state")
|
||||
walletUM
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.tangem.feature.wallet.presentation.wallet.domain.WalletImageResolver
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletCardState
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletState
|
||||
import com.tangem.feature.wallet.presentation.wallet.state.model.WalletUM
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class UpdateWalletCardsCountTransformer(
|
||||
private val userWallet: UserWallet,
|
||||
|
|
@ -25,7 +25,7 @@ internal class UpdateWalletCardsCountTransformer(
|
|||
is WalletState.MultiCurrency.Locked,
|
||||
is WalletState.SingleCurrency.Locked,
|
||||
-> {
|
||||
Timber.e("Impossible to update wallet cards count for locked wallet")
|
||||
TangemLogger.e("Impossible to update wallet cards count for locked wallet")
|
||||
prevState
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.transformers.SetToken
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.transformers.TokenConverterParams
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
|
|
@ -126,7 +126,7 @@ internal abstract class BasicAccountListSubscriber : BasicWalletSubscriber() {
|
|||
?: return
|
||||
},
|
||||
ifError = { e ->
|
||||
Timber.e("Failed to load token list: $e")
|
||||
TangemLogger.e("Failed to load token list: $e")
|
||||
stateController.update(
|
||||
SetTokenListErrorTransformer(
|
||||
selectedWallet = userWallet,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import kotlinx.coroutines.flow.Flow
|
|||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
internal class TangemPayMainSubscriber @AssistedInject constructor(
|
||||
|
|
@ -67,7 +67,7 @@ internal class TangemPayMainSubscriber @AssistedInject constructor(
|
|||
}
|
||||
TangemPayCustomerInfoError.UnknownError -> {
|
||||
// hide TangemPay block
|
||||
Timber.e("Failed when loading main screen TangemPay info: $tangemPayError")
|
||||
TangemLogger.e("Failed when loading main screen TangemPay info: $tangemPayError")
|
||||
stateController.update(
|
||||
transformer = TangemPayHiddenStateTransformer(userWalletId),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import kotlinx.coroutines.Job
|
|||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
/**
|
||||
* Component for implementation of flow subscription
|
||||
|
|
@ -18,7 +18,7 @@ internal abstract class WalletSubscriber {
|
|||
protected abstract fun create(coroutineScope: CoroutineScope): Flow<*>
|
||||
|
||||
fun subscribe(coroutineScope: CoroutineScope, dispatchers: CoroutineDispatcher): Job {
|
||||
Timber.d("Subscribe on ${this::class.simpleName}")
|
||||
TangemLogger.d("Subscribe on ${this::class.simpleName}")
|
||||
|
||||
return create(coroutineScope)
|
||||
.flowOn(dispatchers)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ import kotlinx.coroutines.test.advanceUntilIdle
|
|||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import timber.log.Timber
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
class DefaultPromoDeeplinkHandlerTest {
|
||||
|
|
@ -83,7 +82,6 @@ class DefaultPromoDeeplinkHandlerTest {
|
|||
messages = mutableListOf()
|
||||
every { uiMessageSender.send(capture(messages)) } just runs
|
||||
|
||||
Timber.uprootAll()
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue