diff --git a/backend/src/graphql/model/Transaction.ts b/backend/src/graphql/model/Transaction.ts index b6f75f745..24c66ac67 100644 --- a/backend/src/graphql/model/Transaction.ts +++ b/backend/src/graphql/model/Transaction.ts @@ -29,7 +29,7 @@ export class Transaction { this.decay = new Decay({ balance: transaction.balance.toDecimalPlaces(2, Decimal.ROUND_DOWN), decay: transaction.decay.toDecimalPlaces(2, Decimal.ROUND_FLOOR), - // TODO + // TODO: add correct value when decay must be rounded in transaction context roundedDecay: new Decimal(0), start: transaction.decayStart, end: transaction.balanceDate, diff --git a/backend/src/util/virtualTransactions.ts b/backend/src/util/virtualTransactions.ts index 2f37ad188..8c1aec65b 100644 --- a/backend/src/util/virtualTransactions.ts +++ b/backend/src/util/virtualTransactions.ts @@ -68,7 +68,7 @@ const virtualDecayTransaction = ( userId: -1, previous: -1, typeId: TransactionTypeId.DECAY, - amount: decay.decay ? decay.roundedDecay : new Decimal(0), // this kinda is wrong, but helps with the frontend query + amount: decay.decay ? decay.roundedDecay : new Decimal(0), balance: decay.balance .minus(holdAvailabeAmount.toString()) .toDecimalPlaces(2, Decimal.ROUND_DOWN),