Updated on 2026-08-14

This commit is contained in:
Tangem 2023-08-09 13:09:47 +05:00
parent 3f5f3ef68b
commit d1a09370c7
39 changed files with 317 additions and 301 deletions

View file

@ -1,18 +0,0 @@
package com.tangem.lib.crypto
import com.tangem.lib.crypto.models.txhistory.ProxyTransactionHistoryItem
import com.tangem.lib.crypto.models.txhistory.ProxyTransactionHistoryState
interface TxHistoryManager {
@Throws(IllegalStateException::class)
suspend fun checkTxHistoryState(networkId: String, derivationPath: String?): ProxyTransactionHistoryState
@Throws(IllegalStateException::class)
suspend fun getTxHistoryItems(
networkId: String,
derivationPath: String?,
page: Int,
pageSize: Int,
): List<ProxyTransactionHistoryItem>
}

View file

@ -1,21 +0,0 @@
package com.tangem.lib.crypto.models.txhistory
import com.tangem.lib.crypto.models.ProxyAmount
data class ProxyTransactionHistoryItem(
val txHash: String,
val timestamp: Long,
val direction: TransactionDirection,
val status: ProxyTransactionStatus,
val type: TransactionType,
val amount: ProxyAmount,
) {
sealed interface TransactionDirection {
data class Incoming(val from: String) : TransactionDirection
data class Outgoing(val to: String) : TransactionDirection
}
sealed interface TransactionType {
object Transfer : TransactionType
}
}

View file

@ -1,15 +0,0 @@
package com.tangem.lib.crypto.models.txhistory
sealed class ProxyTransactionHistoryState {
sealed class Success : ProxyTransactionHistoryState() {
object Empty : Success()
data class HasTransactions(val txCount: Int) : Success()
}
sealed class Failed : ProxyTransactionHistoryState() {
data class FetchError(val exception: Exception) : Failed()
}
object NotImplemented : ProxyTransactionHistoryState()
}

View file

@ -1,3 +0,0 @@
package com.tangem.lib.crypto.models.txhistory
enum class ProxyTransactionStatus { Confirmed, Unconfirmed }