Updated on 2026-08-14

This commit is contained in:
Tangem 2023-10-31 15:39:52 +05:00
parent 93f7f4b424
commit 9b1d655ab5
8 changed files with 24 additions and 15 deletions

View file

@ -26,11 +26,11 @@ class DefaultTxHistoryRepository(
private val txHistoryItemsStore: TxHistoryItemsStore,
) : TxHistoryRepository {
override suspend fun getTxHistoryItemsCount(userWalletId: UserWalletId, network: Network): Int {
override suspend fun getTxHistoryItemsCount(userWalletId: UserWalletId, currency: CryptoCurrency): Int {
val userWallet = getUserWallet(userWalletId)
val state = walletManagersFacade.getTxHistoryState(
userWalletId = userWallet.walletId,
network = network,
currency = currency,
)
return when (state) {
is TxHistoryState.Failed.FetchError -> throw TxHistoryStateError.DataError(state.exception)