Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-04 11:57:51 +04:00
parent 642190f7c6
commit 3a5144403b
19 changed files with 1033 additions and 49 deletions

View file

@ -0,0 +1,20 @@
package com.tangem.domain.txhistory.fetcher
import com.tangem.domain.models.currency.CryptoCurrency
import com.tangem.domain.models.wallet.UserWalletId
sealed interface TxHistoryFetchTrigger {
data class TokenDetailsOpen(
val walletId: UserWalletId,
val currency: CryptoCurrency,
) : TxHistoryFetchTrigger, TxHistoryExpressTrigger, TxHistoryGatewayTrigger
data class TokenDetailsPTR(
val walletId: UserWalletId,
val currency: CryptoCurrency,
) : TxHistoryFetchTrigger, TxHistoryExpressTrigger, TxHistoryGatewayTrigger
}
sealed interface TxHistoryExpressTrigger : TxHistoryFetchTrigger
sealed interface TxHistoryGatewayTrigger : TxHistoryFetchTrigger

View file

@ -0,0 +1,24 @@
package com.tangem.domain.txhistory.fetcher
import com.tangem.domain.models.account.AccountId
import com.tangem.domain.models.wallet.UserWalletId
interface TxHistoryFetcher<T : TxHistoryFetchTrigger> {
suspend fun invoke(params: T)
fun close()
}
interface AppTxHistoryFetcher : TxHistoryFetcher<TxHistoryFetchTrigger>
interface WalletTxHistoryFetcher : TxHistoryFetcher<TxHistoryFetchTrigger> {
val walletId: UserWalletId
}
interface AccountTxHistoryFetcher : TxHistoryFetcher<TxHistoryFetchTrigger> {
val accountId: AccountId
val walletId: UserWalletId get() = accountId.userWalletId
}
interface ExpressTxHistoryFetcher : TxHistoryFetcher<TxHistoryExpressTrigger> {
val address: String
}