diff --git a/src/app/transaction.service.ts b/src/app/transaction.service.ts index 175f31f..90c2c5f 100644 --- a/src/app/transaction.service.ts +++ b/src/app/transaction.service.ts @@ -13,9 +13,9 @@ export class TransactionService { getTransactions(count?: number): Observable { if (count) { - return from(this.db.transactions.toCollection().limit(count).toArray()) + return from(this.db.transactions.orderBy('date').reverse().limit(count).toArray()) } else { - return from(this.db.transactions.toCollection().toArray()) + return from(this.db.transactions.orderBy('date').reverse().toArray()) } }