New: Expose transaction count.
This commit is contained in:
parent
ad5d4c4505
commit
cde327a0f8
|
@ -91,7 +91,9 @@ open class PagedTransactionRepository(
|
||||||
// let expired transactions linger in the UI for a little while
|
// let expired transactions linger in the UI for a little while
|
||||||
return transactions.deleteExpired(lastScannedHeight - (ZcashSdk.EXPIRY_OFFSET / 2))
|
return transactions.deleteExpired(lastScannedHeight - (ZcashSdk.EXPIRY_OFFSET / 2))
|
||||||
}
|
}
|
||||||
|
override suspend fun count(): Int = withContext(IO) {
|
||||||
|
transactions.count()
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Close the underlying database.
|
* Close the underlying database.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -74,6 +74,8 @@ interface TransactionRepository {
|
||||||
|
|
||||||
suspend fun deleteExpired(lastScannedHeight: Int): Int
|
suspend fun deleteExpired(lastScannedHeight: Int): Int
|
||||||
|
|
||||||
|
suspend fun count(): Int
|
||||||
|
|
||||||
//
|
//
|
||||||
// Transactions
|
// Transactions
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue