Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-11 17:29:26 +05:00
parent 7fb168b533
commit 7df5f9edc2
22 changed files with 153 additions and 22 deletions

View file

@ -24,6 +24,7 @@ dependencies {
implementation(deps.androidx.paging.runtime)
implementation(deps.timber)
implementation(deps.jodatime)
implementation(deps.tangem.blockchain)
implementation(deps.hilt.core)
kapt(deps.hilt.kapt)

View file

@ -3,6 +3,7 @@ package com.tangem.data.txhistory.repository
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingData
import com.tangem.blockchain.common.Blockchain
import com.tangem.data.common.cache.CacheRegistry
import com.tangem.data.txhistory.repository.paging.TxHistoryPagingSource
import com.tangem.datasource.local.txhistory.TxHistoryItemsStore
@ -63,6 +64,11 @@ class DefaultTxHistoryRepository(
return pager.flow
}
override fun getTxExploreUrl(txHash: String, networkId: Network.ID): String {
val blockchain = Blockchain.fromId(networkId.value)
return blockchain.getExploreTxUrl(txHash)
}
private suspend fun getUserWallet(userWalletId: UserWalletId): UserWallet {
return requireNotNull(userWalletsStore.getSyncOrNull(userWalletId)) {
"Unable to find user wallet with provided ID: $userWalletId"