Moved the filter on creation to the query.

This commit is contained in:
elweyn 2021-12-22 08:25:08 +01:00
parent f7af70625e
commit 13642133c1

View File

@ -359,6 +359,7 @@ async function listTransactions(
limit,
offset,
order,
onlyCreations,
)
skipFirstTransaction = userTransactionsCount > offset + limit
const decay = !(currentPage > 1)
@ -380,11 +381,6 @@ async function listTransactions(
const transactionList = new TransactionList()
transactionList.count = userTransactionsCount
if (onlyCreations) {
transactions = transactions.filter((transaction) => {
return transaction.type === 'creation'
})
}
transactionList.transactions = transactions
return transactionList
}