Updated on 2026-08-14
This commit is contained in:
parent
8b75e37e30
commit
a9bca131c3
386 changed files with 1369 additions and 1347 deletions
|
|
@ -29,7 +29,6 @@ dependencies {
|
|||
|
||||
implementation(deps.kotlin.coroutines)
|
||||
implementation(deps.androidx.paging.runtime)
|
||||
implementation(deps.timber)
|
||||
implementation(deps.jodatime)
|
||||
implementation(tangemDeps.blockchain)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import com.tangem.domain.txhistory.repository.TxHistoryRepository
|
|||
import com.tangem.domain.walletmanager.WalletManagersFacade
|
||||
import com.tangem.domain.walletmanager.utils.SdkPageConverter
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
|
||||
class DefaultTxHistoryRepository(
|
||||
private val cacheRegistry: CacheRegistry,
|
||||
|
|
@ -110,7 +110,7 @@ class DefaultTxHistoryRepository(
|
|||
)
|
||||
?.items.orEmpty()
|
||||
} catch (e: Throwable) {
|
||||
Timber.e(e, "Unable to load the transaction history for the requested page: ${Page.Initial}")
|
||||
TangemLogger.e("Unable to load the transaction history for the requested page: ${Page.Initial}", e)
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import com.tangem.pagination.BatchFetchResult
|
|||
import com.tangem.pagination.BatchListSource
|
||||
import com.tangem.pagination.toBatchFlow
|
||||
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class RefactoredTxHistoryRepository(
|
||||
private val walletManagersFacade: WalletManagersFacade,
|
||||
|
|
@ -96,16 +96,17 @@ internal class RefactoredTxHistoryRepository(
|
|||
.filterIfTxAlreadyAdded(apiItems = items)
|
||||
|
||||
return if (recentItems.isEmpty()) {
|
||||
Timber.d("Nothing to add to TxHistory")
|
||||
TangemLogger.d("Nothing to add to TxHistory")
|
||||
this
|
||||
} else {
|
||||
Timber.d(
|
||||
"Recent transactions were added to TxHistory: %s",
|
||||
recentItems.joinToString(
|
||||
prefix = "[",
|
||||
postfix = "]",
|
||||
transform = TxInfo::txHash,
|
||||
),
|
||||
TangemLogger.d(
|
||||
"Recent transactions were added to TxHistory: ${
|
||||
recentItems.joinToString(
|
||||
prefix = "[",
|
||||
postfix = "]",
|
||||
transform = TxInfo::txHash,
|
||||
)
|
||||
}",
|
||||
)
|
||||
|
||||
return copy(items = recentItems + items)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import com.tangem.domain.txhistory.models.Page
|
|||
import com.tangem.domain.txhistory.models.PaginationWrapper
|
||||
import com.tangem.domain.walletmanager.WalletManagersFacade
|
||||
import com.tangem.domain.walletmanager.utils.SdkPageConverter
|
||||
import timber.log.Timber
|
||||
import com.tangem.utils.logging.TangemLogger
|
||||
|
||||
internal class TxHistoryPagingSource(
|
||||
private val sourceParams: Params,
|
||||
|
|
@ -44,7 +44,7 @@ internal class TxHistoryPagingSource(
|
|||
}
|
||||
LoadResult.Page(wrappedItems.items, prevKey = null, nextKey = nextKey)
|
||||
} catch (e: Throwable) {
|
||||
Timber.e(e, "Unable to load the transaction history for the requested page: $pageToLoad")
|
||||
TangemLogger.e("Unable to load the transaction history for the requested page: $pageToLoad", e)
|
||||
|
||||
LoadResult.Error(e)
|
||||
}
|
||||
|
|
@ -89,16 +89,17 @@ internal class TxHistoryPagingSource(
|
|||
.filterIfTxAlreadyAdded(apiItems = items)
|
||||
|
||||
return if (recentItems.isEmpty()) {
|
||||
Timber.d("Nothing to add to TxHistory")
|
||||
TangemLogger.d("Nothing to add to TxHistory")
|
||||
this
|
||||
} else {
|
||||
Timber.d(
|
||||
"Recent transactions were added to TxHistory: %s",
|
||||
recentItems.joinToString(
|
||||
prefix = "[",
|
||||
postfix = "]",
|
||||
transform = TxInfo::txHash,
|
||||
),
|
||||
TangemLogger.d(
|
||||
"Recent transactions were added to TxHistory: ${
|
||||
recentItems.joinToString(
|
||||
prefix = "[",
|
||||
postfix = "]",
|
||||
transform = TxInfo::txHash,
|
||||
)
|
||||
}",
|
||||
)
|
||||
|
||||
return copy(items = recentItems + items)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue