Updated on 2026-08-14

This commit is contained in:
Tangem 2023-09-21 18:54:47 +05:00
parent 81cce1254d
commit 879c8d603b
19 changed files with 566 additions and 415 deletions

View file

@ -5,6 +5,7 @@ import androidx.paging.PagingConfig
import androidx.paging.PagingData
import com.tangem.data.txhistory.repository.paging.TxHistoryPagingSource
import com.tangem.datasource.local.userwallet.UserWalletsStore
import com.tangem.domain.tokens.models.CryptoCurrency
import com.tangem.domain.tokens.models.Network
import com.tangem.domain.txhistory.models.TxHistoryItem
import com.tangem.domain.txhistory.models.TxHistoryState
@ -33,7 +34,7 @@ class DefaultTxHistoryRepository(
}
}
override fun getTxHistoryItems(network: Network, pageSize: Int): Flow<PagingData<TxHistoryItem>> {
override fun getTxHistoryItems(currency: CryptoCurrency, pageSize: Int): Flow<PagingData<TxHistoryItem>> {
val userWallet = getUserWallet()
return Pager(
config = PagingConfig(
@ -44,7 +45,7 @@ class DefaultTxHistoryRepository(
loadPage = { page: Int, pageSize: Int ->
walletManagersFacade.getTxHistoryItems(
userWalletId = userWallet.walletId,
network = network,
currency = currency,
page = page,
pageSize = pageSize,
)