Apply suggestions from code review.
Co-authored-by: str4d <thestr4d@gmail.com>
This commit is contained in:
parent
404eff21b1
commit
a338e1daf5
|
@ -87,10 +87,10 @@ class TransactionSQLDAO: TransactionRepository {
|
|||
|
||||
func find(from transaction: ZcashTransaction.Overview, limit: Int, kind: TransactionKind) async throws -> [ZcashTransaction.Overview] {
|
||||
guard
|
||||
let transactionIndex = transaction.index,
|
||||
let transactionBlockHeight = transaction.minedHeight
|
||||
else { throw ZcashError.transactionRepositoryTransactionMissingRequiredFields }
|
||||
|
||||
let transactionIndex = transaction.index ?? Int.max
|
||||
let query = transactionsView
|
||||
.order((ZcashTransaction.Overview.Column.minedHeight ?? BlockHeight.max).desc)
|
||||
.filter(
|
||||
|
|
|
@ -201,7 +201,7 @@ class TransactionRepositoryTests: XCTestCase {
|
|||
|
||||
transactionsFrom.forEach { preceededTransaction in
|
||||
guard let precedingHeight = preceededTransaction.minedHeight, let transactionHeight = transaction.minedHeight else {
|
||||
XCTFail("Transactions are missing indexes.")
|
||||
XCTFail("Transactions are missing mined heights.")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue