Update backend/src/graphql/resolver/TransactionResolver.ts

Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
This commit is contained in:
Ulf Gebhardt 2022-02-02 19:42:59 +01:00
parent 736310f5d5
commit bec09fc7f4
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -142,7 +142,7 @@ async function calculateAndAddDecayTransactions(
if (i === userTransactions.length - 1 && decay) {
const now = new Date()
const decay = await calculateDecay(userTransaction.balance, userTransaction.balanceDate, now)
const decay = calculateDecay(userTransaction.balance, userTransaction.balanceDate, now)
const balance = userTransaction.balance - decay.balance
const decayTransaction = new Transaction()